10-14-2011 7:06 AM
Hello Exports,
My client requirement is "PR is mandatory while creating po in ME21N" , What i got in sdn is Through OMET tcode it is
possible but My functional guy told me that it is not possible .I didnot find any exact Badi or User exit for this purpose.
Pls help me.
10-14-2011 8:00 AM
Use exit MM06E005 FM : EXIT_SAPMM06E_017.
Add this code :
IF i_ekpo-banfn IS INITIAL.
MESSAGE e404(06).
ENDIF.
Regards
Ikrar
10-14-2011 8:00 AM
Use exit MM06E005 FM : EXIT_SAPMM06E_017.
Add this code :
IF i_ekpo-banfn IS INITIAL.
MESSAGE e404(06).
ENDIF.
Regards
Ikrar
10-14-2011 10:07 AM
Hi,
Thank for giving immediate response ,but it is not getting .
my req is while saving purchase order purchase requisition should not empty for particular document type in me21n tcode,
pls help me in this.
10-14-2011 11:27 AM
10-14-2011 11:34 AM
Hi ,
Thank u for immediate response, I tried using badi " Me_process_po_cust " but not getting ,
My requirement is "While creating po in me21n tcode pr is mandatory for particular document type"
Please give me the procedure using badi. Anybody pls help me in this.
10-15-2011 12:58 PM
Hi Ram,
Which method you tried in this badi ME_PROCESS_PO_CUST. Please paste your code.
Regards,
Madhu.
10-18-2011 4:57 AM
Hi Ram,
You can use BADI method process_item.
Below is the sample coding how to call the header data to check the document type and to call the Item data and to check and put the error message.
DATA : LS_MEPOHEADER TYPE MEPOHEADER,
LS_MEPOITEM TYPE MEPOITEM.
CALL FUNCTION 'MEPO_DOC_HEADER_GET'
IMPORTING
EX_EKKO = LS_MEPOHEADER.
IF LS_MEPOHEADER-BSART = 'ZINT'.
CALL METHOD IM_ITEM->GET_DATA
RECEIVING
RE_DATA = LS_MEPOITEM.
if ls_mepoitem-banfn is initial.
message e000 'Error'.
endif.
endif.
You can also do this in Process_check method.
Thanks,
vamshi