WebSphere business objects for the ABAP Extension Module can be defined in SAP as an IDoc. IDocs are part of SAP's EDI solution known as ALE (Application Link Enabling). Their definitions are stored in SAP's BOR (Business Object Repository) and can be accessed globally within an SAP system. The IBM WebSphere Business Integration Adapter for mySAP.com leverages the definition part of ALE to interpret and parse WebSphere business objects in the SAP application in preparation for use with an SAP native API. The adapter provides an IDoc handler that supports business objects developed using IDocs.
IDoc handler is made up of two function modules. Other ABAP handlers such as Dynamic Retrieve and Dynamic Transaction are only a single function module.
Y_XR_DO_VERB_NEXTGEN passes business object data to IDoc handler, Y_XR_IDOC_HANDLER. Based on the application-specific information, Y_XR_IDOC_HANDLER reformats the business object data into the structure of the IDoc specified by the application-specific information. After reformatting, the business object data is passed to an object-specific IDoc handler (based on the object/verb combination of the business object) that handles the integration with an SAP native API. Once the object-specific IDoc handler finishes processing the business object data, it returns the business object data in IDoc format to Y_XR_IDOC_HANDLER. The business object data is now converted back to its original format and returned to Y_XR_DO_VERB_NEXTGEN.
Figure 17 illustrates the basic architecture of an IDoc handler.
Figure 17. IDoc
handler architecture
To use the adapter-provided IDoc handler, you must have an IDoc defined in the SAP application. Either SAP-delivered or customer-built IDocs can be used. Because an IDoc definition must mirror the definition of the WebSphere business object for SAP, the adapter provides a tool in IBM WebSphere InterChange Server Connector Tool (transaction YXR1) that you can use to generate the WebSphere business object definition based on the IDoc.
Before you can generate a business object definition, you must have already created a WebSphere business object in the SAP application. To create a business object definition based on an IDoc:
For more information on how the application-specific information is used for the verb functions, see "Business object data routing to ABAP handlers".
After defining the IDoc, create a function module for each verb the business object must support. Each function should have the following interface to ensure that Y_XR_IDOC_HANDLER can call it:
*" IMPORTING *" VALUE(OBJECT_KEY_IN) LIKE YXR_EVENT-OBJ_KEY OPTIONAL *" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD *" OPTIONAL *" VALUE(LOG_NUMBER) LIKE YXR_LOG_H-LOG_NR OPTIONAL *" EXPORTING *" VALUE(OBJECT_KEY_OUT) LIKE YXR_EVENT-OBJ_KEY *" VALUE(RETURN_CODE) LIKE YXR_RFCRC-YXR_RFCRC *" VALUE(RETURN_TEXT) LIKE YXR_EVENT-OBJ_KEY *" TABLES *" IDOC_DATA STRUCTURE EDIDD