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: 

EXPORT an internal table to memory

Former Member
0 Kudos

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

shaik_sajid
Active Contributor
0 Kudos

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

former_member229729
Active Participant
0 Kudos

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

Former Member
0 Kudos

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.