Application Development and Automation 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: 
2 REPLIES 2
Read only

Former Member
0 Likes
458

Hi ,

try this : BADI to block the purchase order , ( ME_PROCESS_PO_CUST )

Definition Name: ME_PROCESS_PO_CUST

Interface Name : IF_EX_ME_PROCESS_PO_CUST

Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN

Method : PROCESS_HEADER

METHOD if_ex_me_process_po_cust~process_header .

DATA : re_data TYPE mepoheader.

*get the item data

CALL METHOD im_header->get_data

RECEIVING

re_data = re_data.

re_header = re_data.

IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).

IF ( re_data-bsart <> 'ZIC' AND re_data-bsart <> 'UB' ).

IF re_data-bukrs NE '1001'.

MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'

'Code for External Procurement'.

ENDIF.

ENDIF.

ENDIF.

ENDMETHOD.

regards

Deepak.