Skip to Content
avatar image
Former Member

Issue with FM: LIST_FROM_MEMORY

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Feb 22, 2017 at 09:41 AM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

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

  • Feb 22, 2017 at 08:19 PM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 22, 2017 at 10:59 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 22, 2017 at 10:41 PM

    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.
    Add comment
    10|10000 characters needed characters exceeded