In this article we want to explain step by step how to add custom field in SAP Sales Order transaction VA01/VA02/VA03. This time Mr ABAPGurus will give the tutorial of enhancement to add custom field in SAP Sales order.
In this sample we will add new custom field for comments and customer satisfaction, this data will save into separate table from SAP Standard table ( VBAK / VBAP ).
SAP provided us with ADDITIONAL TAB in the sales order transaction ( VA01/VA02/VA03 ) which allow customer to add custom fields. The different between ADDITIONAL A and ADDITIONAL B is the ADDITIONAL A for field which already predefine in Sales Order Header ( VBAK ) fields and ADDITIONAL B is for field that freely define.
This sample we will use ADDITIONAL B because we will store data from customer satisfaction into Z database table.
1. Create one Z table using SE11 SAP Transaction code.
2.Using SE38 Transaction code and open SAPMV45A program.
You need to Modifying the Screen 8309 for Additional B Tab screen ( this step is required SAP Access Key ) but you not need to worry because this is change actually customer part and do not replace during upgrade SAP System.
You need to change 8309 and add your custom field into that’s screen, in this sample you may add field SATISF from table ZTB_SATISFACTOR into that’s screen.
After you finished modify 8309 screen, you can activate it. and you can go to VA03/VA02/VA01 SAP Transaction code to see your field that you’ve added before.
3. Create Implicit Enhancement for PBO Modules for screen 8309.
You need to create implicit enhancement for PBO Modules in ABAP Include MV45AO0Z. Press Shift + F4 in ABAP Editor to create Enhancement. See the following picture.
After that go to menu Edit -> Enhancement Operatios->Show implicit Enhancement Options. Position the cursor on the highlighted implicit enhancement right click and choose Enhancement Operations->Create Implementation to create enhancement MV45AO0Z.
In this enhancement you can write your ABAP Coding for PBO Module.
MODULE get_satisfactor_data OUTPUT.
DATA : ls_satisf type ztb_satisfactor.
"get existing satisfactor
SELECT * FROM ZTB_SATISFACTOR INTO
ls_satisf WHERE kunnr = vbak-kunnr.
ztb_satisfactor-satisf = ls_satisf-satisf.
In screen 8309 you need to create Implicit Enhancement to declare screen flow PBO modules get_satisfactor.
Click Change button and then click Insert . Write your screen flow module get_satisfactor_data.
4. Create Implicit Enhancement for PAI Modules for screen 8309 ( Optional ).
You can create implicit enhancement for PAI Modules in include MV45AI0Z for the coding of module PAI. This is optional upon your need.
5. Create Enhancement for saving additional in MV45AFZZ.
You can coding your ABAP Code in implicit enhancement within USEREXIT_SAVE_DOCUMENT user exit in MV45AFZZ.
So if you want to more understand about SAP Sales and Distribution Enhancement, I Highly recomended that you check out ABAP SAP SD Enhancement Completed Tutorial .
Incoming search terms:
- https://www saptutorial org/how-to-add-custom-field-in-additional-b-tab-for-sap-sales-order/
- add new customer field in mseg table sap
- add custom field vao2 sap
- how to add sale B
- how to make a field mandatory in sap va01 transaction
- sap customer additional attributes sales
- HOW TO ADD A NEW FIELD IN ABAP?
- new button in bp relationships screen in abap
- sap enhance customer address screen add fields
- add new field in sale order item level addition tab b