‎2015 Apr 24 5:33 PM
Hi Experts.
i have used import statement in a BTE as below.
EXPORT it_bseg FROM MEMORY ID 'ZBD1'.
i have used export statement in a implicit enhancement of FM 'POST_DOCUMENT.
EXPORT it_bseg FROM MEMORY ID 'ZBD1'.
if i check in the debug mode , the internal table 'it_bseg' is empty.
please suggest.
Thanks
NK.
‎2015 Apr 24 5:36 PM
You say you're IMPORTing, but you actually appear to be EXPORTing.
Rob
‎2015 Apr 24 5:44 PM
sorry, Its my bad, its an Typo in therad discussion.
i used as below in my program
i have used export statement in a BTE as below.
EXPORT it_bseg to MEMORY ID 'ZBD1'.
i have used import statement in a implicit enhancement of FM 'POST_DOCUMENT.
IMPORT it_bseg FROM MEMORY ID 'ZBD1'.
please help me.\
thanks
NK
‎2015 Apr 24 6:22 PM
for test purpose i used the below code in same BTE only.
EXPORT it_bseg1 TO MEMORY ID 'ZZKONTL'
IMPORT it_bseg1 to it_bseg2 from MEMORY ID 'ZZKONTL'.
if i see in debugging the data is transfered from it_bseg1 to it_bseg2 success fully..
if place the second line (IMPORT it_bseg1 to it_bseg2 from MEMORY ID 'ZZKONTL') in the FM.
both the table it_bseg1 and it_bseg2 are blank.
what could be the reason.
thanks
NK
‎2015 Apr 24 7:42 PM
Post_document is a update module, so it works in a different workprocess. How they work in different workprocess, the memory area also is different.
When you are working in different workprocess, you need to use EXPORT ... TO DATABASE / IMPORT ...FROM DATABASE.
DATA wa_indx TYPE indx.
EXPORT it_bseg FROM it_bseg TO DATABASE indx(XY) FROM wa_indx ID 'TABLE'.
IMPORT it_bseg TO it_bseg FROM DATABASE indx(XY) ID 'TABLE'.
‎2015 Apr 24 10:52 PM
Thanks for responses and i resolved the issue as below
The FM is internally calling background mode,
so i coded as below and it working fine now.
in BTE,
EXPORT it_bseg2 to SHARED BUFFER indx(st) id 'ZIBT'.
in FM
IMPORT it_bseg2 = it_bseg2 FROM SHARED BUFFER indx(st) ID 'ZIBT'.
Thanks