Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in Import and export

Former Member
0 Likes
1,115

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,064

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.

10 REPLIES 10
Read only

Former Member
0 Likes
1,064

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

Read only

Former Member
0 Likes
1,064

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

Read only

Former Member
0 Likes
1,065

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.

Read only

Former Member
0 Likes
1,064

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 .

Read only

Former Member
0 Likes
1,064

Hi All,

I have checked the spelling for bith the cases .

They are same . Please suggest any alternate way .

Regards

Arun.

Read only

0 Likes
1,064

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.

Read only

former_member265047
Active Participant
0 Likes
1,064

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

Read only

Former Member
0 Likes
1,064

Hi,

Place your memory id variable in quotations and check

regards

padma

Read only

Former Member
0 Likes
1,064

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.

Read only

0 Likes
1,064

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.