In SAP S/4HANA, adding custom fields to the Sales Order screen is straightforward using the
Custom Fields and Logic (CFL) app. But in real projects, the requirement doesn’t stop there.
Business usually asks:
Can we disable this field in VA02?
Can we make it display-only after approval?
Can we control it differently at header and item level?
In this guide, we’ll see how to:
Add custom fields to the Sales Order screen
Control their properties like enable/disable using standard BAdIs
You need to add custom fields to the Sales Order screen (VA01/VA02/VA03) and dynamically control whether the field should be editable or read-only based on business logic.
If the field is not yet created, you can refer to our detailed guide on creating custom fields using the CFL Fiori app before continuing.
The solution has two parts.
First, we enable the custom field for the GUI Sales Order screen using the CFL app.
Second, we control the field behavior using standard BAdIs:
SD_SLS_FIELDPROP_HEAD for header fields
SD_SLS_FIELDPROP_ITEM for item fields
This approach is clean, standard, and upgrade-safe.
Open Fiori Launchpad using:
/UI2/FLP
Search for the custom field that was already created.
Select the field.
Navigate to:
User Interfaces → GUI
Click Enable Usage
Then click Publish.
This makes the field available in the Sales Order GUI screen.
Verify in Sales Order
Now open:
VA01
VA02
VA03
You will notice a new tab called Custom Fields in the Sales Order screen.
Now comes the important part — controlling the field behavior.
For Header-Level Fields
Use BAdI:
SD_SLS_FIELDPROP_HEAD
Implement method:
IF_SD_SLS_FIELDPROP_ITEM~SET_FIELD_PROP
IF_SD_SLS_FIELDPROP_HEAD~SET_FIELD_PROP
For Item-Level Fields
Use BAdI:
SD_SLS_FIELDPROP_ITEM
IF_SD_SLS_FIELDPROP_ITEM~SET_FIELD_PROP
Sample Logic to Disable Field
Below is a simple example to make specific fields read-only:
LOOP AT field_properties ASSIGNING FIELD-SYMBOL(<fs_field_properties>).
IF <fs_field_properties>-field_name = ‘ZZ1_COMPANY_SDI’
OR <fs_field_properties>-field_name = ‘ZZ1_RGN_SDI’.
<fs_field_properties>-read_only = abap_true.
ENDIF.
ENDLOOP.
You can enhance this with conditions like:
Sales document type
User role
Status
Approval flag
If you are also working on custom field updates via RAP instead of UI control, you may explore our article on updating Sales Order custom fields using RAP EML for backend updates.
❌ Forgetting to enable GUI usage in CFL
❌ Not publishing after enabling usage
❌ Implementing header BAdI for item field
❌ Hardcoding field names without checking business logic
❌ Forgetting transport request for BAdI
Can I hide the custom field completely?
Yes, you can control visibility using the same BAdI structure.
Does this work in both VA01 and VA02?
Yes, field property control applies to create and change modes.
Is this approach upgrade-safe?
Yes, because it uses standard BAdIs provided by SAP.
Adding custom fields in S/4HANA is simple. Controlling them correctly is what makes the solution professional.
Using CFL for UI enablement and BAdIs for dynamic control gives you full flexibility without modifying standard programs.
This is the right way to handle custom field behavior in Sales Order processing.

“SAP solution architect with a strong problem-solving mindset, sharing practical SAP S/4HANA and ABAP insights from real-world projects.”
"SAP solution architect with a strong problem-solving mindset, sharing practical SAP S/4HANA and ABAP insights from real-world projects."
https://fiowelt.com