2006 May 15 10:10 AM
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.
2006 May 15 10:11 AM
You have to call FM LIST_FROM_MEMORY to retrieve the exported list from memory ...
2006 May 15 10:19 AM
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
2006 May 15 10:14 AM
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
2006 May 15 10:22 AM
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!
2006 May 15 10:25 AM
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????????
2006 May 15 10:32 AM
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
2006 May 24 7:54 PM
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.
2006 May 24 7:49 PM
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.
2006 May 24 7:52 PM
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?
2006 May 24 7:57 PM