
The administrator has set the PULL_ASSOCIATED_DELTA parameter for the back-end adapter of the data object.
This parameter can also be set by defining a custom service. The custom service overrides the PULL_ASSOCIATED_DELTA parameter in the DOE. You can set the parameter by calling the method, SMMW_MSG_INTHDR_WRAPPER. SET_ASSOC_PULL (Flag) . The flag can have the following values:
S - Synchronous association pull
X - Asynchronous association pull
N - No association pull
In the data orchestration engine (DOE), there are scenarios in which a data object is associated with other data objects in the DOE. (More information: Associations Between Data Objects ) In scenarios that have associated data objects, a download of a data object instance by the DOE triggers the download of its associated data objects as well. This is referred to as the association-pull feature of the DOE. This feature is configured by setting the parameter, PULL_ASSOCIATED_DELTA.
Why Model a Synchronous Association-pull?
SynchronousConsider a service-order scenario that has two data objects: Order data object and Time Confirmation data object. The status for the orders such as Open or Completed is maintained by the back-end system. Let us assume that a service person completes a specific order on the mobile device. The order is completed by sending the final time details for the particular order and then synchronizing with the back-end system. During synchronization, the final time details are sent to the back-end system and the status of the order changes to Completed . Although the final time details are sent to the back-end, the status of the order on the device is still Open . Only on the next synchronization, the status of the order changes to Completed . If you want the changes to the order to come to the device during the same synchronization, then you must synchronously pull the changes to the order data object along with the changes to the time-details data object. On implementing a synchronous association-pull, an upload of an instance of the time confirmation data object pulls the changes to the associated instance of the order data object during a single synchronization.
This is an example of a custom service implemented for the scenario discussed above. The custom service was implemented in the PROCESS_INBOUND_CLIENT_AV_MSG flow service.
//Function Module 'ASSOC_PULL_CONF'
DATA: root_node TYPE REF TO if_node_readwrite_wrapper.
DATA: indx TYPE i, final_conf TYPE boolean.
CALL METHOD mbo_message_body->get_node_for_write " Get Root node instance
EXPORTING
node_name = 'TIMECONF'
RECEIVING
p_node_write_wrapper = root_node
EXCEPTIONS
node_not_found = 1.
CALL METHOD root_node->if_node_read_wrapper~get_recordcount "Get the record count
IMPORTING
record_count = indx.
IF indx = 1.
" Get the FINAL_CONF attribute in root node
CALL METHOD root_node->if_node_read_wrapper~getattribute
EXPORTING
record_pos = indx
attrname = 'FINAL_CONF'
IMPORTING
attrvalue = final_conf.
if final_conf = 'X'.
" Set the association pull as synchronous association pull.
CALL METHOD mbo_message_int_hdr->SET_ASSOC_PULL
EXPORTING
ASSOC_PULL = 'S'.
endif.
indx = indx - 1.
ENDIF.
More information: Custom Service