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

Retrieve list structure from LIST_FROM_MEMORY function

Former Member
0 Likes
1,079

Hi,

Is there a way that I can retrieve the structure of a list that was imported from memory.

I have a program that uses SUBMIT "program" EXPORTING LIST TO MEMORY and RETURN, then I use the function module LIST_FROM_MEMORY in order to retrieve the list, but is there a way I can determine what the structure of the list is? (field type, field length, etc).

Thanks,

DS

3 REPLIES 3
Read only

Former Member
0 Likes
815

Does it always require a structure to create/export a list?

Read only

Former Member
0 Likes
815

Hello,

Maybe you can have a look at the function module : LIST_RESTORE_INFO

The function group SLST (via SE80) also contains a lot of other function modules concerning list processing.

I hope this can help you.

Success.

Wim

Read only

Former Member
0 Likes
815

 DATA  BEGIN OF rlist OCCURS 0.
          INCLUDE STRUCTURE abaplist.
  DATA  END OF rlist.

CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = rlist.

 IF sy-subrc = 0.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = itab
        listobject         = rlist
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
  ENDIF.