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

LIST_MEMEORY...problems

Former Member
0 Likes
879

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

9 REPLIES 9
Read only

Former Member
0 Likes
815

Check this out

Regards,

Santosh

Read only

Former Member
0 Likes
815

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

Read only

0 Likes
815

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

Read only

0 Likes
815

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

Read only

0 Likes
815

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

Read only

0 Likes
815

you cannot use it. so its better to follow my process and will get correct results as i have done it.

Read only

Former Member
0 Likes
815
*-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

Read only

Former Member
0 Likes
815

Hi ,

Please debug standard sap functionality

from system save option after list is displayed

you will some clue.

Regards

Amole

Read only

Former Member
0 Likes
815

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