cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch Details of Transport Management Documents with Document IDs.

shalabh_jain
Employee
Employee
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

shalabh_jain
Employee
Employee
0 Kudos

Hi,

Thanks for your reply.

My requirement is to read these details through a FM in an Internal table.

Could you please suggest if there are any BAPIs to do this.

It would be helpful if you could elaborate more on the technical process need to be followed.

Thanks,

Shalabh

former_member583013
Active Contributor
0 Kudos

Hi Shalabh,

To get data from certain business objects TM uses Data Access Definitions. Would this be useful for you?

You can customize data access definition in spro: SAP Transportation Management >> Transportation Management >> Basic Functions >> Conditions >> Data Access Definition

Hope this helps.

joseph_manjiyil
Participant
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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.