Skip to Content
avatar image
Former Member

FM LIST_OF_MEMORY

thanks all.

i get the data in to <b>listobject</b>

but it in 2 columns , i want it seprate so i can find my data that i need.

i use the func asci? and it not solve it for me.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 27, 2006 at 09:02 AM

    Hi again,

    1. use it like this:

    *----


    Simple Example

    1. Do two things

    2. make one new simple program

    named ZAM_TEMP01

    code should be like this simple :

    REPORT ZAM_TEMP01.

    write :/ 'amit'.

    *----


    3. now create another program,

    and just copy paste this code.

    4.

    report abc.

    *----


    data : ABAPLIST like table of ABAPLIST.

    data : begin of itab occurs 0,

    f(100) type c,

    end of itab.

    *----


    start-of-selection.

    submit zam_temp01 and return exporting list to memory.

    *----


    CALL FUNCTION 'LIST_FROM_MEMORY'

    TABLES

    LISTOBJECT = abaplist

    EXCEPTIONS

    NOT_FOUND = 1

    OTHERS = 2.

    CALL FUNCTION 'LIST_TO_ASCI'

    TABLES

    LISTASCI = itab

    LISTOBJECT = abaplist

    EXCEPTIONS

    EMPTY_LIST = 1

    LIST_INDEX_INVALID = 2

    OTHERS = 3.

    loop at itab.

    write :/ itab-f.

    endloop.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2006 at 08:53 AM

    Hi rani,

    1. LIST_TO_ASCI

    *----


    Simple Example

    1. Do two things

    2. make one new simple program

    named ZAM_TEMP01

    and just WRITE 'HELLO'.

    in that program.

    3. now create another program,

    and just copy paste this code.

    4.

    report abc.

    *----


    data : ABAPLIST like table of ABAPLIST.

    data : begin of itab occurs 0,

    f(100) type c,

    end of itab.

    *----


    start-of-selection.

    submit zam_temp01 and return exporting list to memory.

    *----


    CALL FUNCTION 'LIST_FROM_MEMORY'

    TABLES

    LISTOBJECT = abaplist

    EXCEPTIONS

    NOT_FOUND = 1

    OTHERS = 2.

    CALL FUNCTION 'LIST_TO_ASCI'

    TABLES

    LISTASCI = itab

    LISTOBJECT = abaplist

    EXCEPTIONS

    EMPTY_LIST = 1

    LIST_INDEX_INVALID = 2

    OTHERS = 3.

    loop at itab.

    write :/ itab-f.

    endloop.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi again,

      1. the thing for which u are asking is :

      making sense and format

      out of data which is in character format

      in multiple lines.

      2. thats very tricky and practically

      impossible.

      3. The reason is that

      words and sentences in report

      are not in fixed format and alignment.

      regards,

      amit m.

  • Apr 27, 2006 at 08:54 AM

    hi,

    you need to use LIST_TO_ASCI FM,

    did you check my previous posts..

    i am telling you so many times.

    Regards

    vijay

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 27, 2006 at 08:58 AM

    Is it LIST_from_MEMORY?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2006 at 09:01 AM

    here is your code

    CALL FUNCTION 'LIST_FROM_MEMORY'

    TABLES

    LISTOBJECT = IT_LIST

    EXCEPTIONS

    NOT_FOUND = 1

    OTHERS = 2.

    IF SY-SUBRC = 0.

    "convert it to ASCI

    CALL FUNCTION 'LIST_TO_ASCI'

    TABLES

    LISTASCI = IT_ASC

    LISTOBJECT = IT_LIST

    EXCEPTIONS

    EMPTY_LIST = 1

    LIST_INDEX_INVALID = 2

    OTHERS = 3.

    ENDIF.

    what is the declare of IT_ASC

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2006 at 09:03 AM

    hi

    good

    go through the code mentioned here

    SUBMIT (REPORT_NAME)

    USING SELECTION-SET P_VARI

    EXPORTING LIST TO MEMORY

    AND RETURN.

    CALL FUNCTION 'LIST_FROM_MEMORY'

    TABLES

    LISTOBJECT = INT_LISTOBJECT

    EXCEPTIONS

    NOT_FOUND = 1.

    CALL FUNCTION 'LIST_TO_ASCI'

    TABLES

    LISTASCI = INT_LISTASCII

    LISTOBJECT = INT_LISTOBJECT

    EXCEPTIONS

    EMPTY_LIST = 1

    LIST_INDEX_INVALID = 2.

    -


    DATA: MTAB_REPORT_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.

    DATA: MTAB_REPORT_HTML LIKE W3HTML OCCURS 0 WITH HEADER LINE.

    DATA: BEGIN OF MTAB_REPORT_ASCII OCCURS 0,

    LINE(255) TYPE C,

    END OF MTAB_REPORT_ASCII.

    START-OF-SELECTION.

    *-- Submit a report. This one is the chart of accounts

    SUBMIT RFSKPL00

    EXPORTING LIST TO MEMORY " Save list in memory

    AND RETURN. " Return control to this program

    END-OF-SELECTION.

    *-- Get the list from memory

    CALL FUNCTION 'LIST_FROM_MEMORY'

    TABLES

    LISTOBJECT = MTAB_REPORT_LIST

    EXCEPTIONS

    NOT_FOUND = 1

    OTHERS = 2.

    *-- Write the list out

    *-- This is a trivial example. A better use would be when the

    *-- requirement is to have one report print out several different

    *-- reports on the same list level.

    CALL FUNCTION 'WRITE_LIST'

    TABLES

    LISTOBJECT = MTAB_REPORT_LIST

    EXCEPTIONS

    EMPTY_LIST = 1

    OTHERS = 2.

    ************************************************************************

    • The examples below this line do not require that the report be *

    • submitted to memory when run. All that they require is that the *

    • report has been written to the screen. *

    ************************************************************************

    *-- Take the current list that has been written to screen, and format

    *-- as an HTML file.

    CALL FUNCTION 'WWW_LIST_TO_HTML'

    TABLES

    HTML = MTAB_REPORT_HTML

    EXCEPTIONS

    OTHERS = 1.

    *-- Save the list. Same as using System->List->Save->Local File or

    *-- entering %pc in the OKCODE box. This function does not need the

    *-- include <%_LIST> in a program.

    *-- Method can be:

    *-- NOCO - No conversion

    *-- RTF - Rich Text Format

    *-- DAT - Tab delimited Format

    *-- When no method is given, a selection screen is presented for the

    *-- user to choose the method.

    CALL FUNCTION 'LIST_DOWNLOAD'

    EXPORTING

    METHOD = 'NOCO'

    EXCEPTIONS

    OTHERS = 1.

    thanks

    mrutyun

    Add comment
    10|10000 characters needed characters exceeded