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.

Note: In this context, synchronous or asynchronous refers to the processing on Integration Server. It does not indicate how the message was processed on the SAP system. However, in the case of an ALE listener notification, there is always a TID assigned to the message. In the case of an RFC listener notification, a TID will be present in the pipeline only for transactional RFC calls from the SAP system.

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.

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.

Note: This feature is not supported for an asynchronous adapter notification. For asynchronous adapter notifications, the Broker application that receives the publishable document from Adapter for SAP should determine how to proceed after successfully executing and committing the transactional request.

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).

Important: If you execute a routing notification that has a transport other than Integration Server-assigned transport, the correct confirm service will be chosen and called without any additional coding needed. For all other scenarios, the assigned service will be called twice. You need to check the value of the $action field to correctly process the request.

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.

Note: You must have the proper authorizations on your SAP system to add an RFC Destination. If you do not have this authorization, have your SAP administrator perform the following steps.

To register Adapter for SAP listener as an RFC destination

Procedure

  1. Use the SAPGui to log on to the SAP system.
  2. Select Administration > System Administration > Administration > Network > RFC Destinations (SM59).
  3. Select TCP/IP connections.
  4. Select Create.
  5. In the RFC Destination field, type a name that will meaningfully identify both Adapter for SAP and the SAP system itself. For example, if the SAP system is named CER and Integration Server is named IS, name your RFC destination ISCER. You will need to re-enter this name several times during the course of this section, so keep it simple and memorable.
    Important: This field is case-sensitive. It is recommended that you pick a name that contains all UPPERCASE characters.
  6. Enter T in the Connection type field (destination type TCP/IP).
  7. Enter a description in the Description field that differentiates this Adapter for SAP from any other.
  8. Select Save from the toolbar or select Save from the Destination menu.
  9. Select Registration as the Activation Type.
  10. In field Program ID type the name of your RFC destination from step 5. Enter it exactly as you did in step 5. This is also a case sensitive field.
  11. Select Save from the toolbar or select Save from the Connection menu.
  12. Select Gateway Options from the Destinations menu.
  13. Enter SAP systemapplicationserver in the Gateway host field.
  14. Enter sapgwnn (where nn is the SAP system number) in the Gateway service field.
    Note: This guarantees that you can access the RFC Server from all SAP application servers.
  15. If you want the RFC server to run in Unicode mode then select the Unicode option on the Special Options tab.
  16. If you want to use the RFC destination for bgRFC calls then select basXML as the Transfer Protocol on the Special Options tab.
    Note: The Classic with bgRFC and Classic with tRFC transfer protocols are not supported for bgRFC by Adapter for SAP.

    An RFC Destination setup for bgRFC should not be used for RFC or tRFC calls.

  17. Select OK.
  18. Select Save.
  19. Remain on the current screen while you complete the steps for creating an Adapter for SAP listener.

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

  1. 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.
  2. Start Integration Server and Integration Server Administrator, if they are not already running.
  3. Using Integration Server Administrator, make sure that the WmSAP package is enabled. To verify the status of the WmSAP package, see Enabling Packages.
  4. 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

  1. In the Adapters menu in the Integration Server Administrator navigation area, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. Select Configure new listener and then select RFC listener from the list of available listener types.
  4. Complete the following fields on the Configure Listener Type screen (leave all other fields at their default values):
    Field Description/Action
    Package The package in which to create the listener. You must create the package using Designer before you can specify it using this parameter. For general information about creating packages, see IBM webMethods Service Development Help for your release.
    Note: Configure the listener in a user-defined package rather than in the adapter's package. See Package Management for other important considerations when creating packages for Adapter for SAP.
    Folder Name The folder in which to create the listener.
    Listener Name The name of the new listener.
    Program ID The Program ID that you specified when creating the corresponding RFC destination on the SAP system. This field is case sensitive.
    Gateway Host Gateway Host for accessing your SAP system. This must be exactly the same parameter as you chose for the corresponding RFC destination in the SAP system.
    Gateway Service The Gateway Service. This corresponds to your SAP system number. If your SAP system number is "01" then your gateway service is "sapgw01". You can select secured ports beginning from "sapgw00s".
    Number of Threads The number of simultaneous incoming RFCs that this listener can handle.
    Repository Server The outbound connection alias is used as a repository for function interfaces and structure definitions of inbound calls. This way it is possible to use RFCs even if they are not defined in the calling system.
    SNC Enabled Determines whether this server should use SNC. Default: No.
    SNC Quality of Service SNC Quality of service, possible values:
    • Use global build-in default settings
    • Plain text, but authorization
    • Each data packet will be integrity protected
    • Each data packet will be privacy protected
    • Use maximum available security
    SNC Name Your own SNC name if you do not want to use the default SNC name. This is the name you chose when generating a PSE.
    Authorization Service Called by the RFC listener to check for authorization. To provide application specific authorization handling the user might provide a service here that implements specification pub.sap.listener:listenerAuthorizationCheck. This service has to return "Granted" in field "access" if the request should be accepted. If no service is specified access will be granted. If an exception happens during execution of this service or a different string than "Granted" will be returned the access will be denied.

    See pub.sap.listener:listenerAuthorizationCheck for information about the service specification.

    RFC Trace Whether you want RFC tracing enabled or disabled. For a production system, select Off. When you select On, Adapter for SAP collects the trace messages in rfc*.trc files in the directory packages/WmSAP/logs. The location can be changed with the "watt.sap.jco.trace.dir" configuration switch.

    For detailed information about logging, see Logging and Monitoring. For information about changing the directory for the trace files, see watt.sap.jco.trace.dir.

    Log transaction status This switch can be set to On or Off.

    If set to Off, then the processing logs will not be saved, although a transaction will be created (or maintained), and the transaction can be monitored later on in the transaction list.

    Tip: Setting this switch to Off reduces the amount of disk space needed and the time it takes to log the transaction status. It still allows you to check the current transaction status on Adapter for SAP.
    Store message body This switch can be set to On or Off.

    If set to Off, then the message body of the incoming document will not be stored to disk, although a transaction will be created (or maintained), and the transaction can be monitored later on in the transaction list.

    Tip: Setting this switch to Off reduces the amount of disk space needed and of course the time it takes to persist the message body. It still allows you to track the message status on Adapter for SAP.
    Important: An RFC listener must be able to login to the SAP system automatically when it starts up. Additionally, if there are no metadata yet for called function modules in the cache, there must be a log in option to the Repository System as well. Otherwise, it will fail to start up or return errors when receiving incoming RFCs.
  5. Select Save Listener to commit these settings.

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.

