cancel
Showing results for 
Search instead for 
Did you mean: 

Getting data from Freight Order

ratana_pouy
Participant
0 Kudos

Hi,

I am looking for tables from Embedded TM in S4HANA. here is linkage:

Outbound Delivery->Freight Unit->Freight Order, i need to get Arrival Date into report:

Please help.

Warm Regards,

RTN

Accepted Solutions (0)

Answers (2)

Answers (2)

Hi,

Check /SCMTMS/D_TORSTP table.

Regards,

ratana_pouy
Participant
0 Kudos

thanks!

i found it but timestamp is not the same

DominikTylczyn
Active Contributor
0 Kudos

Hello ratana.pouy

Although carlosgarridolopez answer is correct you should not read TM data directly from the database tables. Use the BOBF framework instead - see TM Enhancement Guide

Best regards

Dominik Tylczynski

ratana_pouy
Participant
0 Kudos

i am trying to get TM data into VL06O by using customer exit V50Q0001 then get dump:

Line  Code

    1   METHOD raise_shortdump.
    2
    3     ASSERT ix IS BOUND.
    4     prepare_for_shortdump( ix                         = ix
    5                            iv_application_information = iv_application_information ).
>>>>>     RAISE SHORTDUMP ix.
    7
    8   ENDMETHOD.
***********TM****************************************************
DATA: lo_srv_mgr TYPE REF TO /bobf/if_tra_service_manager,
lo_txn_mgr TYPE REF TO /bobf/if_tra_transaction_mgr.

DATA: it_data TYPE /scmtms/t_tor_root_k,
it_key TYPE /bobf/t_frw_key,
lt_freightunit_keys TYPE /bobf/t_frw_key,
ls_selpar TYPE /bobf/s_frw_query_selparam,
lt_selpar TYPE /bobf/t_frw_query_selparam,
lo_message TYPE REF TO /bobf/if_frw_message,
ls_query_inf TYPE /bobf/s_frw_query_info.


* Access Service Manager
lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).

ls_selpar-attribute_name = /scmtms/if_tor_c=>sc_alternative_key-root-labeltxt.
ls_selpar-option = 'EQ'.
ls_selpar-sign = 'I'.
ls_selpar-low = ct_postab-vbeln.

APPEND ls_selpar TO lt_selpar.

* Query
lo_srv_mgr->query(
EXPORTING
iv_query_key = /scmtms/if_tor_c=>sc_alternative_key-root-labeltxt " Query
* it_filter_key = " Key Table
it_selection_parameters = lt_selpar " Query Selection Parameters
* is_query_options = " Query Options
* iv_fill_data = abap_true " Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
* it_requested_attributes = " List of Names (e.g. Fieldnames)
IMPORTING
eo_message = lo_message " Message Object
es_query_info = ls_query_inf " Query Information
et_data = it_data
et_key = it_key
).

***********TM****************************************************

Is there something wrong?

Thanks,

RTN

DominikTylczyn
Active Contributor
0 Kudos

Hello ratana.pouy

I can see that you want to read a freight order by its label text. The label text is defined as a /SCMTMS/TOR-ROOT alternative key:

Therefore you don't really need to query TOR data. You can just read a freight order with the alternative key using the convert_altern_key method. Check the page 26 of the TM Enhancement Guide.