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: 

After SUBMIT - Export list to Memory

Former Member
0 Kudos

Hi All,

I have used SUBMIT ...Export list to Memory and return. Now instead of displaying the internal table values being moved to memory, I want to make use of those datas which has been exported in my program where I used SUBMIT stmt for further calculations.

Thnx in advance.

-Mohan.

10 REPLIES 10

Former Member
0 Kudos

You have to call FM LIST_FROM_MEMORY to retrieve the exported list from memory ...

0 Kudos

when you export the list to memory (using submit) the memory stores the list (not the data alone) , i.e with all the formatting you have done in your write statement.

you can read back the list using LIST_FROM_MEMORY and then

LIST_TO_ASCI.

but parsing the list to get the data alone is going to be a tedious task and cannot be generic.

Regards

Raja

sbhutani1
Contributor
0 Kudos

Hi mohan,

first of all you have to save the data in memory which you are using in submit statement then only you can get that data by this FM

IMPORT_INFO_FROM_MEMORY

Regards

Sumit Bhutani

Ps reward points if helpful

Former Member
0 Kudos

Are we talking about a SAP standard report that you submit, or is it a report that you are able to modify?

If you are able to modify the report, why don´t you store the data processed by the report in a table? Retrieving the data back to any other program would be much more high-performance!

Former Member
0 Kudos

SUBMIT rabest_alv01

WITH SELECTION-TABLE seltab

EXPORTING LIST TO MEMORY

AND RETURN.

  • get data back from memory.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_data

EXCEPTIONS

not_found = 1

OTHERS = 2.

This is waht I have written in my prog. After this if I use CALL FUNCTION 'WRITE_LIST' am getting the list in display format. instead I want to convert the list which I got from list_from_memory into an 'UNDERSTANDABLE SAP' internal table format and make use of it .

Which FM wld be helpful????????

0 Kudos

after list from memory you can call LIST_TO_ASCI to get the list output in text format but as i told you in the preious thread it will be not a easy task to parse the content to identify daa alone from the list.

Regards

Raja

Reward points to helpful answers by choosing appropriate radiobuttons

0 Kudos

This has been discussed here several times. List is list and it is not an internal table in the way you are asking for. You have to parse the output to convert that back to an internal table. The internal table you get out of the function modules specified by others here is an internal table of lines of the output.

Also, it looks like you are calling an ALV program. You cannot export this list to memory, unless the program automatically switches between ALV grid and ALV classic list view.

Former Member
0 Kudos

Hi Mohan,

See this once.

SUBMIT (P_PROG) USING SELECTION-SET P_VAR EXPORTING LIST

TO MEMORY AND

RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = LISTOBJECT

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

WRITE 'Error in list_from_memory.'.

ENDIF.

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

LISTASCI = ASCITAB

LISTOBJECT = LISTOBJECT.

0 Kudos

Is the p_prog your custom program? If it's so, why don't you export the data internal table into memory in that program and import that internal table in this program instead of importing the whole list?

Former Member
0 Kudos

Take a look at this