Skip to Content
avatar image
Former Member

Fetch Details of Transport Management Documents with Document IDs.

Hi,

I have a requirement in which I have to fetch details like Partner IDs, Transportation mode etc. for various TM documents like Freight Order, Forwarding Agreement etc on the basis of their Document IDs.

I could find that Documents are stored as Business Objects in SAP TM system which we can explore with transaction /BOBF/CONF_UI.

Could anyone please help me further with how can I fetch the details for a TM document from Business Objects.

Thanks,

Shalabh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 01, 2011 at 01:24 PM

    Why are you not using the web-ui avaialble to see the documents.... ?

    If you are planning to use for test purpose.. /bobf/test_ui will be helpful

    If you want to read programatically...

    > instantiate a service manager

    > convert alternate key ie ID to UUID

    > do a RETRIEVE.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Create an instance for service manager and call the Query method of interface /bobf/if_tra_service_manager.

      After this you can call the get_tor_data method to fetch the details for Freight order

      Regards,

      Joseph M

  • avatar image
    Former Member
    Nov 01, 2012 at 12:53 AM

    Shalabh ,

    The only way to fetch data from BOBF is to dig in a standard way, i can only suggest some code with methods.You can use them as ref. to fetch required data.

    This is a sample to get your Freight order root , key is your parent Key.

    DATA:

    lt_key TYPE /bobf/t_frw_key,

    lt_root TYPE /scmtms/t_tor_root_k,

    lo_srvmgr TYPE REF TO /bobf/if_tra_service_manager.

    CALL METHOD lo_srvmgr->retrieve

    EXPORTING

    iv_node_key = /scmtms/if_tor_c=>sc_node-root

    it_key = lt_key

    IMPORTING

    et_data = lt_root.

    similarly you can use associations to fetch further nodes from BOBF.

    CALL METHOD lo_srvmgr->retrieve_by_association

    EXPORTING

    iv_node_key = /scmtms/if_tor_c=>sc_node-root

    it_key = lt_key

    iv_association = /scmtms/if_tor_c=>sc_association-root-stop_first

    iv_fill_data = abap_true

    iv_edit_mode = /bobf/if_conf_c=>sc_edit_read_only

    IMPORTING

    et_data = lt_stop

    et_target_key = lt_stop_key.

    Hope this Helps.

    Thanks

    Sarab.

    Add comment
    10|10000 characters needed characters exceeded