Note: When you reload a package that contains enabled listeners, the listeners will be enabled automatically when the package reloads. If the package contains disabled listeners, they will remain disabled when the package reloads.

To enable a listener

Procedure

  1. In the Adapters menu in the navigation area of the Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners. The Listeners screen appears.
  3. Select Enabled from the list in the State field. Integration Server Administrator enables the listener.

    The state changes to "Pending enabled". After refreshing the Listeners page, you should see the state changed to "Enabled".

    After a listener is enabled, a connection exists between Adapter for SAP and the SAP system.

    Tip: The Enable all suspended link helps you change the state quickly for multiple listeners.

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

  1. Toggle back to your SAPGui session. If your screen does not contain a Test Connection toolbar button, take the following steps.
    1. Select Administration >System Administration > Administration > Network > RFC Destinations (SM59).
    2. Open the TCP/IP connections folder.
    3. Select the RFC destination you previously created.
  2. Select the Test Connection toolbar button.
    • If the SAP system can successfully connect to Adapter for SAP RCF listener, it will display connection information as shown below.
    • If you receive an error message, review the steps for creating an RFC Destination and creating an RFC listener to verify your configuration settings.

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
  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.

    The Listeners screen appears, listing all of the current listeners. You can control the number of listeners that are displayed on this screen. For more information, see Controlling Pagination.

  3. To view a listener's parameters:
    1. On the Listeners screen, click the icon for the listener that you want to see.
    2. The View Listener screen displays the parameters for the listener. For descriptions of the listener parameters, see Configuring an RFC Listener.
  4. Click Return to Adapter for SAP Listeners to return to the Listeners screen.

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:
    1. On the Listeners screen, click Filter Listeners.
    2. 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.
    3. Click Submit. The Listeners screen displays the listeners that match the filter criteria.
    4. To re-display all listeners, click Show All Listeners.

Viewing Listeners Using Designer

About this task

To view listeners using Designer

Procedure
  1. Start Designer if it is not already running.
  2. From the Designer Package Navigator view, open the package and folder in which the listener is located.
  3. Double-click the listener you want to view.

    The parameters for the listener appear on the Listener Information tab. For descriptions of the listener properties, see Configuring an RFC Listener.

Viewing the Notification Order of a Listener

About this task

To view the notification order of a listener

Procedure
  1. In the Adapters menu in the navigation area of the Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. On the Listeners screen, click the icon for the listener that you want to view.

    The View Notification Order screen displays the order of the notifications for the listener. To change the notification order for the listener, see Editing the Notification Order of a Listener.

  4. Click Return to Adapter for SAP to return to the Edit Listener screen.

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
  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. On the Listeners screen, make sure that the listener is disabled before editing. To disable the listener, see Disabling Listeners.
  4. On the Listeners screen, click the icon for the listener that you want to edit.

    The Edit Listener screen displays the current parameters for the listener. Update the listener's parameters by typing or selecting the values you want to specify.

    For descriptions of the listener parameters, see Configuring an RFC Listener.

  5. Click Save Changes to save the listener and return to the Listeners screen.

