‎2005 Nov 10 2:32 PM
Hi,
I have a screen where the user selects a value. I want to insert that into a table in a BADI method.
I try to do the following:
EXPORT TTXJ-TXJCD TO MEMORY.
when i check for syntax i get a warning message
"the EXPORT statement without ID specification exists only for the sake of compatibility with R/2. It should not be used because of unforeseeable effect"
In my BADI's POST_DOCUMENT method, I use
DATA TXJ TYPE C.
IMPORT TXJ FROM MEMORY.
When i do syntax check, i get the same message but it is shown as an error now !!
What is wrong ??
My requirement is to exchange the selected value. Is there anyother way it could be done ??
thanks
‎2005 Nov 10 2:38 PM
Hi,
In ABAP objects you have to EXPORT/IMPORT paramenters with reference to a ID.
USe like
EXPORT ZZRESWK FROM ZZRESWK TO MEMORY ID 'ZPDT1'.
IMPORT ZZRESWK TO ZZRESWK FROM MEMORY ID 'ZPDT1'.
Hope this will help.
‎2005 Nov 10 2:37 PM
Hi ,
try to use
EXPORT TTXJ-TXJCD TO MEMORY ID 'ZTXJCD'.
IMPORT TTXJ-TXJCD FROM MEMORY ID 'ZTXJCD'.
Here the ID 'ZTXJCD' is arbitrary, but have to be the same in import end export
Regards, Manuel
‎2005 Nov 10 2:40 PM
‎2005 Nov 10 2:46 PM
Thanks Manuel. The Export statement did work, but import failed !!!
For that I typed
DATA TXJ TYPE C.
IMPORT TTXJ-TXJCD to TXJ FROM MEMORY ID 'ZTXJCD'.
no errors as of now...let me check if this works as desired...
thanks..
‎2005 Nov 10 2:53 PM
‎2005 Nov 10 2:38 PM
Hi,
In ABAP objects you have to EXPORT/IMPORT paramenters with reference to a ID.
USe like
EXPORT ZZRESWK FROM ZZRESWK TO MEMORY ID 'ZPDT1'.
IMPORT ZZRESWK TO ZZRESWK FROM MEMORY ID 'ZPDT1'.
Hope this will help.
‎2005 Nov 10 2:46 PM
Hi,
While exporting and importing we need to specify the ID, so that the values will be stored with that ID.
You can do that by
EXPORT TTXJ-TXJCD TO MEMORY ID 'ZTXJCD'.
Then you can import it by
IMPORT TTXJ-TXJCD FROM MEMORY ID 'ZTXJCD'.
While importing or exporting make sure that the particular variable is visible in that routine. Otherwise you can use a different variables to hold these values.
DATA: V_TXJCD LIKE TTXJ-TXJCD.
IMPORT TTXJ-TXJCD TO V_TXJCD FROM MEMORY ID 'ZTXJCD'.
Thanks
Giridhar
Message was edited by: Giridhar Nayudu