Adapter Notifications
Overview
You can create RFCs on the SAP system that invoke services on Integration Server. This allows SAP users to access the information that is available via Adapter for SAP. Before you can create an RFC that invokes a service, or send an IDoc to Adapter for SAP, you must configure the SAP system to have an RFC destination for an RFC listener running at Adapter for SAP. This enables the SAP system to send RFCs to Adapter for SAP. You must also configure the adapter to have an RFC listener that listens for RFCs from the SAP system.
After you have the SAP system and Adapter for SAP configured, you can create a function module on the SAP system that requests the execution of a service synchronously or you can send an IDoc to Adapter for SAP for further synchronous or asynchronous processing. To do so, you also need to create a listener notification on Adapter for SAP. The listener notification indicates either what service the adapter is to execute when it receives a message from the SAP system or how to publish a corresponding document.
Adapter for SAP supports the following types of notifications that can be assigned to an RFC listener.
- RFC listener notification (synchronous)
- RFC listener notification (asynchronous)
- ALE listener notification (synchronous)
- ALE listener notification (asynchronous)
If there is no listener notification assigned to the RFC listener, the received message will be forwarded to the routing listener. For more information, see Routing Messages Through Adapter for SAP.
Components of a Listener Notification
In addition to the request (and reply) field selection, a listener notification contains the following fields:
- A flag that indicates if incoming IDocs should be tracked to later ALE monitoring from the calling system.
- A flag that indicates whether the Confirm event should be forwarded to the receiver.
Monitor IDocs Flag
All ALE listener notifications and routing notifications that have an ALE message type assigned support the Monitor IDocs feature. For more information, see Using the ALE Monitoring Features Via Adapter for SAP.
Forward Confirm Event Flag
All synchronous adapter notifications (the RFC listener notification, ALE listener notification, and the routing notification) support the forward Confirm event feature. This is a useful feature in scenarios where a transactional request is received by Adapter for SAP and then forwarded to an SAP system via tRFC, and where the client wants to achieve transactional behavior from end to end.
If the
Forward Confirm
event flag is activated,
Adapter for SAP tries to forward the Confirm TID event, which is
triggered by the tRFC protocol, to the same destination where the document
went. What happens then depends on the transport used.
Transports that have an SAP system or other Integration Servers as the destination confirm the TID on the destination system. This may become important in those cases where the final receiver of the message is another SAP system. For each tRFC it receives, an SAP system keeps an entry in a check table (ARFCRSTATE) to protect against duplicate processing of the same document. Only after the sender has indicated via Confirm TID that this document will never again be posted, the receiving system can safely remove this entry from its check table.
Up to IBM webMethods Adapter 4.6 for SAP, the adapter would not forward this Confirm TID event, so the check table in the receiving SAP system would keep growing. This feature enables a clean-up of this check table in scenarios like:
- SAP system A->Adapter for SAP A ->Internet->Adapter for SAP B->SAP system B or
- external client->Adapter for SAP->SAP system
if the external client uses the service pub.sap.client:confirmTID.
The following two simplified dynamic model diagrams show how Adapter for SAP handles requests differently depending on the setting of the $action parameter. They show a combined view of three possible scenarios:
- A listener notification is directly assigned to the RFC listener.
- No listener notification is assigned to the RFC listener, and the message is forwarded to the routing listener.
- The message is sent directly to the routing listener by calling one of the pub.sap.transport.*:InboundProcess services.
Action Equals 1
In the scenario where the value of
$action
equals
1 (Execute), the
calling service name, or in case of an inbound transport, the matching confirm
service, will be stored in the transaction store (setServiceName() call).

Action Equals 4
In the scenario where the value of
$action
equals
4 (Confirm), the
stored service name will be retrieved and the service will be called directly,
bypassing the notification (getServiceName() call).

