Adapter for SAP 10.1 | webMethods Adapter for SAP Documentation | webMethods Adapter for SAP Installation and User’s Guide Documentation | Using IFR-XML Format with Adapter for SAP | XML Format for BAPIs | Structure of Response Business Documents for BAPIs
 
Structure of Response Business Documents for BAPIs
A response business document is returned to the sender if the BAPI call could be processed without application errors. This means that the BAPI-return parameter only contains messages of the type S, I, or W. In that case, the Response business document contains the export parameters of the BAPI call.
This is the structure of response business documents for BAPIs:
<doc:BusinessObjektName.MethodenName.Response
xmlns:doc="urn:sap-com:document:sap:business"
[Key1="…", Key2="…", …]>
<BOR_Parameter1>...</BOR_Parameter1>
...
</doc:BusinessObjektName.MethodenName.Response>
Additionally, consider the following:
*The arrangement of BAPIs according to a business object is directly reflected by the element names of the business document. The root element that identifies the request business document carries the concatenation of the business object name, the BOR method name and the suffix .Response as its name. The root element has the following characteristics:
*It contains the namespace reference of business documents that refer to BAPIs ("urn:sap-com:document:sap:business").
*If the BAPI is an instance method or a factory method, the root element contains an attribute for each key field of the corresponding business object that has the same name as the key field.
Important:
If the business object has more than one key field, the corresponding attributes should appear in the same sequence as the key fields defined in the BOR.
*Export parameters of the BAPI appear as sub-elements of the root element. These sub-elements have the same name as the parameters defined in the BOR. Within these elements, the SAP-internal data structures are presented in a serialized form in accordance with the specification Serialization of ABAP Data in XML.
*If the BAPI is a factory method, possibly only the key fields of the created instance will be returned to the client. In this case, the response business document only consists of attributes.