Skip to Content
0
Former Member
Sep 13, 2007 at 10:04 AM

How to change value in BADI

68 Views

I want to change value of field afnam based on the following code below in BADI ME_PROCESS_REQ_CUST.

But this code give me endless loop. Is there anything missing in my coding?Please correct me, Thank you.

data : obj_pr type MEREQ_ITEM,

wa_eine type eine.

CALL METHOD IM_ITEM->get_data

RECEIVING

re_data = obj_pr.

if obj_pr-infnr <> space.

select single * into wa_eine from eine

where infnr = obj_pr-infnr.

if sy-subrc = 0.

obj_pr-afnam = wa_eine-effpr.

endif.

endif.

CALL METHOD IM_ITEM->set_data

EXPORTING

im_data = obj_pr.