Standard intervention
In SAP, a transaction code is used to perform any task in the system. SAP provides a standard set of opcodes for use. But sometimes we may need to create customer-specific customisations. Because the standard SAP may not support this task or we may need to enhance some screens according to the requirements.
What is enhancement?
This is a special type of programming that is used to enhance custom SAP screens. In short, we can extend a specific screen and opcode in SAP ABAP according to our requirements. It allows us to modify/add to standard SAP business applications without modifying the original applications.
The important thing here is to correctly identify the code that runs behind the screen and the section that we are going to write.
Although these areas are usually told to us by the modulators, there are also situations where this is not the case.
Let’s take va0x as an example, i.e. let’s work on the customer sales order reports.
§ VA01: Customer sales order creation
§ VA02: Customer sales order modification
§ VA03: Customer Sales Order Display
VA02
We go to the relevant section by entering va02 in the Tcode field.
In the screen that appears, we enter an order number in the Order section and press Enter.
This screen contains a number of fields relating to an order. Let’s say we want to change the Incoterms vs. Incoterm Place 1 fields based on the payment terms. First we need the code that runs behind this screen.
We get preliminary information from the va02 screen to determine where to write code in the program.
Here we go to the fields we want to use and press F1, for example incoterm.
Here we open this screen by pressing the technical information button.
Here we will look for it in the code blocks as we will be doing vbkd related operations.
We enter the code that runs behind the standard screen into the program area by typing se38.
First of all
We open the code by saying View.
Then we click on Edit >>>> Enhancement Operations >>> Show implicit E.
Then click on Enhancement (click on the spiral sign)
Write code to previously created enhancements by saying Change
OR
We can create a new enhancement by saying Create.
As we want to write code, we click on ‘“ Code “.
Then we give a name and short text to this screen and press the ok button.
This way we can see the enhancements we have created before and the enhancements we have created now.
Double-click on the extension we have created.
This will open the area where we can modify the default area where we can write code.
This is where we write our code relating to the operation we want to do.
For example
Then let’s activate our code and check that it works.
To do this, we enter the va02 screen and reopen our screen by entering the /n command at the beginning so that our code can work properly. We have written a code that changes the incoterm fields and gives a message if the payment condition changes.
An example when the conditions are not met.
An example when the conditions are met.
In this way, we have covered some of the Enhancement topic.