How to manage the status of custom tabs/fields in TRM
All we know that with the help of GFTR_C0102 transaction we can manage the status of standard fields.
But what about custom fields?
Actually it’s all the same! But we need to make some configuration.
Precondition: you must know how to create custom tabs in Treasury and how to add custom fields on the tabs. Tabs and fields must be already created.
Status of custom tabs
1. Tr. GFTR_C0002 – check if everything is okey here, because field groups for custom tabs are already predefined and you don’t have to change anything here – 0093 “Customer Enhancements: Tabstrip 1” and 0094 “Customer Enhancements: Tabstrip 2”
On the “Field Groups” level do not change anything
Now let’s assign Fields to Field Groups:
- Field Group 93: VTG_OPEN_TRTM_DISPLAY-OPEN_TRTM_CUST_01
- Field Group 94: VTG_OPEN_TRTM_DISPLAY-OPEN_TRTM_CUST_02
It’s all. Now you can manage the status of custom tabs: Display or Hide.
Status of custom fields
1. Tr. GFTR_C0002 – let’s create field groups for our custom fields and assign custom fields.
TIP1: We can set the status only for Group Field. It means you must group your custom fields in Group Field logically, technically. For example, fields like Amount and Currency are always together, so they must always be in the same Field Group.
TIP2: The range for customer field groups is between 600 (inclusive) and 799 (inclusive)
Let’s create Field Group 601.
Enter description for your field group and Function module FTR_SUBSCR_FMOD2_EVENT
Now assign custom fields to Field group
You enter the same parameters as on your screen painter and don’t forget to put checkmark in Input field.
2. Tr. GFTR_C0003 – assign Field Group to View “CUST01”.
Check parameters of the view
Assign Field Groups to view CUST01
3. Tr. GFTR_C0011 – Assign Screen parameters to Database parameters.
Parameters in Screen painter is Screen parameters
Fields in the Database is Database parameters
We must match both parameters – Screen and Database
And that’s all. In transaction GFTR_C0102 you’ll find new Field Groups. And you can manage the statuses of custom fields in your deals!
4. And the last step. Don’t forget to insert code
CALL METHOD G_PROXY_FMOD->APPLY_FMOD
in PBO logic of the screen where your custom fields situated. This piece of code will transfer field’s status from configuration into your transaction.
Easy and elegant. Using standard possibilities is the best way to manage the system.
P.S. If you face some unpredictable behaviour of your configuration, try to debug function module BUS_FMOD_MAIN (tr. SE37).
The instrument we used is BDT (help.sap.com) Business Data Toolset (not to be confused with DBT Derived business transaction). With BDT you can reconfigure you screens in different modules (the most usual is Business Partners management) – move fields from one tab to another, create custom tabs, etc
But in Treasury module this instrument is used only partially. If you want to get acquainted with the instument – read CR590 course “Business Data Toolset”