Flat structure conversion to a business object

Once the flat structure has been repopulated with new business object data, /CWLD/RFC_DO_VERB_NEXTGEN returns the business object data to the calling connector. Remember that the connector is single-threaded; therefore, it passes only one business object at a time. The connector must now convert the business object data from the flat structure into a business object. When processing data in a flat structure into a business object, the connector must:

  1. Initialize the original business object.
  2. Transfer the business object data from the flat structure to the business object.
  3. Deliver the business object to InterChange Server (connector controller).

Business object initialization

The connector initializes the original business object that it received from the integration broker before it populates it. When initializing the business object, the connector sets every attribute in the top-level business object to null. For object type attributes, this action recursively deletes every contained business object, leaving only the top-level business object.

How the connector rebuilds a business object

After the connector initializes the original business object, what remains is the top-level business object containing the business object name and business object verb, but no attribute value data. The attribute value data must be transferred from the flat structure from the ABAP handler. The logic for transferring the returned data is simple, but the data must be transferred in the exact order that the connector expects it.

The connector matches the application-specific information in the returned data to an attribute's application-specific information in the business object definition. The connector attempts to set every attribute that is in the returned business object data. If any attribute cannot be set, the connector returns FAIL to the connector infrastructure.

In order for the returned data transfer to execute successfully, the connector expects the following to be true of the returned data:

When the connector rebuilds the application-specific business object, the connector loops through the business object twice, beginning with the top-level business object.

  1. In the first pass, it sets all simple attributes.
  2. In the second pass, it checks if the flat attribute exists in a child object. If it exists the connector recursively executes the same processing for the child object.

Attention: If the conversion of a flat structure to a business object fails, the connector reports a failure to the integration broker. However, the data is already posted in the SAP application and, therefore, cannot be rolled back at this stage. While the rules are simple, implementing a complex, hierarchical business object with many attributes can be difficult to manage.

Once the business object is successfully rebuilt with new business object data, the connector returns it to the integration broker.

Copyright IBM Corp. 1997, 2003