Application Development 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: 

regarding export and import

Former Member
0 Kudos

hi

i have to change the delivery address in PR created through iw31,iw32,ip10.

for this first i have to get the address number

from the include program cozf0001 through the structure field CAUFVD_IMP-TPLNR.

This value i have <u>to export to temporary memory.</u>

Then in the second include program MMDA0001 i <u>have to

import this value.</u>

But when iam using EXPORT and IMPORT statements

it is not working.

can any one please help me in this.

2)( This is not mandatory only for reference, only the first point is import for me ) can any one resolve how to communicate through

memory for simple 2 different programs.

6 REPLIES 6

anversha_s
Active Contributor
0 Kudos

Hi,

chk this.

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.



*-------- for Z1
DATA : PERNR LIKE P0001-PERNR.
PERNR = '00004556'.
EXPORT PERNR TO MEMORY ID 'PERNR'.

*-------- For Z2 (Include program)
DATA : PERNR LIKE P0001-PERNR.
IMPORT PERNR FROM MEMORY ID 'PERNR'.
BREAK-POINT

rgds

Anver

if hlped pls mark points

0 Kudos

hi anversha

please check the code u mailed to u

i tried so many times like this only

but i didnt get any output.

*----


for Z1

DATA : PERNR LIKE P0001-PERNR.

PERNR = '00004556'.

EXPORT PERNR TO MEMORY ID 'PERNR'.

*----


For Z2 (Include program)

DATA : PERNR LIKE P0001-PERNR.

IMPORT PERNR FROM MEMORY ID 'PERNR'.

BREAK-POINT. (or) write PERNR.

Former Member
0 Kudos

Hi,

Check by using set parameter id and get parameter id, since here we r storing & retrieving the content from SAP memory (ie, Global memory ) u may get u r desired requirement.

if u r unable to get it then check the code once again

0 Kudos

hi sree

i tried by using set and get parameters

also but iam not getting the output

please check this in your system and reply me

REPORT ZEX1 .

DATA : PERNR LIKE P0001-PERNR.

PERNR = '00004556'.

*EXPORT PERNR TO MEMORY ID 'PERNR'.

SET PARAMETER ID 'PERNR' FIELD PERNR.

=================================================

=================================================

REPORT ZEX2

DATA : PERNR LIKE P0001-PERNR.

GET PARAMETER ID 'PERNR' FIELD PERNR.

*IMPORT PERNR FROM MEMORY ID 'PERNR'.

write PERNR.

Former Member
0 Kudos

Hi kiran,

report zex1.

DATA : pernr LIKE p0001-pernr.

pernr = '00004556'.

*EXPORT pernr TO MEMORY ID 'PERNR'.

SET PARAMETER ID 'PERNR' FIELD PERNR.

*SUBMIT zex2.

report zex2

DATA : pernr LIKE p0001-pernr.

GET PARAMETER ID 'PERNR' FIELD PERNR.

*IMPORT pernr FROM MEMORY ID 'PERNR'.

WRITE pernr.

First u execute the zex1 program so that pernr value will be stored in memory.

Then u execute zex2 program so that it can get it from memory

*********************************************************

report zex1.

DATA : pernr LIKE p0001-pernr.

pernr = '00004556'.

EXPORT pernr TO MEMORY ID 'PERNR'.

*SET PARAMETER ID 'PERNR' FIELD PERNR.

SUBMIT zex2.

report zex2.

DATA : pernr LIKE p0001-pernr.

*GET PARAMETER ID 'PERNR' FIELD PERNR.

IMPORT pernr FROM MEMORY ID 'PERNR'.

WRITE pernr.

u execute zex1 then u get the o/p which u require

I have tried in my system it is working

0 Kudos

hi sree,

now it is working

but i want to use only temporary memory

so in that case i have to use only export and import

but it is 2 different programs

Normally if we use export and import then we have to

go through submit statement.

Here i have to use export and import between 2 different

programs which should not be called through submit keyworkd

whether it is possible, but it should be ,

how is it?

please try it and reply me