Created
August 7, 2013 08:43
-
-
Save zhjuncai/6172337 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*&---------------------------------------------------------------------* | |
*& Report Z_TRQ_GET_PARTY | |
*& | |
*&---------------------------------------------------------------------* | |
*& | |
*& | |
*&---------------------------------------------------------------------* | |
REPORT Z_TRQ_GET_PARTY. | |
DATA: | |
ls_trq_root_key TYPE /bobf/s_frw_key, | |
lt_trq_root_key TYPE /bobf/t_frw_key, | |
lt_trq_root TYPE /scmtms/t_trq_root_k, | |
ls_key_link TYPE /bobf/s_frw_key_link, | |
lt_key_link TYPE /bobf/t_frw_key_link, | |
lt_party_key TYPE /bobf/t_frw_key, | |
lt_trq_party TYPE /scmtms/t_trq_party_k, | |
lo_srv_mgr TYPE REF TO /bobf/if_tra_service_manager. | |
ls_trq_root_key-key = 'C8859551F7FC163CE10000000A428630'. | |
APPEND ls_trq_root_key TO lt_trq_root_key. | |
lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( iv_bo_key = /scmtms/if_trq_c=>sc_bo_key ). | |
lo_srv_mgr->retrieve( | |
EXPORTING | |
iv_node_key = /scmtms/if_trq_c=>sc_node-root | |
it_key = lt_trq_root_key | |
iv_fill_data = abap_true | |
IMPORTING | |
et_data = lt_trq_root | |
). | |
lo_srv_mgr->retrieve_by_association( | |
EXPORTING | |
iv_node_key = /scmtms/if_trq_c=>sc_node-root " node | |
it_key = lt_trq_root_key " key table | |
iv_association = /scmtms/if_trq_c=>sc_association-root-party | |
iv_fill_data = abap_true | |
IMPORTING | |
et_data = lt_trq_party | |
et_key_link = lt_key_link | |
et_target_key = lt_party_key | |
). | |
LOOP AT lt_key_link INTO ls_key_link. | |
READ TABLE lt_trq_party WITH KEY key = ls_key_link-target_key TRANSPORTING NO FIELDS. | |
CHECK sy-subrc = 0. | |
READ TABLE lt_trq_root WITH KEY key = ls_key_link-source_key TRANSPORTING NO FIELDS. | |
CHECK sy-subrc = 0. | |
ENDLOOP. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment