
" Finally call the transaction manager to save the data * eo_change = " Interface of Change ObjectĮo_message = lo_message " Interface of Message Object "io_serv_manager is the for the TOR BO node / HOST BO Node Ls_mod-change_mode = /bobf/if_frw_c=>sc_modify_update. "Association to " the DO node from the TOR root node Ls_mod-association = /scmtms/if_tor_c=>sc_association-root-transportcharges. "Node is the node to update, in "this case the DO Node in TOR transportcharges Ls_mod-node = /scmtms/if_tor_c=>sc_node-transportcharges. "Key is the same as TOR key, in this case the Freight order "key "Key is the TOR key, in this case the Freight order "key Ls_mod-source_node = /scmtms/if_tor_c=>sc_node-root. "Root Key of Delegated Node, can be fetched using the Helper "shown above "Create reference of root structure of DOĪPPEND 'ZCUSTFIELD' TO ls_mod-changed_fields. io_serv_manager = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).ĬREATE DATA ls_mod-data TYPE /scmtms/s_tcc_root_k.
CL CHARGE ELEMENT UPDATE
Ĭode excerpt to build the modification table to update the root node of the Delegated Node. In that case, I would have to build the Modification table and call the Service Manager Modify Method of my host BO, in this case, TOR BO. I have added a new field into the delegated BO root /SCMTMS/TCC_TRNSP_CHRG and I want to update the same.

It_root_key = lt_tor_root_key " Key TableĮt_charge_item = DATA(lt_item) " Charge ItemĮt_charge_element = DATA(lt_charge_ele) " Charge ElementĬATCH /bobf/cx_frw_contrct_violation #NO_HANDLER. scmtms/cl_tcc_do_helper=>retrive_do_nodes( "use transportation charge helper class to get the charge details. See the below example call where I want the Charge Item, Charge Element, and the Charge Root from the Delegated Node.

"Also Provide the Parameter IT_ROOT_KEY with the TOR Keys, in this case, the Freight Order keys. "HOST Node, here host is the DO "TRANSPORTCHARGES Ls_ctx-host_node_key = /scmtms/if_tor_c=>sc_node-transportcharges. "TOR ROOT Key as the DO is inside the "ROOT NODE Ls_ctx-host_root_node_key = /scmtms/if_tor_c=>sc_node-root. " HOST BO KEY, in this case TOR as TOR is hosting "the DO (Delegated Node). Ĭall the method by providing the importing parameters ls_ctx-host_bo_key = /scmtms/if_tor_c=>sc_bo_key. The solution to the problem here is the method /scmtms/cl_tcc_do_helper =>retrive_do_nodes. I read in forums that the DO developers provide helper methods in order to traverse through them easily. This is a tedious process and involves making many calls to the helper method to prepare the keys in runtime.Īn easier way that I figured out is to use the helper methods for Delegated Nodes.

To access the delegated node we can make use of helper method ET_DO_KEYS_4_RBA of class /SCMTMS/CL_COMMON_HELPER as given in the TM Enhancement guide. If you open the BO /SCMTMS/TCC_TRNSP_CHRG, we need to fetch the highlighted node from this.Ī delegated node can’t be accessed directly by creating a service manager. Also the delegated node is associated with BO /SCMTMS/TCC_TRNSP_CHRG. The Transportation Charge is a delegated node in the BO /SCMTMS/TOR as seen in pics below. The task here is to query and find out the Transportation Charges for a particular freight order. Hoping that the reader has an idea about basic terms like Business Object, Node, Association etc, I move forward with the explanation. This blog is just an effort to reduce the burden by providing an easier way to traverse the delegated node for Transportation Charge From the Freight Order Root and how the update the Delegated Node fields.

Working with BOPF in SAP TM is tricky and many times the developers struggle to find help online.
