Skip to Content
Former Member
May 23, 2006 at 12:29 PM

help Needed on ME_PROCESS_PO_CUST badi


Hi Friends,

I have implemented PROCESS_ITEM method of above mentioned BADI.

<b>My Requirement</b>: Check if price value in Purchase requisition is 0 , Then set FREE(mepoitem-umson) field to X.Basically , i am creating PO's from Purchase req's from ME59N.

COde inside method:

*Data Declarations

DATA: ls_mepoitem TYPE mepoitem,

ls_mepoitemx type mepoitemx,

ls_customer TYPE mepo_badi_exampl,

ls_tbsg TYPE tbsg.

INCLUDE mm_messages_mac. "useful macros for message handling

*here we get item data

ls_mepoitem = im_item->get_data( ).

*work area for price value

data : begin of it_eban,

banfn type mepoitem-banfn,

bnfpo type mepoitem-BNFPO,

pries type mepoitem-NETPR,

end of it_eban.

*Get the Purchase requisition price from EBAN table

select single banfn bnfpo preis from eban into it_eban


banfn = ls_mepoitem-banfn

and bnfpo = ls_mepoitem-bnfpo.

*if entry is available.

if sy-subrc eq 0.

*check if price is zero

if it_eban-pries EQ 0.

*if zero, set FREE field of PO to 'X'.

ls_mepoitem-umson = 'X'.

ls_mepoitemx-umson = 'X'.



But, it is not setting FREE field in PO line item to 'X'.

Please lemme know, if anymore coding is necessary to set FREE field to 'X' in Respective PO.