SALES
Set Sales Office and Other Fields as Required in VA01
This article demonstrates how to define additional fields in transaction VA01 as mandatory without using a User Exit or BAdI. The approach utilizes standard SAP features like transaction variants and is particularly suitable for maintaining robust adjustments in the sales workflow.
Business Context
By default, the Sales Office field in VA01 is optional. However, for specific sales order types, a mandatory entry is functionally essential – for instance, when the sales office serves as a strict criterion for revenue analysis, commission clearing, or internal authorization flows, and missing details lead to data inconsistencies or manual correction overhead.
Solution Strategy
This requirement can be fully configured within the standard SAP framework. No custom development is required. Specifically, a transaction variant is recorded via transaction SHD0 and subsequently allocated to the designated sales order type.
Implementation Steps
Creating the Transaction Variant
Transaction variants are completely transportable and can be transferred into subsequent systems via the SAP transport system like regular customizing objects. For this walkthrough, the variant is saved inside the local package $TMP – for production deployments, we recommend storing it in a dedicated project package for deployment across testing and production environments.
Launch transaction SHD0. Enter VA01 as the transaction code, specify a self-explanatory name for your variant, and click Create. The recording sequence initiates with Screen 101, the initial entry screen of VA01.
The transaction VA01 is then processed, and you must hit the Enter key to advance the workflow.
Within the field configuration dialog popup for Screen 101, locate the Sales Office field and activate the checkbox in the Required column. Save the variant parameters – for local verification without transport routing, assigning it to package $TMP is sufficient.
Assigning Variant to Sales Document Type
The generated transaction variant is integrated via Customizing. Within SPRO, navigate to the following node path:
Sales and Distribution → Sales → Sales Documents → Sales Document Header → Define Sales Document Types
Open the desired order type configuration and enter the previously defined variant name into the Transaction Variant field. After saving, the rule applies instantly to all newly created documents of this type.
Since configurations must be deployed across the landscape, ensure the modifications are captured inside a transport request.
Initial Runtime Test
During the first test, we observe: The Sales Office is already flagged as a mandatory field on the initial screen. However, within the order header data screen, it remains optional.
An important behavior pattern becomes noticeable here: If VA01 is initially opened using an order type that has no transaction variant assigned, and the user subsequently switches to the configured order type, the mandatory field validation is bypassed. The Sales Office is not recognized as a required field in this scenario – even if the order type is manually corrected afterward. The order can be saved without entries. This standard behavior requires an additional safeguard in the header data screen.
Enforcing Mandatory Field in Header Data
To ensure the field is enforced within the header details screen as well, the transaction variant must be extended. Modify the existing variant layout inside SHD0.
Instead of concluding after the first screen recording, advance further into the transaction flow until reaching the header data screen (Screen 4301). For any popups originating from intermediate sub-screens, deactivate the Adopt settings flag to skip them.
On Screen 4301, activate the Required attribute flag for the Sales Office field once more, and conclude the recording session by clicking Save and Exit.
Final Result
Following this extension, the Sales Office field is successfully enforced as a required field on both the initial entry screen and the header details screen of the sales order. The requirement is fully met within the SAP standard framework without custom development.