cancel
Showing results for 
Search instead for 
Did you mean: 

How to match Delivery Position with the Freight Unit Item? (their IDs differ)

szelbi
Participant
0 Kudos
1,538

Hello all,

When a delivery is created from a Sales Order, also Freight Unit is created in the process. In my case, I need to get the GUID of every Freight Unit Item (the one from the `/SCMTMS/D_TORITE` Table) for every Delivery Item accordingly.

Currently, I do something like this:

DATA(lv_doc_key) = /scmtms/cl_guid_convert=>c22_to_x16( is_likp-handle ).
DATA(lo_logint_docflow) = NEW /scmtms/cl_logint_docflow( ).

lo_logint_docflow->fill_docflow(
  EXPORTING
    iv_key           = lv_doc_key
    iv_btd_id        = is_likp-vbeln
    is_base_document = ls_base_document " I pass the VBELN in the structure
  IMPORTING
    es_doc_flow      = ls_tm_docflow ).

In the response I get the `docflow_content` table which contains the Freight Unit Header as well as the Items. The problem is that, in case that a Delivery is created with the Delivery Item in Position 20 and no Delivery Position 10 exists (e.g. it has been manually deleted), the Freight Unit Item ID is 10, not 20 as in the Delivery Position.

Is there any way to match the Delivery Postion to the Freight Unit Item and be sure that they are matched correctly as the ID is not the way to go?

I am new to the Transportation Management and do not know processes at all, so forgive me for my lack of knowledge.

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

jerry_wang5
Explorer

Hi szelbi,

I worked in TM area but has less experience on SD-TM integration.

I think those FU is generated via imbedded Freight unit building from SO or deliver order instead of via DTR. So, based on Freight unit concept, the link is built at FU item instead of FU header.

In FU item table /SCMTMS/D_TORITE, you can find one group with name 'REF'(structure /SCMTMS/S_TOR_ITEM_REF). in this structure, you should be able to find some useful information.

Best Regards.

Jerry.

jerry_wang5
Explorer

Checked in system, maybe field BASE_BTD_ID/BASE_BTDITEM_ID is what you are looking for.

szelbi
Participant
0 Kudos

Hello Jerry, I think that it solves my problem. Thank you for your help!

Answers (0)