2015 Mar 19 6:40 PM
Dear Experts,
I have 2 FMs in one ZFM I am Export internal table and Importing same data in another FM.
My issue is data is not exporting into memory id in source FM.
Code : EXPORT t_bsegc[] TO MEMORY ID 'ABC'.
After this command executes sy-subrc set to 4.
Can any one let me know the correct syntax of export.
Thanks,
Raj,,,
2015 Mar 19 7:06 PM
2015 Mar 19 7:06 PM
2015 Mar 19 7:15 PM
Thanks for your quick reply....yes i searched that document i wrote same like that.
But it is not working in my FM
2015 Mar 19 7:23 PM
Try:
EXPORT t_bsegc TO MEMORY ID 'ABC'. (No square brackets.)
Rob
2015 Mar 19 7:30 PM
Hi Raj,
Try this
EXPORT itab = i_tab TO MEMORY ID 'ITAB'.
IMPORT itab = i_tab FROM MEMORY ID 'ITAB'.
i_tab is your internal table,
ITAB memory area.
Thales Schmidt
2015 Mar 19 7:30 PM
2015 Mar 19 7:35 PM
2015 Mar 19 7:36 PM
What do you mean by 'not working'? Is sy-subrc still 4? Or are you not able to import it? Or something else?
Rob
2015 Mar 19 7:40 PM
Based on your example, it would be like this:
EXPORT abc = t_bsegc TO MEMORY ID 'ABC'.
IMPORT abc = t_bsegc FROM MEMORY ID 'ABC'.
or EXPORT t_bsegc = t_bsegc TO MEMORY ID 'ABC'. I can't remember exactly
If your table doesnt have a header line, you dont need the brackets.
Thales Schmidt
2015 Mar 19 7:42 PM
2015 Mar 19 7:52 PM
2015 Mar 19 7:56 PM
Thasles,
Thanks for your reply..I tried same thing as you suggested but still it is not working.
Exporting in ZFM.
Code : EXPORT ex_bsegc = ex_bsegc TO MEMORY id 'ZCASH'.
Importing in standard FM ( POST_DOCUMENT) it is Updated FM.
Code : IMPORT ex_bsegc = ex_bsegc FROM MEMORY id 'ZCASH'.
Thanks,
Raj....
2015 Mar 19 7:57 PM
2015 Mar 19 8:06 PM
2015 Mar 19 8:24 PM
Well, there seems to be something else going on here. I can find no documentation that says that sy-subrc is set to 4 for the EXPORT statement. If it fails, it raises an exception.
IMPORT, on the other hand, does set sy-subrc to 4 if no data is imported.
So, are you sure there is any data in the table you are exporting??
Rob
2015 Mar 19 8:24 PM
Thanks a lot Thales....It is working fine.
I will give you party...one fine day.
Regards,
Raj,,
2015 Mar 19 8:24 PM
Hi! Try this(used a 'TO' instead '=' in IMPORT)
EXPORT FIELD = lt_variable1 TO MEMORY ID 'YOURID'.
IMPORT FIELD TO lt_variable2 FROM MEMORY ID 'YOURID'.
Regards!