This section outlines the steps the connector takes to handle a business object request with the Retrieve verb. The connector processes hierarchical business objects recursively; that is, it performs the same steps for each child business object until it has processed all individual business objects.
When processing a retrieval request from the integration broker, the connector tries to return a business object that matches the current database representation of that object. In other words:
Therefore, when the Hierarchical Dynamic Retrieve module receives a business object request with the Retrieve verb, it creates a response business object by recursively descending the entire object in the application and retrieving the current database representation. To perform the retrieval, the connector uses the specified key values in the top-level request business object. Therefore, the response business object, which contains all the children of that top-level parent, may have different values for simple attributes and different child business objects from the request business object.
For example, assume the integration broker passed the following
SAP_Customer business object to the Hierarchical Dynamic Retrieve
module:
If, in the current database representation, the array of
SAP_SalesView child business objects contained by SAP_Customer 2345
does not include sales_org A, the connector's response business
object does not contain that child. Moreover, if the current
database representation of SAP_Customer 2345 includes sales_org D
and sales_org E, the connector includes those children in the
response business object. The business object that the SAP
Hierarchical Dynamic Retrieve module returns to the integration
broker at the end of retrieval is:
When retrieving a business object, the connector returns a status of either VALCHANGE if the operation was successful (regardless of whether the operation caused changes to the business object), or FAIL if the operation failed.
The connector performs the following steps when retrieving a hierarchical business object:
The connector uses key values in the request business object to build the SELECT statement's WHERE clause. The result of the retrieval causes one of the following actions:
The connector calls the RFC_READ_TABLE function, which uses the appropriate foreign-key values to build the SELECT statement's WHERE clause. The connector handles attributes marked as required in the following way:
For each record returned, the connector performs the following actions:
Attention: If the retrieval of a single-cardinality child returns more than one record, the connector returns only the first record.