Editing the Notification Order of a Listener

About this task

To edit the notification order of a listener

Procedure
  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. On the Listeners screen, make sure that the listener is disabled before editing. To disable the listener, see Disabling Listeners for details.
  4. On the Listeners screen, click the icon for the listener that you want to edit.
  5. On the Edit Listener screen, click Edit Notification Order.
  6. On the Edit Notification Order screen, use the Up and Down buttons to determine the processing order in which Adapter for SAP invokes the notifications.
    Note: For better processing results, arrange your notifications from ascending to descending order starting with the most detailed notifications to the least detailed notifications. For more information on notifications and their filter criteria, see Dependencies for Listener Notifications.
  7. Click Save Changes to save the notification order of the listener.
  8. Click Return to Edit Listeners to return to the Edit Listener screen.

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

  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. On the Listeners screen, click the icon for the listener that you want to copy.

    The Copy Listener screen displays the current parameters for the listener that you want to copy. Name the new listener and edit any listener parameters as needed by typing or selecting the values you want to specify.

    For descriptions of the listener parameters, see Configuring an RFC Listener.

  4. Click Save Changes to save the listener and return to the Listeners screen.

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.

Important: If you delete Adapter for SAP listener, any notifications that are defined to use the listener will no longer work. You cannot change which listener a notification uses after the notification is configured. However, you can change the parameters for an existing listener. For instructions, see Editing Listeners.

To delete a listener

Procedure

  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. On the Listeners screen, make sure that the listener is disabled before deleting it. To disable the listener, see Disabling Listeners for details.
  4. On the Listeners screen, click the icon for the listener you want to delete.

    Integration Server deletes the listener.

Suspending Listeners

About this task

You can suspend listeners for an indefinite period of time. Suspended listeners cannot be edited or deleted.

Important: Suspending listeners for Adapter for SAP has the same effect as disabling them. For more information about disabling listeners, see Disabling Listeners.

To suspend a listener

Procedure

  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.
  3. On the Listeners screen, select Suspended from the list in the State field. Integration Server Administrator suspends the listener.

    The Suspend all enabled link helps you change the state quickly for multiple listeners.

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

  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, click Listeners.

    The Listeners screen appears.

  3. Select Disabled from the list in the State field. Integration Server Administrator disables the listener.

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

  1. Install IBM webMethods Integration Server and Adapter for SAP on the same machine. For details, see Installing, Upgrading, and Uninstalling the adapter.
  2. 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.
  3. Start Integration Server and Integration Server Administrator, if they are not already running.
  4. Using Integration Server Administrator, make sure that the WmSAP package is enabled. To verify the status of the WmSAP package, see Enabling Packages.
  5. Configure a listener using Integration Server Administrator. For more information on how to configure a new listener, see Configuring an RFC Listener.
  6. 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

Note: Routing notifications are used when no RFC listener notification has been defined. For more information about routing listeners, see Routing Messages Through Adapter for SAP.

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
  1. Start IBM webMethods Designer.
  2. Select New > Adapter Notification and do one of the following:
    • If you are using Designer, be sure the parent namespace is selected and type a name for the adapter notification. Click Next.
  3. Select IBM webMethods Adapter for SAP as the adapter type and click Next.
  4. From the list of available templates, select RFC Listener Notification (synchronous) and click Next.
  5. Select the appropriate Notification Listener Name and click Next.
  6. Select a service and click Next.
  7. Click Finish.

    The Adapter Notification template creates the following items:

    • An RFC synchronous listener notification
    • Two synchronous document types: a synchronous reply document type and a synchronous request document type
    Note: You cannot edit any fields or properties on the Publications Properties tab for the synchronous request and reply document types. Integration Server does not publish these document types.
Configuring a Synchronous RFC Listener Notification
About this task

To configure a synchronous RFC listener notification

