2006 Sep 07 10:37 AM
Hi Chaps
I have a program as follows
FORM x.
DATA lv_val(3) TYPE c VALUE 'EXP'.
EXPORT lv_val TO MEMORY ID 'table'.
CALL TRANSACTION 'xyz'.
ENDFORM.
My question:
WIll i be able to retrieve the exported value in any function module of transaction xyz?
I am not getting it despite the following statment
IMPORT lv_val FROM MEMORY ID 'table' in a FM in transaction XYZ.
Should i only use the SAP memory in this case?
2006 Sep 07 11:45 AM
Hi janardhan,
1. When u use memory id, make sure of the
following points.
a) The memory id is SAME as the variable name
b) Memory id should be in CAPITAL
c) When u want to import,
the variable name should be same as original one,
and should be declared in the same fashion only.
regards,
amit m.
Hi janardhan,
1. When u use memory id, make sure of the
following points.
a) The memory id is SAME as the variable name
b) Memory id should be in CAPITAL
c) When u want to import,
the variable name should be same as original one,
and should be declared in the same fashion only.
regards,
amit m.
2006 Sep 07 10:39 AM
Hi Janardhan,
You can retrieve the exported value.
Regards,
Ram
2006 Sep 07 10:40 AM
check table <b>TPARA</b> , MEMORY ID IS THERE OR NOT IF NOT MAKE IT.
2006 Sep 07 11:40 AM
Hi Kishan,
I added the memory id in the table TPARA. But still Import doesnot fetch the value within the new transaction.
-
Jana
2006 Sep 07 10:41 AM
YOu have to use SPA?GPA parameters ..i.e sap memory for this requirement i guess.
SET PARAMETER ID pid FIELD f.
GET PARAMETER ID pid FIELD f.
Regards,
ravi
2006 Sep 07 10:43 AM
You can retrive it .but before that u should maintain that parameter if its not there in TPARA.
2006 Sep 07 11:45 AM
Hi janardhan,
1. When u use memory id, make sure of the
following points.
a) The memory id is SAME as the variable name
b) Memory id should be in CAPITAL
c) When u want to import,
the variable name should be same as original one,
and should be declared in the same fashion only.
regards,
amit m.
2006 Sep 07 11:56 AM
Hi Amith,
Thanks for the answer. I have taken care of the mentioned points. However, "IMPORT" doesnt fetch the value.
In the transaction I am calling after export statement, the variable is a Global Variable. However, in the variable used for the export statement is local to the program. Otherwise, everything else is same. I have also added the id in the table TPARA.
Could you please help further ?
-
Jana
2006 Sep 07 12:15 PM
Hi again,
1. I just tried now,
and it works perfectly fine.
2. Local and global variables, do not matter.
3. just make sure all the points are satisfied.
4. To get a taste of it, just do this :
(This works absolutely fine)
a) make any z1 program and copy paste the code.
b) make another z2 program with tcode ZTR01.
*----
for Z1
report abc.
DATA : PERNR LIKE P0001-PERNR.
PERNR = '00004556'.
EXPORT PERNR TO MEMORY ID 'PERNR'.
CALL TRANSACTION 'ZTR01'.
*----
For Z2 (having tcode ZTR01)
report abc.
DATA : PERNR LIKE P0001-PERNR.
IMPORT PERNR FROM MEMORY ID 'PERNR'.
BREAK-POINT.
regards,
amit m.
2006 Sep 07 12:21 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |