2 weeks ago
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.
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
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.
Step 4:
Now, the field ZZVEHICLE_TYPE is visible and has been added to the Additional Selection Attributes.
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.
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
Request clarification before answering.
User | Count |
---|---|
90 | |
15 | |
10 | |
8 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.