Professional Documents
Culture Documents
Document Details
Object Id Description
:
Owner ( Functional consultant) Suresh / Manoj Technical Consultant Gnaneswari Kumaresan
RE00 09
Transport Request
Program Name
DREK900227
ZMM_MPNA(CMOD)
1.Functional Specification
While Creating the Purchase Order, single plant that has been entered in first Line item should be followed for all line items in ME21N, ME22N transactions as required by business requirement.
Description
Multiple Plants Not allowed for Single Purchase Order
Business Process:
Creating the Purchase Order in Me21N , single plant that has been entered in first Line item should be followed for all line items else needs to throw error message for corresponding line items if different plants are entered.
2. Technical Specification
Logic and Data Flow
Find the User Exits using Transaction code SE84. Find the Application Package or Development class for the required development. Go to SE84 Transaction code, in the left corner of the Navigation, Enhancements option will be there find User Exits. Select the option Customer Exits, Double click it will show one screen on the right side of the same window and provide the package name. Then press F8 Or Execute, Then it will show the available list of user Exits available for the particular transaction ME21N, then select M06E0004 which is suitable for getting line items of ME21N. Now go to T-code CMOD, create a Project name ZMM_MPNA. Then click on Enhancement Assignments button, provide the M06E0004 under enhancement title Now click on Components Button. It will provide the Function Exits used. Double click on the Function Exit EXIT_SAPLEBND_002 and write the below code in the include zxm06u22. Sample code written inside the User-exit.
" PO number
Page 2 of 3
IF sy-ucomm = 'MESAVE' OR sy-ucomm = 'MECHECKDOC'. gt_bekpo[] = it_bekpo[]. READ TABLE gt_bekpo INTO gs_bekpo INDEX 1. IF sy-subrc = 0. gv_werks = gs_bekpo-werks. gv_ebeln = gs_bekpo-ebeln. ENDIF. LOOP AT gt_bekpo INTO gs_bekpo. IF sy-tabix NE 1. IF gs_bekpo-werks NE gv_werks. " checking plant validat ion. MESSAGE e906(zmm_001) WITH gs_bekpo-ebelp. ENDIF. ENDIF. ENDLOOP. ENDIF. e_cekko = i_cekko.