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: 

Issue with FM: LIST_FROM_MEMORY

former_member217316
Contributor
0 Kudos

Hi All

I am SUBMITing a custom report (suppose its output comprises of X no of columns) in a function module and sending its output to the memory.

While retrieving it, I am only getting X - 5 columns and the last 5 columns are missing.

How can i get the remaining columns?

Below is the code snippet.

    SUBMIT zlockbox AND RETURN EXPORTING LIST TO MEMORY USING SELECTION-SET 'TEST' LINE-SIZE 1023.


    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc <> 0.
* Implement suitable error handling here
    ELSE.
      CALL FUNCTION 'LIST_TO_ASCI'
*        EXPORTING
*          WITH_LINE_BREAK    = 'X'
        TABLES
          listasci           = ascii_tab
          listobject         = list_tab
        EXCEPTIONS
          empty_list         = 1
          list_index_invalid = 2
          OTHERS             = 3.

Please help.

Harsh

5 REPLIES 5

former_member226519
Active Contributor
0 Kudos

as far as I know the list line is delimited to 1024 characters. Did you check this?

0 Kudos

The X no of of columns put together have a width of much less than that but still this issue. 😞

Sandra_Rossi
Active Contributor
0 Kudos

Did you define the rows of the target internal table LISTASCI with enough characters? If they are not wide enough, you'll lose characters as you didn't pass WITH_LINE_BREAK (same as abap false)

former_member156446
Active Contributor
0 Kudos

as mentioned in the documentation (help) did you try write_list and display_list does those show you full list ?

  • The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
  • The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
  • The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list dynpro.
  • The function module LIST_TO_ASCI converts the content of an internal table of the row type ABAPLIST to ASCII representation.

Former Member
0 Kudos

When you intend to use LIST_FROM_MEMORY, it is always advisable to use FM LIST_FREE_MEMORY before SUBMITting a program. See if that resolves your problem. Hope you have done that?