Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

po should not get posted without pr ref

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use exit MM06E005 FM : EXIT_SAPMM06E_017.

Add this code :


    IF i_ekpo-banfn IS INITIAL.
      MESSAGE e404(06).
    ENDIF.

Regards

Ikrar

6 REPLIES 6

Former Member
0 Kudos

Use exit MM06E005 FM : EXIT_SAPMM06E_017.

Add this code :


    IF i_ekpo-banfn IS INITIAL.
      MESSAGE e404(06).
    ENDIF.

Regards

Ikrar

0 Kudos

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.

0 Kudos

Pls. check this exit / enhancement....ME_PROCESS_PO_CUST

0 Kudos

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.

0 Kudos

Hi Ram,

Which method you tried in this badi ME_PROCESS_PO_CUST. Please paste your code.

Regards,

Madhu.

0 Kudos

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