Supply Chain Management Blogs by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
alvin_fan
Advisor
Advisor

A customer or consultant might inquire whether GTT allows adding the customized fields to a specific tracked process and if it can be displayed in the 'Fulfillment Tracking Apps'. The answer to this is affirmative.

Before we begin our task, it is important for you to determine which field should be included in the respective tracked process.

This blog will demonstrate the process of adding the 'Freight Unit Type' field to the 'Freight Unit' tracking process. This primarily involves five steps.

Step 1: Create user model field and add IDoc field mapping for the newly created user model field.

Step 2: Add field mapping in the extractor code in SAP S/4HANA.

Step 3: Add the newly added field to the output structure in SAP S/4HANA.

Step 4: Feed the value for newly added field in SAP S/4HANA.

Step 5: Prepare testing data and check the result in “Check Processes and Events” app or “Track Shipments” App.

Let's begin our work now.

Step 1: Create user model field and add IDoc field mapping for the newly created user model field.

a.Launch the Manage Models app and go to the GTT standard model “gttft1”.

b.In the Tracked Process tab, choose ‘FreightUnit’, in the right hand under section ‘User Model Fields’ click Create and fill in the field information in the dialogue.

Note: the user model field must start with "ZZ". For example ZZ_TOR_TYPE.

01.png

02.png 

 c. After the field ZZ_TOR_TYPE is added, it should appear as follows.

03.png

d. Configure the IDOC mapping.

   Click Edit on the top. In the IDOC Integration tab, for Tracked Process field, choose “FreightUnit” from the dropdown list.

04.png

Under User Model Fields, fill in IDOC segment and IDOC Field for the newly created user model field.

05.png

e.Save you changes and click Deploy on the top right to deploy the model. Once the model is successfully deployed, you can see Active on the model card with its last operation status  “Deployment Success”.

06.png

Step 2: Add field mapping in the extractor code in SAP S/4HANA.

To add customized fields to the freight unit, it's necessary for us to find the process class associated with the freight unit. Please do following:

a.In Display IMG page, click Integration with Other SAP Components ->
Interface to Global Track and Trace
-> Define Application Interface.

Choose activity Define Used Business Process Types, Appl. Object Types and Event Types. (T-code: /SAPTRX/ASC0AO_CTT - Define AO and Event Types for GTT)

Choose the business process type TMS_TOR from the Define Used Business Process Types on the right side.

Double click Define Application Object Types.

Choose Application Obj. Type GTT_FU and double click.

07.png

b.Switch to “Parameter Setup” tab and click the button near the field Cntl Data Function

08.png

c.It will navigate to function module ZGTT_STS_OTE_FO_HDR.

09.png

d.Inside this function module, you’ll find the process class for freight unit is ZCL_GTT_STS_BO_FU_READER.

10.png

e.Double click class ZCL_GTT_STS_BO_FU_READER, then switch to “Attributes” tab and double click the definition for attribute CS_MAPPING, it will navigate to super class ZCL_GTT_STS_BO_TOR_READER.

11.png

f.Add field tor_type into the attribute CS_MAPPING, the value should be equal to 'YN_TOR_TYPE', as we have already defined this mapping in the 'gttft1' standard model in the previous step.

tor_type  TYPE /saptrx/paramname VALUE 'YN_TOR_TYPE',

12.png

Step 3: Add the newly added field to the output structure in SAP S/4HANA.

a.Open class ZCL_GTT_STS_BO_FU_READER and switch to the “Types” tab.

13.png

b.Add field tor_type to types TS_FREIGHT_UNIT.

Please ensure that the field name you have entered matches the ones defined in the CS_MAPPING attribute.

tor_type TYPE /scmtms/tor_type,

14.png

Step 4: Feed the value for newly added field in SAP S/4HANA.

a.Double click method GET_DATA_FROM_MAINTAB in class ZCL_GTT_STS_BO_FU_READER and feed the value for field tor_type.

15.png

Step 5: Prepare testing data and check the result in “Check Processes and Events” app or “Track Shipments” App.

Once the freight unit is created or critical changes were made, a new IDoc will be generated and sent to GTT.

Example freight unit 4100077180.

16.png

a.Check the result in “Check Processes and Events” app.

Launch “Check Processes and Events” app, choose the process type “FreightUnit” and fill in the freight unit number in field “Tracking ID”, press enter. In the detail page, under “User Defined” section, you will see the value of “Freight Unit Type”.

17.png

b.Check the result in “Track Shipments” app.

To access the freight unit detail page, we need to navigate from the freight order detail page as there is no separate list page for freight units.

Launch “Track Shipments” app, fill in the freight order number ‘6100004020’ (freight unit 4100077180 assigned with freight order 6100004020) in field “Shipment No.”, press enter.

In the shipment details page, there is a "Freight units" table, through the hyperlink it will navigate to the freight unit detail page.

18.png

In the freight unit detail page, under “User Defined” section, you will see the value of “Freight Unit Type”.

19.png

 

Summary

By following the above steps customer can easily add customizing field to specific tracked process and shown the fields in the Fulfillment Tracking Apps.

You may use the comments section to provide feedback on this article and help in improving the content. Additional you may post your queries in the comment or in the community Q&A.