Skip to Content
0
Former Member
Jan 05, 2007 at 07:52 PM

MB_DOCUMENT_BADI.

190 Views

Hi,

Documentation for this BADI says we cannot access global fields defined in class as methods are called at different time,so I am trying to Use EXPORT/IMPORT to pass on internal table to Update Method.

I am using this in Before Update Method

select * into table it_itab from i_tab where regio = 'XX'.

read table it_itab into it_itab1 index 1.

it_itab1-regio = 'ABC'.

MODIFY it_itab FROM it_itab1 INDEX 1.

EXPORT it_itab from it_itab TO MEMORY ID 'XXXX'.

ENDIF.

and Code in Update Method , will read from Memory id 'XXXX'.

IMPORT it_itab to it_itab FROM MEMORY ID 'XXXX'.

INSERT i_tab1 FROM it_itab.

free memory id 'XXXX'.

But it is inserting blank record into i_tab1, any idea why??

Thanks

Lakhbir