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

EXPORT an internal table to memory

Former Member
0 Likes
17,520

Hi,

In normal ABAP programming, an internal table is stored in the memory as shown below:

EXPORT itab TO MEMORY ID 'store_itab'.

But when i try to write the same code in a method of a global class, i get an error saying:

"EXPORT var_1,.......var_n TO MEMORY.........is not supported in OO context.

Use EXPORT name_1 from var_1,.......name_n from var_n TO MEMORY.......instead.........".

How can i store this internal table itab into memory.

Thanks a lot in advance for helping.

Best Regards,

Raghu

Hi,

In normal ABAP programming, an internal table is stored in the memory as shown below:

EXPORT itab TO MEMORY ID 'store_itab'.

But when i try to write the same code in a method of a global class, i get an error saying:

"EXPORT var_1,.......var_n TO MEMORY.........is not supported in OO context.

Use EXPORT name_1 from var_1,.......name_n from var_n TO MEMORY.......instead.........".

How can i store this internal table itab into memory.

Thanks a lot in advance for helping.

Best Regards,

Raghu

3 REPLIES 3
Read only

Former Member
0 Likes
7,822

hi try to give some value to the mid (memory id ) as given below

DATA: MID         TYPE CHAR10 VALUE 'F47'.
    EXPORT itab TO MEMORY ID MID.

regards

Sajid

Read only

former_member229729
Active Participant
0 Likes
7,822

Hi,

Below given is the example for Exporting internal table into memory and importing back when required:

Program-1

EXPORT i_zpack_memory FROM i_zpack_migo TO MEMORY ID 'ZPMIGO'.

Program-2

IMPORT i_zpack_memory TO i_zpack_migo FROM MEMORY ID 'ZPMIGO'.

Rgds,

Ramani N

Edited by: Ramani Nagarajan on Jun 22, 2009 11:29 AM

Read only

Former Member
0 Likes
7,822

Hi,

As per abap keyword doc following is the syntax..

EXPORT obj1 ... objn TO INTERNAL TABLE itab = f.

Effect

The contents of data object f is exported and stored under the name specified before =.

EXPORT obj1 ... objn TO INTERNAL TABLE itab FROM f .

Effect

The contents of data object f is exported and stored under the name specified before FROM.

Regards.