This article will explained how to implement enhancement to create custom fields in Purchase Orders ( PO ) and RFQ ( ME41 ). this enhancement use MM06E005.
This is an Enhancement package which has options to enhance functions and screens of some bussiness transaction which you can check from transaction SMOD.
This Enhancement MM06E005 Contains Some FM exits and Screen Exits to Enhance the Purchasing Transactions ME21(P.O), ME31 (Contracts) ME41( RFQ).
We can use this enhancement to Integrate Customer subscreens using the Screen Exits and Process the Logic using FM Exits.
The Functional Exit MM06E005 is the Enhancement for Customer fields in Purchasing document.
With this Enhancement ,
– Maintain/Supply your own Customer Fields in the Headers & Items of all Purchasing documents except Purchase Requisitions
– Update your own Customer-Specific Tables
– Change Standard Fields
– Change Data that depends on the Document Header in the Items
– Change Data that depends on an Item in the Document Header
You incorporate your customer fields for the Document Header in the INCLUDE CI_EKKODB (in table EKKO).
You incorporate your customer fields for the Document Item in the INCLUDE CI_EKPODB (in table EKPO).
If you use the Enhancement,U must create & generate the following dynpros (even if the dynpros are not going to be used):
– SAPLXM06 0101 Subscreen Header Purchase Order
– SAPLXM06 0201 Subscreen Header Outline Agreement
– SAPLXM06 0301 Subscreen Header RFQ
– SAPLXM06 0111 Subscreen Item Purchase Order
– SAPLXM06 0211 Subscreen Item Outline Agreement
– SAPLXM06 0311 Subscreen Item RFQ
You must identify all dynpros as subscreens. It is not necessary that they contain fields, but it is essential that they exist in order that no program abend occurs.
The Dynpros are linked to the Standard Program via Function Modules.There are Function Modules that provide your subscreen with data (Export) and Function Modules that fetch data from your subscreens (Import).
-> Header Screens :
– EXIT_SAPMM06E_006 – Export Data to Customer Subscreen for Purchasing Document Header (PBO)
– EXIT_SAPMM06E_007 – Export Data to Customer Subscreen for Purchasing Document Header (PAI)
– EXIT_SAPMM06E_008 – Import Data from Customer Subscreen for Header
-> Item Screens :
– EXIT_SAPMM06E_016 – Export Data to Customer Subscreen for Item (PBO)
– EXIT_SAPMM06E_017 – Export Data to Customer Subscreen for Item (PAI)
– EXIT_SAPMM06E_018 – Import Data from Customer Subscreen for Item
Step by Step
1. Create Project Enhancement use tcode CMOD.
Type Project name and klik Create, on next screen type your description, then klik Enhancement Assigment.
2. Type MM06E005 on Enhancement Assignments, klik Components.
- CI_EKKODB : Header Data
- CI_EKPODB : Item Data
to create screen for PO Header, double klik on Screen Exit 0101, You must choose Subscreen Screen Type
Then create layout screen like this or according to your requirement
we can put logic for screen modified in PBO, we can disable input or enable input to your custom field, if ME23N your custom field only display but when user run change PO ( ME22N) your custom field will enabled.
MODULE status_0101 OUTPUT.
IF gv_trtyp = 'A'.
LOOP AT SCREEN.
IF screen-group1 EQ 'POC'.
screen-input = 0.
LOOP AT SCREEN.
IF screen-group1 EQ 'POC'.
screen-input = 1.
- – EXIT_SAPMM06E_006 – Export Data to Customer Subscreen for Purchasing Document Header (PBO)
- – EXIT_SAPMM06E_008 – Import Data from Customer Subscreen for Header
EXIT_SAPMM06E_008 is exit to import data from your customer subscreen to header data ( EKKO ). so your custom data can save into EKKO table
IF gv_trtyp = 'V'.
IF gs_ekko-postat IS NOT INITIAL.
gs_ekko-porelease = sy-uname.
gs_ekko-porelease = ''.
MOVE-CORRESPONDING gs_ekko TO e_ci_ekko.
IF gv_trtyp NE 'A'.
e_ci_update = 'X'.
EXIT_SAPMM06E_006 is exit to put your custom data into custom screen.
DATA : ls_tekpo TYPE bekpo.
gv_trtyp = i_trtyp.
"only custom data
MOVE-CORRESPONDING i_ekko TO gs_ekko.
DATA : gv_trtyp(1) TYPE c,
gv_noscr(1) TYPE c,
gs_ekko TYPE ekko_ci,
gs_hekko TYPE ekko.
So if you want to more understand about SAP ABAP Enhancement, I Highly recomended that you check out this good book.
Incoming search terms:
- https://www saptutorial org/add-customs-field-in-header-purchase-order-me21n/
- SCREEN ENHANCEMENT IN ME21N
- ABAP EKKO CHANGE
- badi TC_CHANGE can not change NETPR
- sap me23n tabe control ffield size cant be changed
- field custom type quan ekko bapi_contract_create
- where is release fieldd getting updated in me22n
- custom field purchase order for me23n in sap abap
- custom field on purchase order item
- add fields to customer data tab me21n