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 with EXPORT/IMPORT

Former Member
0 Likes
466

Hi

This looks really strange. I was able to use EXPORT/IMPORT statements before successfully. I am exporting itab to a memory id in one prg and trying to import from the same memory id in another prg, it is not working. But when I import in the same prg, it is working fine.

First prg: Successfully importing from Memory id

export v_table_lines to memory id 'lines'.

clear v_table_lines.

import v_table_lines from memory id 'lines'.

Second Prg: Not able to import from memory id.

data:v_table_lines type i.

import v_table_lines from memory id 'lines'.

write v_table_lines.

Thanks

Naga

4 REPLIES 4
Read only

Former Member
0 Likes
420

Hi Naga,

Try Importing the contents of v_table_lines into another table of same type..

have a look at this sample prog...

Example for SAPMZTS2:

PROGRAM SAPMZTS2.

DATA: TEXT1(10),

TEXT3 LIKE TEXT1 VALUE 'Initial'.

IMPORT TEXT3 FROM MEMORY ID 'text'.

WRITE: / SY-SUBRC, TEXT3.

IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.

WRITE: / SY-SUBRC, TEXT1.

Example for SAPMZTS3:

PROGRAM SAPMZTS3.

DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.

IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.

LOOP AT JTAB.

WRITE / JTAB-BOOKID.

ENDLOOP.

Regards,

Tanveer.

Please mark helpful answers

Read only

Former Member
0 Likes
420

The only thing you might want to check is the spelling of the variables in both the programs.

Also, try to change the same into upper case and try.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

Former Member
0 Likes
420

You will have to maintain the Parameter ID in table TPARA, but you will also have to change it to a Z object.

You can use SM30 to maintain this table.

Rob

Ignore this. I was thinking of something else.

Message was edited by: Rob Burbank

Read only

Former Member
0 Likes
420

Hi Naga,

THe import/export mechanism work on some session of GUI.

Try run second program in the same mode.

bye

enzo