SAP Invoke BAPI activity

Use the SAP Invoke BAPI activity to call a Business Object Method (BAPI), that is remotely enabled at the specified SAP Endpoint, during run time.

Note: To connect to the SAP System from Studio, you must download and install the SAP Jar files and DLLs onto your Window's development machine. For more information, see Downloading and installing the SAP Jar Files and DLLs.

Adding a SAP Invoke BAPI activity in the orchestration

  1. Create or open an orchestration. A graphical representation of the orchestration is displayed.
  2. Select the Activities tab and expand the SAP folder.
  3. Drag the SAP Invoke BAPI activity onto the orchestration.
  4. Select the activity. The Checklist is displayed.

Creating, selecting, or editing a SAP endpoint

  1. Click Pick Endpoint task from the Checklist and select one of the following actions:
    • Select an existing endpoint:
      1. Select Browse. The Project Explorer is displayed.
      2. Select an existing endpoint and click OK. Go to the Configuring the activity procedure.
    • Select an existing endpoint and edit the endpoint:
      1. Select Browse. The Project Explorer is displayed.
      2. Select an existing endpoint and click OK.
      3. Click Edit. The Edit Endpoint pane is displayed.
    • Create a new endpoint: Select New. The Create Endpoint panel is displayed.
  2. Create or Edit a SAP endpoint.

Configuring the activity

  1. Select the Configure task from the Checklist. The Configure panel is displayed.
  2. In the Object Name field click Browse.... The BAPI List dialog box is displayed.
  3. Search for a Business Object. Click a Business Object in the list and enter the starting characters of the Business Object name.
  4. Expand the Business Object to view the associated BAPI methods.
  5. Select a Business Object and Method and click OK.
  6. Select one of the following Transaction Options:
    • Do Nothing (Transaction handled by BAPI directly) - During run time, the Integration Appliance calling the BAPI does no transaction processing. If a transaction is associated with the BAPI, the BAPI must completely handle the transaction
    • Commit transaction after completion -  During run time, the Integration Appliance calls the BAPI and waits for a return message from the SAP System. The return code of the message returned from the SAP System determines if the Integration Appliance sends another message requesting that the SAP System to commit or rollback the transaction:
      • If the return code passed back from the BAPI indicates success, the Integration Appliance sends another message requesting that the SAP System commit the transaction and immediately starts processing the next activity in the orchestration.
      • If the return code passed back from the BAPI indicates failure, the Integration Appliance sends a rollback request to the SAP System and immediately starts processing the next activity in the orchestration.
    • Commit transaction and wait upon completion -  During run time, the Integration Appliance invokes the BAPI and waits for a return message from the SAP System. The return code of the message returned from the SAP System determines if the Integration Appliance sends another message requesting that the SAP System to commit or rollback the transaction:
      • If the return code passed back from the BAPI indicates success, the Integration Appliance sends another message requesting that the SAP System commit the transaction. The orchestration waits until the SAP System sends a second message indicating that the transaction has been committed before processing the next activity in the orchestration.
      • If the return code passed back from the BAPI indicates failure, the Integration Appliance sends a rollback request to the SAP System. The orchestration waits until the SAP System sends a second message indicating that the rollback of the transaction has occurred before processing the next activity in the orchestration.

Specifying the retry options

  1. Select the Retry task from the Checklist. The Retry panel is displayed.
  2. Configure the retry options for connecting to an SAP System. The following table describes the retry options for connecting to an SAP System:  
    Retry options Description
    1) Wait ___ seconds between each retry. Specifies the number of seconds that the Integration Appliance waits before trying to establish a connection to the SAP System.
    2) Try to connect ___ times before failing. Specifies the maximum number of times the Integration Appliance attempts to establish a connection to the SAP System before issuing an error and stopping the processing of the current orchestration job. If you deploy an orchestration that contains an SAP Invoke BAPI activity and the Integration Appliance cannot connect to the specified SAP System, the Integration Appliance logs the connections errors as warnings in the system and orchestration logs until the retry count value is reached. When the retry count is reached, the Integration Appliance logs an error in the system and orchestration logs and the stops processing the current orchestration job. For example, you set the retry count to 3. The first, second, and third connection errors appear in the system log as warnings. The Integration Appliance logs the fourth connection error as an error and stops processing the current orchestration job.

Mapping the inputs of the activity

  1. Select the Map Inputs task in the Checklist. The XML Schemas generated from the input parameters of the BAPI are displayed as nodes under the request input parameter in the To Activity panel. In addition if the BAPI contains tables, the XML Schemas representing the tables of the BAPI , are displayed as nodes under the request input parameter in the To Activity panel.

    The SAP connector also supports dynamic endpoint connection to a different SAP system. During run time, add optional parameters in sapConnectionProperties of map inputs, if you want to dynamically connect to an SAP system other than the one configured in the endpoint panel, if you want to connect to the same SAP system with a different user name and password other than the fields used in the endpoint panel, or if you want a different SSO token other than the one added in the endpoint panel. The parameters of sapConnectionProperties are described in the following table:
    Table 1. Connection properties
    Optional parameter Description
    sapConnectionProperties parameters
    hostName Specifies the IP Address or the machine name that contains the SAP system.
    systemNumber Specifies the number that identifies the specific instance of the SAP system that Studio should connect to. Your SAP administrator must supply this information.
    client Specifies a number that identifies Studio and the Integration Appliance as a client for the SAP system. Your SAP administrator must supply this information.
    language Specifies the message language option for SAP. For example, EN is the ISO code for English.
    basicAuthentication parameters
    username Specifies the user name to use when connecting to the SAP system.
    password Specifies the password to the user name when connecting to the SAP system.
    ssoAuthentication parameters
    ssotoken Specifies the single sign-on (SSO) token.
    sncAuthentication parameters
    sncmode Specifies if the Secure Network Connections (SNC) mode is enabled.
    sncname Specifies the distinguished name of the SNC connection.
    partner Specifies the distinguished name of the SNC partner.
    qop Specifies the level of security of SNC.
    X509 Certificate Specifies the X509 certificate to be used as the logon ticket. This field is optional only if Username/Password based authentication is used with SNC.
    connectionPool parameters
    maximumConnections Specifies the additional SAP connections, up to the specified amount, which the Integration Appliance opens based on the message load.
    maxIdleTime Specifies the number of minutes that a SAP connection can be open and idle before being closed by the Integration Appliance.
  2. Create a map between orchestration variables and the BAPI input parameters and tables. See Creating a map for general instructions on mapping.

    Values must be provided at run time for any mandatory elements of the BAPI input parameters or tables. A value can be provided by specifying a default value for element or by linking the element with input node. During run time if no value is provided for a mandatory element, the activity throws an exception during run time which is reported by the Web Management Console (WMC). If a value is not provided at run time for an optional element of the BAPI input parameters or tables, no exception is thrown during run time.

Mapping the outputs of the activity

  1. Select the Map Outputs task in the Checklist. The XML Schema generated from return types of the BAPI display as nodes under the response output parameter in the From Activity panel. In addition, if the BAPI contains tables, the XML Schemas representing the tables are displayed as nodes under the response node in the From Activity.
  2. Create a map between the BAPI output parameters and tables and orchestration variables. See Creating a map for general instructions on mapping.

Note about deploying a SAP orchestration

Before you can deploy an orchestration with SAP activities using the WMC, the Integration Appliance must first be able to establish a connection to the SAP System. If the Integration Appliance is unable to establish the connection to the SAP System, the orchestration is not deployed.




Feedback | Notices


Timestamp icon Last updated: Thursday, December 17, 2015


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/SAP_Invoke_BAPI_Activity.html