Procedure
  1. In the adapter notification service editor for the notification you just created, select the Adapter Settings tab.
  2. In the Adapter Properties area, confirm the adapter name, adapter listener name, and adapter notification template.
  3. In the Execution Mode area, do one of the following to specify an execution mode:
    • To specify a flow service to invoke directly:
      1. Select Service Invoke.

        This option invokes a local flow service directly, returns values from the service as non-publishable documents, and is the default.

      2. Click the Browse button to navigate to and select a service.
    • To publish documents locally or to a Broker and wait for a reply:
      1. Select Publish and Wait.

        This option publishes the request either to the local Integration Server or to the IBM webMethods Broker connected to that Integration Server and waits for a reply.

      2. Select true to publish documents locally (to this Integration Server only) or false to publish to the Broker connected to this Integration Server.

        Note that if no Broker is configured for Integration Server, documents will be published locally.

      3. Specify the number of milliseconds to wait for a reply. The default is -1, which means to wait indefinitely for a reply.
      4. Create a matching Broker/local trigger to process the request document locally or at a remote Integration Server connected to this Integration Server by way of a Broker. Configure the trigger to ensure that the matching reply document is returned to this adapter notification. For more information about this step, see IBM webMethods Service Development Help for your release.
  4. Select the Function Search tab to verify or modify the following.
    Property Description
    Function Pattern All or part of the name of the function module on the SAP system.

    Enter a wildcard-like pattern for the function module for which you want create the notification. You can use exact patterns, or patterns with single or multiple wildcard characters.

    Group Pattern All or part of the name of the Function Group on the SAP system.

    Enter a wildcard-like pattern for the Function Group for which you want create the notification. You can use exact patterns, or patterns with single or multiple wildcard characters.

    Function Name The resulting function module name matching the provided pattern.
    Function Description The function module description, if it is available for that function module.
    Group Name The group name the function module belongs to.
  5. Select Request Field Selection tab to specify which RFC parameters to include in the request document. The request fields are available for mapping steps at design time.
    Note: Irrespective of the selection you make at design time, the adapter makes all fields available in the pipeline at run time.
  6. In the Use column on the Request Field Selection tab, select the boxes for the required request fields. You can also select all fields by using the icon or unselect all fields by using the icon.
  7. Select the Reply Field Selection tab to specify which fields should match the returning message from the notification.
  8. In the Use column on the Reply Field Selection tab, select the boxes for the required reply fields. You can also select all fields by using the icon or unselect all fields by using the icon.
  9. Select the Additional Settings tab to set the Forward confirm event flag. For more information about the Forward Confirm Event Flag, see Forward Confirm Event Flag.
  10. Select the Permissions tab to manage the access control list (ACL) information. Use the drop-down menu to select each of the ACL types. For general information about assigning and managing ACLs, see the IBM webMethods Service Development Help for your release.
  11. From the File menu, select Save (or Save All).

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
  1. Start IBM webMethods Designer.
  2. Select New > Adapter Notification and do one of the following:
    • If you are using Designer, be sure the parent namespace is selected and type a name for the adapter notification. Click Next.
  3. Select IBM webMethods Adapter for SAP as the adapter type and click Next.
  4. From the list of available templates, select ALE Listener Notification (synchronous) and click Next.
  5. Select the appropriate Notification Listener Name and click Next.
  6. Select a service and click Next.
  7. Click Finish.

    The Adapter Notification template creates the following items:

    • An ALE synchronous listener notification
    • Two synchronous document types: a synchronous reply document type and a synchronous request document type
    Note: You cannot edit any fields or properties on the Publications Properties tab for the synchronous request and reply document types. The Integration Server does not publish these document types.
Configuring a Synchronous ALE Listener Notification
About this task

To configure a synchronous ALE listener notification

Procedure
  1. In the adapter notification service editor for the notification you just created, select the Adapter Settings tab.
  2. In the Adapter Properties area, confirm the adapter name, adapter listener name, and adapter notification template.
  3. In the Execution Mode area, do one of the following to specify an execution mode:
    • To specify a flow service to invoke directly:
      1. Select Service Invoke.

        This option invokes a local flow service directly, returns values from the service as non-publishable documents, and is the default.

      2. Click the Browse button to navigate to and select a service.
    • To publish documents locally or to a Broker and wait for a reply:
      1. Select Publish and Wait.
      2. This option publishes the request either to the local Integration Server or to the IBM webMethods Broker connected to that Integration Server and waits for a reply.
      3. Select true to publish documents locally (to this Integration Server only) or false to publish to the Broker connected to this Integration Server.

        Note that if no Broker is configured for the Integration Server, documents will be published locally.

      4. Specify the number of milliseconds to wait for a reply. The default is -1, which means to wait indefinitely.
      5. Create a matching Broker/local trigger to process the request document locally or at a remote Integration Server connected to this Integration Server by way of a Broker. Configure the trigger to ensure that the matching reply document is returned to this adapter notification. For more information about this step, see the IBM webMethods Service Development Help for your release.
  4. Select the IDoc tab to verify or modify the following:
    Property Description
    IDoc type Identifies the type of IDoc expected by the listener notification.
    Cim type The IDoc type extension (CIM type / customer extension type).
    SAP system release The IDoc release.
    Old IDoc type 2 The IDoc version; unchecked for a new version 3 IDoc, checked for old version 2 IDocs (like in 3.1 SAP systems).
    Monitor IDocs Set to "On" to have Adapter for SAP link the IDoc packet's TID with the DOCNUMs of the IDocs in that packet so that later ALE IDoc Monitoring will be possible. Set to "Off" to prevent linking the TID with the DOCNUMS.
  5. Select the Request Field Selection tab to specify which IDoc fields to include in the request document. The request fields are available for mapping steps at design time.
    Note: By default, irrespective of the selection you make at design time, the adapter makes all fields available in the pipeline at run time.
  6. In the Use column on the Request Field Selection tab, select the boxes for the required request fields. You can also select all fields by using the icon or unselect all fields by using the icon.
  7. Select the Additional Settings tab to set the Forward confirm event flag. For more information about the Forward Confirm Event Flag, see Forward Confirm Event Flag.
  8. Select the Permissions tab to manage the access control list (ACL) information. Use the drop-down menu to select each of the ACL types. For general information about assigning and managing ACLs, see the IBM webMethods Service Development Help for your release.
  9. From the File menu, select Save (or Save All).

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.

