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

CALL FUNCTION 'LIST_TO_ASCI'

former_member462254
Participant
0 Likes
4,487

Hello Experts,

I am trying to read the list output from FM'LIST_TO_ASCI' into table listasci  = it_text but not able to read the whole data in the same.

here is my code:

TYPES: BEGIN OF ty_text,

        line(9000),

       END OF ty_text.

DATA: it_ABAPLIST type STANDARD TABLE OF ABAPLIST,

      wa_text TYPE ty_text,

      it_text   TYPE TABLE OF ty_text.

CALL FUNCTION 'LIST_TO_ASCI'

  EXPORTING

    list_index         = -1

  TABLES

    listasci           = it_text

    listobject         = it_abaplist

Regards,

Anoop Singh Bhandari

2 REPLIES 2
Read only

gregorygotera
Explorer
0 Likes
2,239

Hi Anoop

When I used this function module , before I used the function module LIST_FROM_MEMORY to recover the table from memory.

For example :

SUBMIT Z*

EXPORTING LIST TO MEMORY

Condition....

CALL FUNCTION 'LIST FROM MEMORY'

TABLES

    LISTOBJECT  = IT_LIST

EXCEPTIONS

   ....

IF SY-SUBRC EQ 0.

     CALL FUNCTION 'LIST_TO_ASCII'

       EXPORTING

         LIST_INDEX = -1

       TABLES

          LISTASCI = IT_TXT

          LISTOBJECT = IT_LIST

        EXCEPTION

     .....

ENDIF.

After do it, you can process the table

Regards

Gregory

Read only

rajkumarnarasimman
Active Contributor
0 Likes
2,239

Hi Anoop,

If you are using LIST_TO_ASCI, the fields inside IT_TEXT are stored and separated by PIPE '!'. Using split statement we need to split the same and store into another internal table. Please find the link below .

I recommend to use class  cl_salv_bs_runtime_info

Regards

Rajkumar Narasimman