Adapter for SAP 10.1 | webMethods Adapter for SAP Documentation | webMethods Adapter for SAP Installation and User’s Guide Documentation | Routing Messages Through Adapter for SAP | Sending a BAPI from an SAP System to Adapter for SAP | Dynamic Routing Using the XML Transport
 
Dynamic Routing Using the XML Transport
It is not always necessary to specify routing notifications. If you want to call a BAPI from an ABAP report in your SAP system, you can also add the SBCHEADER parameter to your function module call. This parameter can be filled with key-value pairs that describe in detail how the message should be routed. At the moment, it is only possible to route BAPI-calls to the XML transport. To do this, use the following key pairs in the SBCHEADER table:
Name
Value
Transport
XML
url
The destination URL for the HTTP post operation
xmlType
bXML
httpUser (optional)
An optional parameter that allows you to specify a username for authentication on the remote web system
httpPassword (optional)
An optional parameter which allows you to specify a password for authentication on the remote web system
useBAPI
Set this value to YES if you want to use the BAPI XML format. If you omit this value or set it to something different than YES, the message will be sent as RFC based XML in a BizTalk XML envelope.
objectName
The name of the business object, to which the call should be mapped. This value has to be case-sensitive.
bapiName
The name of the BAPI method, to which the call should be mapped. This value is case-sensitive.
xsender
A value that should be put in the header element <from> <address>. See senderType for further details.
senderType (optional)
An optional format descriptor, defining the sender address type. Default is LogSys for logical systems. Logical system names are automatically converted to an URN by an SAP defined schema. Alternatively, you can set senderType.
xreceiver
A value that should be put in the header element <to> <address>. See receiverType for further details.
receiverType (optional)
An optional format descriptor, defining the receiver address type. Default is LogSys for logical systems. Logical system names are automatically converted to an URN by an SAP defined schema. Alternatively, you can set receiverType.
useTextXml
Flag that allows to overwrite the content-type to text/xml, if set to Yes (for SAPXML and bXML).
useUTF8
Flag that allows to force the renderers to use the encoding utf-8, if set to Yes (for SAP-XML and bXML).
For sending RFC based XML messages, only the first five parameters are supported. You can specify this parameter to your ABAP RFC as follows:
DATA header like SBCCALLENV occurs 1 with header line.
*... some code lines omitted
CALL FUNCTION 'BAPI_COMPANYCODE_GETLIST'
DESTINATION 'ISCER'
IMPORTING
RETURN = returnCode
TABLES
COMPANYCODE_LIST = companyCodes
SBCHEADER = header
.
For a synchronous example, see Calling a BAPI Synchronously from SAP System. For an asynchronous example, see Calling a BAPI Asynchronously from an SAP System.