Technical Articles
How to send customized SAP TM Event Reason Codes to SAP BN4L-GTT adjusting extractor program and using Adapting UI functionality
Hi colleagues,
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
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.
Important:
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.
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.
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.
I hope this information could help you.
If you enjoyed this article, please like it, share it, spread the knowledge.
Thanks!
Information is not knowledge. The only source of knowledge is experience. You need experience to gain wisdom. (Albert Einstein)
Great posting, Alexandre! Thanks for sharing!