‎2008 Jul 17 6:43 AM
Hi friends,
i have a requirement that i am exporting a value in a FM and importing the same in a report . i am using both with in the memory . The syntax i am using is like this
in FM
Export wf_variable to memory id co_memory_key .
in report i am doing
import wf_varaible from memory id co_memory_key .
but i am unable to import the value in report . is there any thing to be done if i need to get it from memeory . the key i am using is also a unique key . Please suggest how shall i proceed .
Regards
Arun.
‎2008 Jul 17 6:52 AM
Hi arun,
The syntax you are using is fine but has to be cahnged a bit.
Actually when you doin import and export, u need to have a variable which has temporary memory and need not be declared in the data statements.
For Eg:
EXPORT v_bukrs FROM p_bukrs TO MEMORY ID l_c_bukr.
IMPORT v_bukrs to v_com from MEMORY ID l_c_bukr.
here the variable v_bukrs is the temp variable which does not need declaration.
Hope this helps.
Thanx,
Navin.
‎2008 Jul 17 6:50 AM
wht u did is right ..............
in FM
Export wf_variable to memory id 'A' .
in report i am doing
import wf_variable from memory id 'A' .
check ur variable(spelling)......holds value properly r not.......
Regards
Anbu
Edited by: Anbu B on Jul 17, 2008 7:50 AM
‎2008 Jul 17 6:50 AM
Hi
Export wf_variable to memory id co_memory_key .
in report i am doing
import wf_varaible from memory id co_memory_key .
check the name... both are different... use the same name
regards
padma
‎2008 Jul 17 6:52 AM
Hi arun,
The syntax you are using is fine but has to be cahnged a bit.
Actually when you doin import and export, u need to have a variable which has temporary memory and need not be declared in the data statements.
For Eg:
EXPORT v_bukrs FROM p_bukrs TO MEMORY ID l_c_bukr.
IMPORT v_bukrs to v_com from MEMORY ID l_c_bukr.
here the variable v_bukrs is the temp variable which does not need declaration.
Hope this helps.
Thanx,
Navin.
‎2008 Jul 17 6:55 AM
Hi,
while importing check value(memory id name) passed in co_memory_key.
Export wf_variable to memory id co_memory_key .
IMPORT wf_varaible FROM MEMORY ID co_memory_key .
‎2008 Jul 17 6:56 AM
Hi All,
I have checked the spelling for bith the cases .
They are same . Please suggest any alternate way .
Regards
Arun.
‎2008 Jul 17 7:06 AM
Hi,
Use database cluster for export import...
in FM:
EXPORT wf_variable FROM wf_variable
TO SHARED MEMORY indx(xy)
FROM wa
CLIENT sy-mandt
ID 'MIZ'.
in report :
IMPORT wf_variable TO wf_variable
FROM SHARED MEMORY indx(xy)
TO wa
CLIENT sy-mandt
ID 'MIZ'.
Regards,
Joy.
‎2008 Jul 17 6:58 AM
Hi Arun,
you can try like this..
In FM:
data wf_variable(30) value 'Naveen'.
Export wf_variable to memory id 'CO_MEMORY_KEY'.
In program...
data wf_variable(30).
import wf_variable from memory id 'CO_MEMORY_KEY'.
it will work...
otherwise you can go with SPA/GPA technique to transfer the data between programs.
Regards,
Naveen Veshala
‎2008 Jul 17 7:05 AM
Hi,
Place your memory id variable in quotations and check
regards
padma
‎2008 Jul 17 7:31 AM
Hi Guys,
Thanks you all for your timely suggestions . But i donot know why still i am unable to import the value . Though in different other places i have used the same and got results .
Hi Joy ,
Can you please provide me some details of transfer through Data clusters.
Regards
Arun.
‎2008 Jul 17 7:37 AM
Hi ..try this code:
Data clusters can be done in various ways..one way is to store in indx table. Pl. see the sample code for details....
REPORT zexport.
data: werks type werks_d.
DATA: wa TYPE indx.
werks = '1000'.
EXPORT werks FROM werks
TO SHARED MEMORY indx(xy)
FROM wa
CLIENT sy-mandt
ID 'MID'.
REPORT zimport.
data: werks type werks_d.
DATA: wa TYPE indx.
IMPORT werks TO werks
FROM SHARED MEMORY indx(xy)
TO wa
CLIENT sy-mandt
ID 'MID'.
write werks.
Regards,
Joy.