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 import and export memory

Former Member
0 Kudos
116

hi, currently i have encountered this problem when i am using the import and export memory statement. After i export my table name from program1 to program2, i do an import statement at program2 to retrieve the table name but there is a problem in retrieving the name. Below are the codes.

PROGRAM1's codes:

EXPORT IO_TABLE TO MEMORY ID MEM_STR.

SUBMIT PROGRAM2 AND RETURN.

PROGRAM2's codes:

IMPORT IO_TABLE TO MEMORY ID MEM_STR.

P_TABLE = IO_TABLE.

FREE MEMORY ID MEM_STR.

CLEAR MEM_STR.

1 ACCEPTED SOLUTION

VB09104
Active Participant
0 Kudos
65

Hi,

use

EXPORT IO_TABLE TO MEMORY ID 'MEM_STR'

or else try out for

SET PARAMETER ID and GET PARAMETER ID

Regards,

Vikas.

plz reward if helpful..

4 REPLIES 4

VB09104
Active Participant
0 Kudos
66

Hi,

use

EXPORT IO_TABLE TO MEMORY ID 'MEM_STR'

or else try out for

SET PARAMETER ID and GET PARAMETER ID

Regards,

Vikas.

plz reward if helpful..

Former Member
0 Kudos
65

Hi,

u need to use FROM while importing data.

below are syntaxes

- IMPORT obj1 ... objn FROM DATA BUFFER f.

- IMPORT obj1 ... objn FROM MEMORY.

- IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.

- IMPORT obj1 ... objn FROM SHARED BUFFER itab(ar) ID key.

- IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.

- IMPORT obj1 ... objn FROM DATASET dsn(ar) ID key.

- IMPORT obj1 ... objn FROM LOGFILE ID key.

- IMPORT DIRECTORY INTO itab FROM DATABASE dbtab(ar) ID key.

tc

saji

Former Member
0 Kudos
65

Hi, check this one

PROGRAM1's codes:

EXPORT IO_TABLE TO MEMORY ID MEM_STR.

SUBMIT PROGRAM2 AND RETURN.

PROGRAM2's codes:

IMPORT from MEMORY ID MEM_STR to io_table.

P_TABLE = IO_TABLE.

FREE MEMORY ID MEM_STR.

CLEAR MEM_STR.

Regards

Former Member
0 Kudos
65

Check these programs they are working fine, the report ZCALLING calls the report ZCALLED.

REPORT ZCALLING.

DATA:

BEGIN OF IO_TABLE OCCURS 0,

MATNR TYPE MARA-MATNR,

END OF IO_TABLE.

IO_TABLE-MATNR = '38'.

APPEND IO_TABLE.

EXPORT IO_TABLE TO MEMORY ID 'MEM_STR'.

SUBMIT ZCALLED AND RETURN.

REPORT ZCALLED.

DATA:

BEGIN OF IO_TABLE OCCURS 0,

MATNR TYPE MARA-MATNR,

END OF IO_TABLE,

P_TABLE LIKE STANDARD TABLE OF IO_TABLE WITH HEADER LINE.

IMPORT IO_TABLE FROM MEMORY ID 'MEM_STR'.

P_TABLE[] = IO_TABLE[].

LOOP AT P_TABLE.

WRITE P_TABLE-MATNR.

ENDLOOP.