Important: Before you select a different service, make sure that you have disabled the notification. When the notification is enabled, the new service is utilized. To disable the notification, see Disabling Listener Notifications.

To edit the notification service

Procedure
  1. From Designer, in the adapter notification service editor, select the Adapter Settings tab.
  2. In the Execution Mode area, click the Browse button next to the service.
  3. Locate and select a new service.
  4. Click OK.
  5. 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
  1. Start Designer.
  2. Select New > Adapter Notification and do one of the following:
    • If you are using Designer, be sure the parent namespace is selected and type a name for the adapter notification. Click Next.
  3. Select IBM webMethods Adapter for SAP as the adapter type and click Next.
  4. From the list of templates, select RFC Listener Notification (asynchronous) and click Next.
  5. Select the appropriate Notification Listener Name and click Next.
  6. Click Finish.

    The Adapter Notification template creates the following items:

    • An RFC asynchronous listener notification
    • A Publish Document Type
Configuring an Asynchronous RFC Listener Notification
About this task

To configure an asynchronous RFC listener notification

Procedure
  1. In the adapter notification service editor for the notification you just created, select the Adapter Settings tab.
  2. In the Adapter Properties area, confirm the adapter name, adapter notification name, and adapter notification template.
  3. In the Publish Document to area, do one of the following:
    • To publish to the Broker connected to the local Integration Server:
      1. Select IBM webMethods Broker/Local.

        This option publishes documents to the local Integration Server or to the Broker connected to that Integration Server, if one is configured. This is the default.

    • To publish to JMS:
      1. Select JMS Provider.

        This option publishes documents in the form of messages to a JMS provider.

      2. Click the Browse button next to Connection alias name.
      3. Select the name of the connection alias as it is configured on Integration Server and then click OK.

        If the connection alias is a Broker Cluster configured with Multisend Guaranteed policy, you must add the watt property watt.art.notification.jmsSend.usePublicService and set it to true.

        Adapter Runtime does not support LOCAL_TRANSACTION and XA_TRANSACTION type JMS connection alias.

      4. Type the destination name defined in the JMS provider to specify the target of messages the client produces and the source of messages it consumes.
      5. Specify whether the destination is a Queue or a Topic. The default is Queue.
  4. Create a matching Broker/local or JMS trigger to process the request document locally, at a remote Integration Server connected to this Integration Server by way of a Broker, or to a JMS provider, depending on the "publish to" destination you selected in the previous step. Configure the trigger to ensure that the matching reply document is returned to this adapter notification.
  5. Select the Function Search tab to verify or modify the following:
    Property Description
    Function Pattern All or part of the name of the function module on the SAP system.

    Enter a wildcard-like pattern for the function module for which you want create the notification. You can use exact patterns, or patterns with single or multiple wildcard characters.

    Group Pattern All or part of the name of the Function Group on the SAP system.

    Enter a wildcard-like pattern for the Function Group for which you want create the notification. You can use exact patterns, or patterns with single or multiple wildcard characters.

    Function Name The resulting function module name matching the provided pattern.
    Function Description The function module description, if it is available for that function module.
    Group Name The group name the function module belongs to.
  6. Select the Request Field Selection tab to specify which RFC parameters to include in the publishable document. The request fields are available for mapping steps at design time.
    Note: Irrespective of the selection you make at design time, the adapter publishes all fields available to the Broker at run time.
  7. In the Use column on the Request Field Selection tab, select the boxes for the required request fields. You can also select all fields by using the icon or unselect all fields by using the icon.
  8. Select the Permissions tab to manage the access control list (ACL) information. Use the drop-down menu to select each of the ACL types. For general information about assigning and managing ACLs, see the IBM webMethods Service Development Help for your release.
  9. From the File menu, select Save (or Save All).

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
  1. Start Designer.
  2. Select New > Adapter Notifications and do one of the following:
    • If you are using Designer, be sure the parent namespace is selected and type a name for the adapter notification. Click Next.
  3. Select IBM webMethods Adapter for SAP as the adapter type and click Next.
  4. From the list of templates, select ALE Listener Notification (asynchronous) and click Next.
  5. Select the appropriate Notification Listener Name and click Next.
  6. Click Finish.

    The Adapter Notification template creates the following items:

    • An ALE asynchronous listener notification
    • A Publish Document Type
