‎2006 Jun 07 1:10 PM
Hi All,
I want to download the ALV LIST (Not Grid) to the Application server.
so I am using the List_to_memory FM after the 'Resuse_alv_list_display' function.
but list_to_memory FM returns an exception saying that the list index is invalid.
I have written list_to_memory FM just under the "ALV display" function.
The moment I click on "back" button the sy-lsind changes to 0 from 1.
Please Help.
Where should I place the list_to_memory FM?
Regards
Dnyanesh
‎2006 Jun 07 1:13 PM
‎2006 Jun 07 1:23 PM
Hi,
If you use list_to_memory, you must have to specify parameters which containes list data. otherwise your will get the error as you got it.
ram
‎2006 Jun 07 1:38 PM
Hi Ram.
Could you please explain me like what parameters exactly I should pass to this function and where exactly should I place this function.
regards
Dnyanesh
‎2006 Jun 07 1:55 PM
Hi Dnyanesh,
The main problem here is, you cannot use LIST_FROM_MEMORY for ALV's.
write a new piece of code to display ALV list in a seperate program lets say ZPROG2.
Now, in the ZPROG1, fetch the data based on your selection and Call that report ZPROG2 using SUBMIT...LIST TO MEMORY by passing corresponding parameters for ALV.
Now, List is stored in memory rather than displaying on the screen.
Now, you can use LIST_FROM_MEORY as your way..
Regards,
Ram
Then
‎2006 Jun 07 2:19 PM
Hi Ram,
So I cant use the FM List_to_memory for the ALV.
I need to create a different report program and have to use the submit command.
regards
Dnyanesh
‎2006 Jun 07 4:14 PM
you cannot use it. so its better to follow my process and will get correct results as i have done it.
‎2006 Jun 07 1:26 PM
*-Get the report output from memory
call function 'LIST_FROM_MEMORY'
TABLES
listobject = it_list
EXCEPTIONS
not_found = 1
others = 2.
if sy-subrc = 0.
*-Get the report output from memory in ascii format
call function 'LIST_TO_ASCI'
TABLES
listasci = it_asc
listobject = it_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
others = 3.this is how you should go for list from memory.
you have to call the above two fm's
Regards
vijay
‎2006 Jun 07 1:27 PM
Hi ,
Please debug standard sap functionality
from system save option after list is displayed
you will some clue.
Regards
Amole
‎2006 Jun 07 1:42 PM
My problem is that when I use the FM list_from_memory the listobject table is still initial.
the problem lies with the list_to_memory FM.
I am not able to decide where should I place this FM in the code.
We pass sy-lsind to this FM. when I debug the ssap funcationality I found that as soon as the ALV list is displayed the sy-lsind becomes 1 and when I click the Back button the value changes to 0.
So the List_to_memory FM is not able to execute properly.
Regards
Dnyanesh