Skip to Content
0
Aug 02, 2013 at 02:53 PM

Badi ME_PROCESS_REQ_CUST Method SET_DATA not updating table

943 Views

Hi Experts,

I am facing difficulty while trying to change BLCKD value on Purchase Requisition creation/change. In debugger value is getting changed but database table is not updating.

I have checked much thread but not found anything suitable.

Please help me on this.

Regards,

Amrendra

Below code is written on the methods PROCESS_ITEM, POST and CHECK.

------------------------------------------------------------------

DATA: I_ITEMS TYPE MMPUR_REQUISITION_ITEMS,
WA_ITEM LIKE LINE OF I_ITEMS,
LV_IF_ITEM TYPE REF TO IF_PURCHASE_REQUISITION_ITEM,
LT_ITM_DATA TYPE MEREQ_ITEM,
LX_ITM_DATA TYPE MEREQ_ITEMX.

CALL METHOD IM_HEADER->GET_ITEMS
RECEIVING
RE_ITEMS = I_ITEMS.


LOOP AT I_ITEMS INTO WA_ITEM.

LV_IF_ITEM = WA_ITEM-ITEM.

CALL METHOD LV_IF_ITEM->GET_DATA
RECEIVING
RE_DATA = LT_ITM_DATA.

CALL METHOD LV_IF_ITEM->GET_DATAX
RECEIVING
RE_DATAX = LX_ITM_DATA.

IF LT_ITM_DATA-FRGGR IS INITIAL. " If release code is not available


LX_ITM_DATA-BLCKD = 'X'.

CALL METHOD LV_IF_ITEM->SET_DATAX
EXPORTING
IM_DATAX = LX_ITM_DATA.

LT_ITM_DATA-BLCKD = '1'.

CALL METHOD LV_IF_ITEM->SET_DATA
EXPORTING
IM_DATA = LT_ITM_DATA.

ENDIF.
ENDLOOP.

----------------------------------------------------