Configuring an Asynchronous ALE Listener Notification
About this task

To configure an asynchronous ALE listener notification

Procedure
  1. In the adapter notification service editor for the notification you just created, select the Adapter Settings tab.
  2. In the Adapter Properties area, confirm the adapter name, adapter notification name, and adapter notification template.
  3. In the Publish Document to area, do one of the following:
    • To publish to the Broker connected to the local Integration Server:
      1. Select IBM webMethods Broker/Local.

        This option publishes documents to the local Integration Server or to the Broker connected to that Integration Server, if one is configured. This is the default.

    • To publish to JMS:
      1. Select JMS Provider.

        This option publishes documents in the form of messages to a JMS provider.

      2. Click the Browse button next to Connection alias name.
      3. Select the name of the connection alias as it is configured on Integration Server and then click OK.

        If the connection alias is a Broker Cluster configured with Multisend Guaranteed policy, you must add the watt property watt.art.notification.jmsSend.usePublicService and set it to true.

        Adapter Runtime does not support LOCAL_TRANSACTION and XA_TRANSACTION type JMS connection alias.

      4. Type the destination name defined in the JMS provider to specify the target of messages the client produces and the source of messages it consumes.
      5. Specify whether the destination is a Queue or a Topic. The default is Queue.
  4. Create a matching Broker/local or JMS trigger to process the request document locally, at a remote Integration Server connected to this Integration Server by way of a Broker, or to a JMS provider, depending on the "publish to" destination you selected in the previous step. Configure the trigger to ensure that the matching reply document is returned to this adapter notification.
  5. Select the IDoc tab to verify or modify the following:
    Property Description
    IDoc type Identifies the type of IDoc expected by the listener notification.
    Cim type The IDoc type extension (CIM type / customer extension type).
    SAP system release The IDoc release.
    Old IDoc type 2 The IDoc version; unchecked for a new version 3 IDoc, checked for old version 2 IDocs (like in 3.1 SAP systems).
    Monitor IDocs Set to "On" to have Adapter for SAP link the IDoc packet's TID with the DOCNUMs of the IDocs in that packet so that later ALE IDoc Monitoring will be possible. Set to "Off" to prevent linking the TID with the DOCNUMS.
  6. Select the Request Field Selection tab to specify which IDoc fields to include in the publishable document. The request fields are available for mapping steps at design time.
    Note: By default, irrespective of the selection you make at design time, the adapter publishes all fields available to the Broker at run time.
  7. In the Use column on the Request Field Selection tab, select the boxes for the required request fields. You can also select all fields by using the icon or unselect all fields by using the icon.
  8. Select the Permissions tab to manage the access control list (ACL) information. Use the drop-down menu to select each of the ACL types. For general information about assigning and managing ACLs, see the IBM webMethods Service Development Help for your release.
  9. From the File menu, select Save (or Save All).

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

  1. In the Adapters menu in Integration Server Administrator navigation area, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, select Listener Notifications.
  3. On the Listener Notifications screen, click No in the Enabled column for the listener notification you want to enable.

    Integration Server Administrator enables the listener notification and displays a and Yesin the Enabled column.

Testing Listener Notifications

About this task

You can test listener notifications to ensure that you have configured them correctly.

To test listener notifications

Procedure

  1. Configure a listener using Integration Server Administrator. For instructions to configure a listener, see Configuring an RFC Listener.
  2. Configure a listener notification using Designer. For instructions to configure a notification, see Configuring Listener Notifications.
  3. Enable the listener notification using Integration Server Administrator. For instructions to enable a listener notification, see Enabling Listener Notifications.
  4. Enable the listener using Integration Server Administrator. For instructions to enable a listener, see Enabling Listeners.
  5. 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.

