Inbound Processing Examples

These examples show two possible inbound processing scenarios.

This section contains examples for the following inbound processing scenarios:

  • Sending an IDoc using Application Linking and Enabling (ALE) to an SAP system
  • Starting an SAP Business Application Programming Interface (BAPI) module to retrieve and return company information to Sterling B2B Integrator

Sending an IDoc Using ALE

The following example illustrates an SAP Suite adapter for JCo 3.x configuration used to send an IDoc document using ALE technology:

The following example using the GPM illustrates a business process that uses the SAP Suite adapter for JCo 3.x to send an IDoc using ALE technology to an SAP system. The uneditable values were specified on the SAP Suite adapter for JCo 3.x configuration instance.

The following example illustrates the same business process using BPML. The IDoc file orders.dat is the input passed to the business process and becomes the primary document. The primary document is input to the SAP Suite adapter for JCo 3.x.

The following example illustrates information returned from SAP to the business process, indicating that the SAP system transaction manager allowed Sterling B2B Integrator to open a transaction:

Starting an SAP BAPI Module

The following example illustrates an SAP Suite adapter for JCo 3.x configuration used to start a BAPI in an SAP system to retrieve company information.

The following example illustrates the input passed to the business process.

The following example using the GPM illustrates a business process that uses the SAP Suite adapter for JCo 3.x to start the BAPI_COMPANY_GETDETAIL BAPI. The uneditable values were specified in the SAP Suite adapter for JCo 3.x configuration instance.

The following example illustrates the same business process using BPML.

The following example illustrates the company information returned from SAP to the business process as a primary document. The information is returned in XML format.

<BAPI_COMPANY_GETDETAIL>
 <COMPANYID>999999</COMPANYID>
 <COMPANY_DETAIL> 
<COMPANY>999999</COMPANY> 
<NAME1>HANDSOME, INC</NAME1> 
<NAME2/>
 <COUNTRY>USA</COUNTRY> 
<LANGU>E</LANGU> 
<STREET>5555 EAST MARTIN AVE</STREET> 
<PO_BOX/> 
<POSTL_COD1>80220</POSTL_COD1> 
<CITY>DENVER</CITY> 
<CURRENCY>DOLLAR</CURRENCY>
 <COUNTRY_ISO>USA</COUNTRY_ISO>
 <CURRENCY_ISO>DOLLAR</CURRENCY_ISO> 
<LANGU_ISO>USA</LANGU_ISO> 
</COMPANY_DETAIL> 
<RETURN> 
<TYPE/>
 <CODE/> 
<MESSAGE/> 
<LOG_NO/>
 <LOG_MSG_NO>000000</LOG_MSG_NO> 
<MESSAGE_V1/>
 <MESSAGE_V2/> 
<MESSAGE_V3/> 
<MESSAGE_V4/> 
</RETURN> 
</BAPI_COMPANY_GETDETAIL>

In addition, the SAP Suite returns session information from the SAP system and puts it in the process data of the initiating business process. For example:

<?xml version="1.0" encoding="UTF-8"?> 
<ProcessData> 
 <PrimaryDocument SCIObjectID="server1:252e596c:fb4e22589c:-76b0"/> 
 <BapiCallReturnStructure> 
    <RETURN> 
     <TYPE>[S|E|  ]</TYPE>    // possible valuesS or empty = Success, E = Error
    <CODE></CODE>
    <MESSAGE></MESSAGE>
    <LOG_NO></LOG_NO>
     <LOG_MSG_NO>000000</LOG_MSG_NO> 
    <MESSAGE_V1></MESSAGE_V1>
    <MESSAGE_V2></MESSAGE_V2>
    <MESSAGE_V3></MESSAGE_V3>
    <MESSAGE_V4></MESSAGE_V4>
   </RETURN> 
  </BapiCallReturnStructure> 
</ProcessData>