Custom fields can be enabled at GUI or FIORI launchpad either using CFL (Custom Fields Logic) or transaction code SCFD_EUI. In this blog I will be demonstrating the prominence of SCFD_EUI in enabling the custom fields with F4 help at the backend (SAP GUI).
There are few advantages for preferring SCFD_EUI over CFL
In CFL, customization of field suffix is not allowed as the suffix is predefined and cannot be changed. However, in SCFD_EUI we can change the suffix of the field as per the requirement.
To satisfy the functionality of F4 help with dynamic check tables, SCFD_EUI is preferred as the table values can be added, altered, and deleted unlike in CFL check table values are fixed and cannot be customized.
Business scenario
Suppose client requirement is to enable the custom fields along with F4 help that are already existing in a backend database table with a specific business context.
Solution for the above scenario, proceeds as follows:
Here let us consider
1. Business context as “Accounting: Market Segment “
2. Database table as ACDOCA
3. Custom field as ZZ1_WWMD3_MSE (3-digit code)
Step 1
◉ Append a custom structure with the fields that needs to be enabled, into an include structure “INCL_EEW_MARKET_SEGMENT_PS” present in the ACDOCA table.
◉ Note: Selection of include structure in DB table is specific to the business context.
Fig 1.1 Include structure and custom field
Fig 1.2 Custom structure
Step 2
◉ Create a value table and text table with relevant fields. Provide foreign key relationship between them and assign value table to the field domain.
◉ Maintain the entries of value table with data that needs to be appeared as F4 help to the field.
◉ Custom tables format with respect to field names shown below are standard, any changes in the format will cause issues.
Fig 2.3 Domain
Step 3
In the input help section of custom structure, assign value table (ZZ1_WWMD3_VAL) as check table of the custom field and make sure this input help is visible at DB table level.
Fig 3.1 Custom structure with input help
Step 4
Execute the transaction SCFD_EUI, provide database table, field name that is to be enabled, and press F8.
Fig 4.1 SCFD_EUI transaction screen
In the following screen, field name with respective status is shown. The status can be any of the following:
◉ Can be enabled: It means that the field can be directly enabled
◉ Preparation required: This is shown in case any of the requirement is not fulfilled. We can prepare the field by clicking on prepare button and following the instructions given in dialog.
◉ Enabled: After the successful enablement of field, we get to see this status.
◉ Enabling failed or disabling failed: This happens if there is any inconsistency in DB table or if the process is not followed correctly. Sometimes enabling or disabling the field again can work out.
◉ Disabled: It is shown after disabling the custom field successfully.
Fig 4.2 Screen showing field status
Step 5
◉ Select the custom field name and click on enable and a pop-up appears as shown below, before proceeding further we must create a code CDS view to fetch data from value table and text CDS view to fetch data from text table.
◉ The default code for CDS views can be generated by clicking on generate button which is highlighted below.
Fig 5.2 Text CDS view
Step 6
◉ Execute the SCFD_EUI transaction again, click on enable button. In pop-up provide the relevant semantic type. For this scenario, as requirement needs an F4 help for the custom field, semantic type is assigned as ‘Code List’.
◉ Provide the code CDS view (ZZ_WWMD3_CV) as the value help view.
◉ Prefix of Custom Field ID can be set in ABAP Transport Organizer (ATO) using transaction S_ATO_SETUP however this is optional. If there are no other issues, field gets enabled, and screen looks as shown.
Conclusion
Here are the final output screens, where the field has been enabled with F4 help working on SAP GUI. You can also see that associated field got published in the CFL of SAP FIORI Application.
Custom field at backend (SAP GUI) with F4 help working
Published custom field in Fiori Launchpad
No comments:
Post a Comment