Note: In Designer, prior to running the PublishDocument, first uncheck the Field must exist at run-time field on the msgBody property. To access the field, right-click msgBody, select Properties, and then select the Constraints tab. When you test a publishable document type, Integration Server actually publishes the document locally or to Broker (whichever is specified).

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
  1. In the Adapters menu in the navigation area of Integration Server Administrator, click IBM webMethods Adapter for SAP.

    The Listener Notifications screen appears, listing all the listener notifications. You can control the number of listener notifications that are displayed on this screen. For more information, see Controlling Pagination.

  2. In Adapter for SAP menu, click Listener Notifications.

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:
    1. On the Listener Notifications screen, click Filter Listener Notifications.
    2. 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.
    3. Click Submit. The Listener Notifications screen displays the listener notifications that match the filter criteria.
    4. 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
  1. In Designer, expand the package and folder that contain the listener notification you want to view.
  2. Select the listener notification that you want to view.

    The adapter's Adapter Notification Editor displays details about the configured listener notification.

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

  1. In Designer, expand the package and folder that contain the listener notification you want to edit.
  2. Select the listener notification you want to edit.

    The adapter's Adapter Notification Editor displays details about the configured listener notification.

  3. Modify the values for the listener notification's parameters as needed. For detailed descriptions of the listener notification's parameters, see Configuring Listener Notifications for the specific type of listener notification that you want to edit.
    Note: Because listener notifications inherently depend on listeners, you cannot change a listener for a listener notification after you configure it.

Editing Document Types Used by the Listener

About this task

To edit the document types used by the listener

Procedure
  1. In Designer, expand the package and folder that contain the document type that you want to edit.
  2. Open the listener notification for the document that you want to edit.
  3. 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.

Important: If you delete a synchronous listener notification, the associated request and reply document types are deleted automatically.

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

  1. In Designer, expand the package and folder that contain the listener notification you want to delete.
  2. 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

  1. In the Adapters menu in Integration Server Administrator navigation area, click IBM webMethods Adapter for SAP.
  2. In IBM webMethods Adapter for SAP menu, select Listener Notifications.
  3. 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.

Note: An Adapter for SAP inbound call is an outbound call from the SAP system's point of view.

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.

Note: The following steps require that you have developer-level access on your SAP system and some basic knowledge of the ABAP Workbench and function modules.

To create a function module in an SAP system

Procedure
  1. Using the SAPGui, go to the ABAP Function Library. Select Tools > ABAP Workbench (SE37).
  2. Create a function group, for example: Z_FG01 (Menu Goto > Function groups > Create group).
  3. Enter Z_IS_PRODUCT in field Function module. This is the name of your SAP product retrieval function.
  4. Select Create.
  5. Complete the following dialogs in accordance with the policies governing your SAP development environment. The only aspect relevant to Adapter for SAP is the field Processing type. Select Remote-Enabled Module to allow this function to call externally to Adapter for SAP.
  6. Define the import/export parameters of your function. Add an import named sku. You must provide an Reference Type field. Pick a character field with a length greater than 5. For this example, use CHAR100.
  7. Add six exports: name, product_type, product_length, product_width, price, availability. Again, you must provide Reference Type fields for each of the exports. For this tutorial, use CHAR100 for these parameters.
  8. Mark Pass Value for all parameters.
  9. Save your function module and activate it.

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
  1. Open Designer and select File > New > Adapter Notification. .
  2. Select the destination directory and enter the name of the new notification. Click Next
  3. Select IBM webMethods Adapter for SAP from the list of available adapter types. Click Next.
  4. From the list of available templates, select RFC Listener Notification. Click Next.
  5. Select a previously created RFC listener. The listener corresponds to the RFC destination you have created on the SAP system that hosts the function module for which you want to create the adapter notification. Click Next.
  6. Select the service that should be invoked by this adapter notification. (In this case, app:getProductData.) Click Next and then Finish.
  7. On the Function Search tab, in the Function Pattern field, enter all or part of the name of the function module for which you want to create an RFC adapter notification. Use pattern-matching characters if you are unsure of the complete name and want Adapter for SAP to search for several RFCs with similar names.

    For this example, enter Z_IS_* in the Function Pattern field.

    A list of RFC names that match the criteria is displayed.

  8. Select the name of the RFC for which you want to create an adapter notification. For this example, use Z_IS_PRODUCT.
    Note: If the RFC you expect to see is missing from the list, you might not have defined your RFC Connection correctly. Review the steps in Configuring Adapter Connections.
  9. Click Save to save your RFC adapter notification. Leave all other fields at their default values.

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
  1. Enable the RFC adapter notification.
  2. Ensure that an RFC Listener is running by doing the following:
    1. In the Adapters menu in the Integration Server Administrator navigation area, click IBM webMethods Adapter for SAP.
    2. In Adapter for SAP menu, click Listeners.
    3. Verify that the RFC listener you created for the RFC destination on the SAP system hosting Z_IS_PRODUCT shows status "Enabled", indicating that the listener is started and active.

      If the status is "Pending enabled", refresh the listener screen until the listener has status "Enabled". If no listener appears in the list, refer to Listeners.

  3. In an SAPGui session, go to the ABAP Workbench(SE37) to test your new function module.
  4. Enter Z_IS_PRODUCT in field Function module and select Single test.
  5. In the RFC target system field, type the name of your RFC Destination (in this example ISCER).
  6. In the sku field, enter a SKU. For this example, the SKU's that are available are A, B, C, D, or E. Case is not important.
  7. Execute (F8) the RFC by selecting the appropriate toolbar button or selecting Execute from the Function modules menu.
  8. You will receive the product data in your exports list similar as shown in the following figure.
    Note: If you receive an error from Adapter for SAP, make sure your RFC adapter notification is correct and that the app:getProductData flow service is available and functional.

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:

  1. Create an Empty Flow Service Called mapOrders02
  2. Create an Asynchronous ALE Listener Notification for IDoc Type Orders02
  3. Define the Input and Output Signatures for the mapOrders02 Service
  4. Map Fields from Orders02RequestDocument to PurchaseOrder Document
  5. 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
  1. In Designer, select the package that contains the ALE notification and right-click to open the shortcut menu. Click New, then Folder, and name the new folder "apps".
  2. Select the apps folder and create a subfolder called "idocs".
  3. On the File menu, click New and create an empty flow service called mapOrders02. Save the service in the apps\idocs directory.

    You will select this service when creating a listening notification.

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
  1. From the File menu, select New > Adapter Notification and then click Next.
  2. Select IBM webMethods Adapter for SAP as the adapter type and click Next.
  3. Select ALE Listener Notification (synchronous) from the template and click Next.
  4. Name the listener notification "Orders02", and select the app\idocs folder. Click Next.
  5. Select the service you created in Create an Empty Flow Service Called mapOrders02, click Next and then click Finish.
  6. Select the IDoc tab and change the IDoc type field to "ORDERS02".
  7. Select the Request Field Selection tab and click the icon.
  8. 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
  1. Open the mapOrders02 service and select the Input/Output tab.
  2. For the Input field, open the Select dialog and select the apps\idocs\Orders02RequestDocument.
  3. 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
  1. Add a map step.
  2. 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
  1. 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.
  2. Delete the savePipelineToFile service and insert the restorePipelineFromFile service.
  3. 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.
  4. When you are finished testing, delete the restorePipelineFromFile service and save the finished flow.

