cancel
Showing results for 
Search instead for 
Did you mean: 

TM New Attribute to addition selection profile and use it in Planning Cockpit

princeagarwal35
Newcomer
240

This blog post explains how to add a custom attribute to the Additional Selection Profile for Freight Units (FU) and Freight Orders (FO), and how to use this custom field in the planning cockpit.


The requirement was to filter the Transportation Cockpit based on a custom field. Since it was not possible to add the custom field directly, an enhancement was implemented to make the custom field available in the Additional Selection Profile. Once added, this custom field can be used to filter results within the Transportation Cockpit.

Step 1: 

Add the custom field ZZVEHICLE_TYPE to the structure /SCMTMS/D_TORROT, and ensure that the save strategy is implemented to populate ZZVEHICLE_TYPE with the required value.

princeagarwal35_4-1745829144328.png

Step 2:

Enhance the structure /SCMTMS/S_TOR_QUERY, which is used in /SCMTMS/S_TOR_Q_FU_STG_PLN, and add the custom field ZZVEHICLE_TYPE

princeagarwal35_0-1745826271145.png

Adding the field ZVEHICLE_TYPE to the above structure will make it available as an attribute in the Additional Selection Profile.

Step 3:

Additionally, implement the method GET_SHLP_FIELD_WHITELIST of class /SCMTMS/CL_PROF_HELPER to allow the custom field to be visible in the Additional Selection Attributes.

princeagarwal35_3-1745828794691.png

Step 4:

Now, the field ZZVEHICLE_TYPE is visible and has been added to the Additional Selection Attributes.

princeagarwal35_1-1745826501870.png

Step 5:

Enhance the method GET_QUERY_ENHANCE_TABLE of class /SCMTMS/CL_TOR_Q_SUPERCLASS to specify the TM database table that should be referenced for the custom Z field added in the selection profile and used for filtering.

princeagarwal35_2-1745828564243.png

After completing the above developments and implementations, the Transportation Cockpit will be able to filter based on the new additional fields in the selection profile.

 

 

I hope this blog post will be helpful to SAP developers.


Regards,
Prince Agarwal

Accepted Solutions (0)

Answers (0)