Supply Chain Management Blogs by Members
Learn about SAP SCM software from firsthand experiences of community members. Share your own post and join the conversation about supply chain management.
Showing results for 
Search instead for 
Did you mean: 
Active Participant
Hi colleagues,

I am writing other article from series “How to”, in order to help SAP Consultants around the world, like me, implementing SAP Business Network for Logistics - Global Track and Trace.

In my current project, customer would like to send SAP TM customized Event Reason Codes to SAP BN4L-GTT.

How to do that:

1. Open Manage Model app in BN4L-GTT, select your gttft1 - GTT Standard Model






Add customized Event Reason Code in Code List Tab, look for the EventReasonCode Item in Left side of screen.
Then, add the new code under User Model Code section below (click in Add button)

2. Go to your SAP TM system settings and define Event Reason Codes

Go to SPRO transaction.
Path: Transportation Management-> Basic Functions-> General Settings-> Define Event Reason Codes

Example, if you want to assign the customized event code ZZ_DAMAGE to Loading End event LOAD_END, please do following:

Open the Select Event Code folder.
Select your Event Code

Then, open Assign Event Reason Codes to Event Code folder
Add a new entry with new Event Reason information.


The event reason code you have defined in SAP TM must be exactly the same with the one defined in your standard model, in BN4L-GTT, Manage Model app.

3. Adjust the extractor code

Add below code at end of the method EXTRACT_GENERAL_EVENT_DATA in class ZCL_GTT_STS_ACTUAL_EVENT.

CLEAR ls_trackparameters.
ls_trackparameters-evtcnt      = cs_trackingheader-evtcnt.
ls_trackparameters-param_name  = 'EVENT_REASON_CODE'.
ls_trackparameters-param_value = is_execinfo-event_reason_code.
APPEND ls_trackparameters TO ct_trackparameters.


4. Configure a new section inside Shipment Details Document from Track Shipment App.

The current version of BN4L-GTT have a limited space in Event Tracking Timeline (it’s possible to display only the Event Reason Text, not the Event Reason Code)








So, we need to use the “Adapting UI” functionality.
More information in SAP Adapting UI documentation

Make sure you have the two flexible UI roles “UIConfigureTemplate” and “FlexKeyUser” assigned to your user/role collection in SAP BTP cockpit.

SAP BTP Cockpit

Once you have the roles, go to BN4L-GTT Track Shipment App
In the Shipment Detail page, click in “Adapt UI” , in the User action menu (top right screen)

Left Click on the tab.
Choose Add Sections to include a new “Events” section.

Select Events, click in OK button.

Click Activate New Version button and keep the current UI version name.

Fulfill with “WithEventTable name, press Confirm.

Click Save and Exit to exit the UI Adaptation Mode.

Go to the new section “Events” and add column Event Reason Code , click in Settings button (top right)

Event Reason Code column was added.

Remember to restrict the accesses to Adapting UI roles only to GTT Admin Users.

Event Reason Text and Event Reason Code were inserted in GTTMSG Idoc segment below:
Fields: SRCID (Event Reason Code) and SRCTX (Event Reason Text)

I hope this information could help you.
If you enjoyed this article, please like it, share it, spread the knowledge.

Information is not knowledge. The only source of knowledge is experience. You need experience to gain wisdom. (Albert Einstein)
1 Comment
Labels in this area