Skip to Content
0

Issue with FM: LIST_FROM_MEMORY

Feb 22, 2017 at 09:01 AM

177

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Volker Binder Feb 22, 2017 at 09:41 AM
0

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


zix2f.png (6.6 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Sandra Rossi Feb 22, 2017 at 08:19 PM
0

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)

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 22, 2017 at 10:59 PM
0

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?

Share
10 |10000 characters needed characters left characters exceeded
Raj S Feb 22, 2017 at 10:41 PM
0

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.
Share
10 |10000 characters needed characters left characters exceeded