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 ,
You can,
– Maintain/Supply your own Customer Fields in the Headers & Items of all Purchasing documents except Purchase Requisitions
– Update your own Customer-Specific Tables
You cannot,
– 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
INCLUDES
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).
Dynpro Areas
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.
Functional Exits
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
MODULE status_0101 OUTPUT. IF gv_trtyp = 'A'. LOOP AT SCREEN. IF screen-group1 EQ 'POC'. screen-input = 0. MODIFY SCREEN. ENDIF. ENDLOOP. ELSE. LOOP AT SCREEN. IF screen-group1 EQ 'POC'. screen-input = 1. MODIFY SCREEN. ENDIF. ENDLOOP. ENDIF. ENDMODULE. |
- – 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
IF gv_trtyp = 'V'. IF gs_ekko-postat IS NOT INITIAL. gs_ekko-porelease = sy-uname. ELSE. gs_ekko-porelease = ''. ENDIF. ENDIF. MOVE-CORRESPONDING gs_ekko TO e_ci_ekko. IF gv_trtyp NE 'A'. e_ci_update = 'X'. ENDIF. |
EXIT_SAPMM06E_006 is exit to put your custom data into custom screen.
1 2 3 4 5 6 |
DATA : ls_tekpo TYPE bekpo. gv_trtyp = i_trtyp. "only custom data MOVE-CORRESPONDING i_ekko TO gs_ekko. |
ZXM06TOP
1 2 3 4 |
DATA : gv_trtyp(1) TYPE c, gv_noscr(1) TYPE c, gs_ekko TYPE ekko_ci, gs_hekko TYPE ekko. |
Result:
So if you want to more understand about SAP ABAP Enhancement, I Highly recomended that you check out this good book.
Incoming search terms:
- hoe to save custom PO data in ekko table
- sap custom fields in purchase order
- sap example ME_GUI_PO_CUST
- sap add fields to PO header
- enhancement assignment to mm06e005
- extend po header data
- creating custom fields in headers
- custom field add to me21n header in sap abap
- CI_EKKODB
- adding custom fields to customer data at header level in me21