Setting Up the SAP System

Note: You perform the following procedures on the SAP system. Due to differences among SAP systems versions and across platforms, these procedures can differ slightly from what you need to do. They should be used as a general guide to the steps you need to take.

To set up an SAP system to send IDocs to Adapter for SAP, use the SAPGui to perform the following steps:

  1. Create an RFC Destination
  2. Define a Logical Port
  3. Create a Partner
  4. Create a Partner Profile
  5. Create a Distribution Model for the Partner and Message Type with SAP System 4.5 or Earlier
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
  1. In the Main screen, select Tools > Business Communication > IDoc-Basis > IDoc > Port Definition.
  2. Select the Transactional RFC tree item and click Create.
  3. On the toolbar, click New Entries.
  4. Either select your own descriptive port name or let the system generate one.
  5. 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
  1. In the Main screen, select Tools > AcceleratedSAP > Customizing > Project Management.
  2. Select SAP Reference IMG.
  3. 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).
  4. Select Define Logical System.
  5. Click New Entries.
  6. 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
  1. In the Main screen, select Tools > Business Communication > IDoc-Basis > IDoc > Partner profile.
  2. Select the LS (logical system) partner type in the tree view and click Create.
  3. Enter in the Partner field the partner you created in Create a Partner, and save the partner profile.
  4. Below the outbound parameter table control, click Insert entry.
  5. Enter the message type of the IDoc, (for example: MATMAS).
  6. Enter the logical receiver port you created before and enter the basic type of the IDoc, (for example: MATMAS03).
  7. Save the outbound parameter.
  8. Below the inbound parameter table control, click Insert entry.
  9. Enter the message type of the IDoc, (for example: MATMAS) and the process code, (for example: MATM).
  10. 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
  1. In the Main screen, select Tools > Business Framework > ALE > Customizing.
  2. Open the Cross-Application Components folder, then the Distribution (ALE) folder, then the Distribution Customer Model folder in the tree view.
  3. Select Maintain customer distribution model.
  4. Create a new model using Model > Create.
  5. 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
  1. In the Main screen, select Tools > AcceleratedSAP > Customizing > Project Management.
  2. Select SAP Reference IMG.
  3. Expand the following nodes: Basis Components > Distribution (ALE) > Modelling and Implementing Business Processes > Maintain Customer Distribution Model.
  4. Select Maintain Customer Distribution Model (BD64).
  5. Change into the edit mode.
  6. Select Create model view.
  7. Enter a short text string and a technical name for your new model view.
  8. Select your new model view in the tree Distribution Model, and select Add message type.
  9. In the dialog box, enter the sender (for example: CERCLNT800), the receiver (your logical system), and the message type (MATMAS).