Creating an RFC Destination on an SAP System
About this task
To enable your SAP system to issue remote function calls (RFCs) for services on Integration Server, you must define an RFC destination on the SAP system. Each SAP system has a single RFC destination for an RFC listener defined at Adapter for SAP that identifies where the SAP system sends all RFCs that invoke services on Integration Server.
Use the following procedure to configure Adapter for SAP listener as a registered RFC destination on the SAP system.
To register Adapter for SAP listener as an RFC destination
Procedure
Listeners
This section describes how to create, modify, and delete listeners.
Before You Configure New Listeners
About this task
To prepare to configure a new listener
Procedure
- Make sure that you have webMethods administrator privileges so that you can access Adapter for SAP's administrative screens. For information about setting user privileges, see the IBM webMethods Integration Server Administrator’s Guide for your release.
- Start Integration Server and Integration Server Administrator, if they are not already running.
- Using Integration Server Administrator, make sure that the WmSAP package is enabled. To verify the status of the WmSAP package, see Enabling Packages.
- Using Designer, create a user-defined package to contain the listener, if you have not already done so. For more information about managing packages, see Package Management for details.
Configuring an RFC Listener
About this task
Adapter for SAP requires an RFC listener to listen for inbound RFC requests from an SAP system. Use the following procedure to create a listener on Adapter for SAP to respond to RFCs issued by the SAP system.
To create an RFC listener on Adapter for SAP
Procedure
Enabling Listeners
About this task
After you have configured notifications, you must enable the listener so that the associated notifications will communicate appropriately with the listener at run time. You enable the listeners using Integration Server Administrator.
The Status column indicates the readiness of the listener. If the status is Succeeded, the listener is ready to be enabled. If the status is Failed, an error occurred during startup. If an error occurs during startup, the state will not change to "Enabled" when refreshing the page. Errors at this stage typically indicate a problem with either the listener configuration or the network. Review the listener settings and check the network.
For more information on configuring listeners and notifications, see the sections Configuring an RFC Listener and Configuring Listener Notifications.
To enable a listener
Procedure
Testing the RFC Listener
About this task
Use the following procedure to verify that the SAP system can successfully issue a remote function call (RFC) to Adapter for SAP.
To test the RFC listener
Procedure
Viewing Listeners
You can view listeners and each listener's parameters from Integration Server Administrator or from Designer. You can also view the notification order of a listener.
Viewing Listeners Using Integration Server Administrator
About this task
To view listeners using Integration Server Administrator
Procedure
Sorting and Filtering Listeners Using Integration Server Administrator
About this task
To sort and filter listeners using Integration Server Administrator
You can sort and filter the list of listeners that appears on the Listeners screen.
- To sort information on the Listeners screen, click the Up and Down arrows.
- To filter the list of listeners:
- On the Listeners screen, click Filter Listeners.
- Type the criterion by which you want
to filter into the
Filter
criteria box. Filtering is based on the package name, not the
listener name. To locate all listeners containing specific alphanumeric
characters, use asterisks (*) as wildcards. For example, if you want to display
all listeners containing the string "abc", type
*abc*in the Filter criteria box. - Click Submit. The Listeners screen displays the listeners that match the filter criteria.
- To re-display all listeners, click Show All Listeners.
Viewing Listeners Using Designer
About this task
To view listeners using Designer
Procedure
Viewing the Notification Order of a Listener
About this task
To view the notification order of a listener
Procedure
Editing Listeners
You use Integration Server Administrator to edit the listener in the following situations:
- If you need to select a newly configured connection, or if you need to change any listener properties you can update the listener parameters.
- If you need to change the order of the notifications that are associated with the listener, see Editing the Notification Order of a Listener.
Editing a Listener
About this task
To edit a listener
Procedure
Editing the Notification Order of a Listener
About this task
To edit the notification order of a listener
Procedure
Copying Listeners
About this task
You can copy an existing listener to create a new listener with the same or similar properties without having to type or specify all properties for the listener. You copy adapter listeners using Integration Server Administrator.
To copy a listener
Procedure
Deleting Listeners
About this task
If you no longer want to use a listener, use the following instructions to delete the listener. You use Integration Server Administrator to delete listeners.
To delete a listener
Procedure
Suspending Listeners
About this task
You can suspend listeners for an indefinite period of time. Suspended listeners cannot be edited or deleted.
To suspend a listener
Procedure
Results
When you suspend a listener, the action may not take effect right away. You may have to wait as long as the time specified in the Timeout parameter for the listener. If one or more messages appear on the queue within that time interval, the adapter may receive and process the first message.
Disabling Listeners
About this task
Listeners must be disabled before you can edit or delete them. You disable listeners using Integration Server Administrator.
To disable a listener
Procedure
Results
When you disable a listener, the action may not take effect right away. You may have to wait as long as the time specified in the Timeout parameter for the listener. If one or more messages appear on the queue within that time interval, the adapter may receive and process the first message.
Listener Notifications
The following sections provide instructions for configuring and managing Adapter for SAP listener notifications. Adapter for SAP has the following types of listener notifications that you can configure:
- RFC listener notifications (synchronous)
- RFC listener notifications (asynchronous)
- ALE listener notifications (synchronous)
- ALE listener notifications (asynchronous)
For more information on how listener notifications work, see Adapter Listeners and Listener Notifications.
Before You Configure Listener Notifications
About this task
To prepare to configure a listener notification
Procedure
- Install IBM webMethods Integration Server and Adapter for SAP on the same machine. For details, see Installing, Upgrading, and Uninstalling the adapter.
- Make sure that you have webMethods administrator privileges so that you can access Adapter for SAP's administrative screens. For more information about setting user privileges, see IBM webMethods Integration Server Administrator’s Guide for your release.
- Start Integration Server and Integration Server Administrator, if they are not already running.
- Using Integration Server Administrator, make sure that the WmSAP package is enabled. To verify the status of the WmSAP package, see Enabling Packages.
- Configure a listener using Integration Server Administrator. For more information on how to configure a new listener, see Configuring an RFC Listener.
- Using Designer, create a user-defined package to contain the listener, if you have not already done so. For more information about managing packages, see Package Management.
Dependencies for Listener Notifications
The following table lists other objects you must configure or tasks you must complete to use listener notifications:
| Task | Use this tool... | |
|---|---|---|
| 1. | Configure an adapter connection. For details, see Configuring Adapter Connections. | Integration Server Administrator |
| 2. | Configure an RFC destination on the SAP system. For details, see Creating an RFC Destination on an SAP System. | SAP system |
| 3. | Configure an RFC listener. For details, see Configuring an RFC Listener. | Integration Server Administrator |
| 4. | Select the
appropriate notification template and configure the notification.
For instructions to configure notifications, see Configuring Listener Notifications. |
Designer |
| 5. | For synchronous publish-and-wait and for asynchronous messaging, you should create an Integration Server trigger that subscribes to the document type that Adapter for SAP created with the notification. Refer to IBM webMethods Service Development Help for more information about using triggers. | Designer |
| 6. | Enable the adapter notifications. For instructions to enable listener notifications, see Enabling Listener Notifications. | Integration Server Administrator |
Configuring Listener Notifications
RFC Listener Notification (Synchronous)
This section describes how to create and configure a synchronous RFC listener notification.
Creating a Synchronous RFC Listener Notification
About this task
To create a synchronous RFC listener notification
Procedure
Configuring a Synchronous RFC Listener Notification
About this task
To configure a synchronous RFC listener notification
Procedure
ALE Listener Notification (Synchronous)
This section describes how to create and configure a synchronous ALE listener notification.
Creating a Synchronous ALE Listener Notification
About this task
To create a synchronous ALE listener notification
Procedure
Configuring a Synchronous ALE Listener Notification
About this task
To configure a synchronous ALE listener notification
Procedure
Editing Synchronous Listener Notification Services
About this task
If you specified Service Invoke as the execution mode of the listener notification when you first configured the synchronous listener notification, you may later need to change the service that is invoked. To change the notification, complete the following steps.
To edit the notification service
Procedure
- From Designer, in the adapter notification service editor, select the Adapter Settings tab.
- In the Execution Mode area, click the Browse button next to the service.
- Locate and select a new service.
- Click OK.
- From the File menu, select Save (or Save All).
RFC Listener Notification (Asynchronous)
This section describes how to create and configure an asynchronous RFC listener notification.
Creating an Asynchronous RFC Listener Notification
About this task
To create an asynchronous RFC listener notification
Procedure
Configuring an Asynchronous RFC Listener Notification
About this task
To configure an asynchronous RFC listener notification
Procedure
ALE Listener Notification (Asynchronous)
This section describes how to create and configure an asynchronous ALE listener notification.
Creating an Asynchronous ALE Listener Notification
About this task
To create an asynchronous ALE listener notification
Procedure
Configuring an Asynchronous ALE Listener Notification
About this task
To configure an asynchronous ALE listener notification
Procedure
Enabling Listener Notifications
About this task
After you configure a listener notification, you need to enable it using Integration Server Administrator.
To enable a listener notification
Procedure
Testing Listener Notifications
About this task
You can test listener notifications to ensure that you have configured them correctly.
To test listener notifications
Procedure
- Configure a listener using Integration Server Administrator. For instructions to configure a listener, see Configuring an RFC Listener.
- Configure a listener notification using Designer. For instructions to configure a notification, see Configuring Listener Notifications.
- Enable the listener notification using Integration Server Administrator. For instructions to enable a listener notification, see Enabling Listener Notifications.
- Enable the listener using Integration Server Administrator. For instructions to enable a listener, see Enabling Listeners.
- On your SAP system, invoke a remote function call or send an IDoc to the RFC destination your RFC listener is listening to. The RFC listener will forward the received request to the matching notification.
Testing Publishable Document Types
You can test a publishable document type that is associated with an asynchronous notification in Designer . When you test a publishable document type, you provide input values that Designer uses to create an instance of the publishable document type. You also specify a publishing method (such as publish, publish and wait, deliver, or deliver and wait). Designer then publishes a document and displays the results of the publish in the Results dialog box. Testing a publishable document type provides a way for you to publish a document without building a service that does the actual publishing. If you select a publication action where you wait for a reply document, you can verify whether reply documents are received.
For instructions to test a publishable document type, see the IBM webMethods Service Development Help for your release. Also, for a complete description of the envelope parameters located in the WmPublic folder, see the IBM webMethods Integration Server Built-In Services Reference. The envelope parameters define the sender's address, the time the document was sent, password and certificate information, and other useful information for routing and control.
Viewing Listener Notifications
You can view listener notifications from Integration Server Administrator, and Designer.
Viewing Listener Notifications Using Integration Server Administrator
About this task
To view listener notifications using Integration Server Administrator
Procedure
Sorting and Filtering Listener Notifications
About this task
To sort and filter listener notifications
You can sort and filter the list of listener notifications that appears on the Listener Notifications screen.
- To sort information on the Listener Notifications screen, click the Up and Down arrows.
- To filter the list of listener
notifications:
- On the Listener Notifications screen, click Filter Listener Notifications.
- Type the criterion by which you want
to filter into the
Filter
criteria box. Filtering is based on the notification name. To
locate all listener notifications containing specific alphanumeric characters,
use asterisks (*) as wildcards. For example, if you want to display all
notifications containing the string "abc", type
*abc*in the Filter criteria box. - Click Submit. The Listener Notifications screen displays the listener notifications that match the filter criteria.
- To re-display all listener notifications, click Show All Listener Notifications.
Viewing Listener Notifications Using Designer
About this task
To view listener notifications using Designer
Procedure
Editing Listener Notifications
About this task
You use Designer to edit both synchronous and asynchronous listener notifications. When editing the listener notification, you can also edit the publishable document type associated with the asynchronous listener notifications or the request and reply document types that are associated with synchronous listener notifications. Listener notifications must be disabled before you can edit or delete them.
To edit a listener notification
Procedure
Editing Document Types Used by the Listener
About this task
To edit the document types used by the listener
Procedure
- In Designer, expand the package and folder that contain the document type that you want to edit.
- Open the listener notification for the document that you want to edit.
- Select the Request Field Selection or Reply Field Selection tab and modify the available values for the document type's parameters as needed. For detailed descriptions of the document type's parameters, see the appropriate procedure for that listener notification type.
Deleting Listener Notifications
About this task
If you no longer want to use a particular Adapter for SAP listener notification, you can delete it by following the instructions in this section. You delete listener notifications, both synchronous and asynchronous, using Designer. Listener notifications must be disabled before you can edit or delete them.
If you delete an asynchronous listener notification, the associated publishable document type is deleted automatically.
You cannot solely delete the document types associated with the synchronous and asynchronous listener notifications.
To delete a listener notification
Procedure
- In Designer, expand the package and folder that contain the listener notification you want to delete.
- Right-click the listener notification and click Delete.
Disabling Listener Notifications
About this task
You disable listener notifications using Integration Server Administrator.
To disable a listener notification
Procedure
- In the Adapters menu in Integration Server Administrator navigation area, click IBM webMethods Adapter for SAP.
- In IBM webMethods Adapter for SAP menu, select Listener Notifications.
- On the Listener Notifications screen, click Yes in the Enabled column for the listener notification you want to disable.
Results
The listener notification becomes disabled and No displays in the Enabled column.
Examples
Creating a Synchronous RFC Adapter Notification
The following tutorial explains how to assign inbound RFCs to services on Integration Server. It describes an application in which the SAP system requests a service to retrieve information about a product.
Creating a Function Module in an SAP System
About this task
Calling a service from an SAP system requires, at a minimum, a remotely callable function module with a defined signature (imports, exports, and tables). No ABAP coding, screen development, or other work is required.
To create a function module in an SAP system
Procedure
Creating an RFC Adapter Notification
About this task
You need to associate a service on Integration Server with the inbound RFC. The following steps assign the app:getProductData service to inbound requests for Z_IS_PRODUCT.
To create an RFC adapter notification
Procedure
Testing the Product Retrieval Function
About this task
Use the following procedure to test the RFC you just created.
To test an inbound RFC
Use the following procedure to test the product retrieval function:
Procedure
Creating a Synchronous ALE Listener Notification
If you need to use the information contained in an IDoc in documents of another format, you build a service that "maps" the information from fields in the IDoc to the variables used by the other application. For example, to transfer a purchase order from an ORDERS02 IDoc to an EDI system, you create a flow service that maps information from the IDoc fields to fields within the EDI system's purchase-order document. Then, you define a routing notification that triggers this flow service.
To create a sample synchronous ALE listener notification, perform the following:
- Create an Empty Flow Service Called mapOrders02
- Create an Asynchronous ALE Listener Notification for IDoc Type Orders02
- Define the Input and Output Signatures for the mapOrders02 Service
- Map Fields from Orders02RequestDocument to PurchaseOrder Document
- Testing the Listener Notification from the SAP System
Create an Empty Flow Service Called mapOrders02
About this task
Use the following procedure to create a flow service named app.idocs:mapOrders02 with Designer (this is the service that the synchronous ALE notification will invoke based on the routing rule created in the next stage).
To create an empty flow service
Procedure
Create an Asynchronous ALE Listener Notification for IDoc Type Orders02
About this task
This listener notification invokes the flow service that will perform the mapping. When you create the listener notification, select the service you have previously created for mapping the IDoc.
To create a synchronous ALE listener notification
Procedure
- From the File menu, select New > Adapter Notification and then click Next.
- Select IBM webMethods Adapter for SAP as the adapter type and click Next.
- Select ALE Listener Notification (synchronous) from the template and click Next.
- Name the listener notification "Orders02", and select the app\idocs folder. Click Next.
- Select the service you created in Create an Empty Flow Service Called mapOrders02, click Next and then click Finish.
- Select the IDoc tab and change the IDoc type field to "ORDERS02".
-
Select the
Request Field
Selection tab and click the
icon.
- From the File menu, select Save (or Save All).
Define the Input and Output Signatures for the mapOrders02 Service
About this task
This service maps an ORDERS02 IDoc to a specific Purchase Order format. To do this, you need to define the input and output signatures for the service.
To define the input and output signatures
Procedure
- Open the mapOrders02 service and select the Input/Output tab.
- For the Input field, open the Select dialog and select the apps\idocs\Orders02RequestDocument.
- For the Output field, open the Select dialog and select the WmSAP\sample\sap\records\PurchaseOrder document.
Map Fields from Orders02RequestDocument to PurchaseOrder Document
About this task
After you define the input and output documents, you should map fields from the input to the output.
To map fields from ORDERS02 to PO
Procedure
- Add a map step.
- Select the Pipeline tab and select one or more fields from ORDERS02 to map to fields in PO.
Testing the Listener Notification from the SAP System
About this task
Before you can test the listener notification, you must complete the procedures in Setting Up the SAP System.
To test the flow service you created, use the SAPGui to submit your sample IDoc to Adapter for SAP. Check the results of the service to ensure that the IDoc is being mapped correctly.
To test the listener notification
Procedure
- Use the SAPGui to submit an IDoc to your flow service. When the service executes, the savePipelineToFile operation will make a copy of the pipeline (which will include your IDoc) and save it to a file.
- Delete the savePipelineToFile service and insert the restorePipelineFromFile service.
- Select the Test \>Run command to execute the flow service. When it executes, the restorePipelineFromFile service will retrieve the copy of the pipeline containing your IDoc, which the remainder of the flow will operate on.
- When you are finished testing, delete the restorePipelineFromFile service and save the finished flow.
Setting Up the SAP System
To set up an SAP system to send IDocs to Adapter for SAP, use the SAPGui to perform the following steps:
Create an RFC Destination
About this task
You must create an RFC destination on the SAP system. For instructions on how to create an RFC Destination, refer to Creating an RFC Destination on an SAP System.
Define a Logical Port
About this task
The lower level networking requires that a system port number be associated with the RFC destination. The logical port identifies the port to which messages are sent. The logical port can only be used if an RFC Destination was previously created.
To define a logical port, use WE21, or alternatively, the following procedure:
To define a logical port
Procedure
- In the Main screen, select Tools > Business Communication > IDoc-Basis > IDoc > Port Definition.
- Select the Transactional RFC tree item and click Create.
- On the toolbar, click New Entries.
- Either select your own descriptive port name or let the system generate one.
- Enter the IDoc version you want to send via this port, the RFC destination you just created, and a short description of your logical port, and then save the information.
Create a Partner
About this task
A logical subsystem manages one or more RFC Destinations. To create a partner (logical system), use SPRO_ADMIN, or alternatively, the following procedure:
To create a partner (logical system)
Procedure
- In the Main screen, select Tools > AcceleratedSAP > Customizing > Project Management.
- Select SAP Reference IMG.
- Expand the following nodes: Basis Components > Application Link Enabling (ALE) > Sending and Receiving Systems > Logical Systems > Define Logical System. (You can also use SALE and select the path described above, starting with Application Link Enabling (ALE).
- Select Define Logical System.
- Click New Entries.
- Enter an informative name for your partner and provide a short description. After saving the partner information, assign it to a workbench request.
Create a Partner Profile
About this task
To create a partner profile, you can use WE20 or alternatively, the following procedure or alternatively, the following procedure:
To create a partner profile
Procedure
- In the Main screen, select Tools > Business Communication > IDoc-Basis > IDoc > Partner profile.
- Select the LS (logical system) partner type in the tree view and click Create.
- Enter in the Partner field the partner you created in Create a Partner, and save the partner profile.
- Below the outbound parameter table control, click Insert entry.
-
Enter the message type of the
IDoc, (for example:
MATMAS). -
Enter the logical receiver
port you created before and enter the basic type of the IDoc, (for example:
MATMAS03). - Save the outbound parameter.
- Below the inbound parameter table control, click Insert entry.
-
Enter the message type of the
IDoc, (for example:
MATMAS) and the process code, (for example:MATM). - Save the inbound parameter.
Create a Distribution Model for the Partner and Message Type with SAP System 4.5 or Earlier
About this task
If you are using SAP system 4.6 or earlier, you can use BD64 or alternatively, the following procedure:
To use SAP system 4.5 or earlier to create a distribution model
Procedure
- In the Main screen, select Tools > Business Framework > ALE > Customizing.
- Open the Cross-Application Components folder, then the Distribution (ALE) folder, then the Distribution Customer Model folder in the tree view.
- Select Maintain customer distribution model.
- Create a new model using Model > Create.
-
Add a message type to your
model, enter the sender in the dialog box (for example:,
CERCLNT800), enter the receiver (your logical system), and the message type (MATMAS).
Create a Distribution Model for the Partner and Message Type with SAP System 4.6 or Later
About this task
If you are using SAP system 4.6 or later, you can use BD64 or alternatively, the following procedure:
To use SAP system 4.6 or later to create a distribution model
Procedure
- In the Main screen, select Tools > AcceleratedSAP > Customizing > Project Management.
- Select SAP Reference IMG.
- Expand the following nodes: Basis Components > Distribution (ALE) > Modelling and Implementing Business Processes > Maintain Customer Distribution Model.
- Select Maintain Customer Distribution Model (BD64).
- Change into the edit mode.
- Select Create model view.
- Enter a short text string and a technical name for your new model view.
- Select your new model view in the tree Distribution Model, and select Add message type.
-
In the dialog box, enter the
sender (for example:
CERCLNT800), the receiver (your logical system), and the message type (MATMAS).





