Skip to Content
avatar image
Former Member

Problem in LIST_FROM_MEMORY

Hi All,

My requirement is to enhance the standard report program RIQMEL20 to accomodate the custom fields added.

What i have done is as follows.

SUBMIT riqmel20 USING SELECTION-SCREEN gc_screen
                 WITH SELECTION-TABLE gt_rspar_tab
                 EXPORTING LIST TO MEMORY
                 AND RETURN.


*Import the prepared list from the memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
     TABLES
        listobject = gt_list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.

    IF sy-subrc = 0.
****Get the unstructured output of riqmel20 report
      CALL FUNCTION 'LIST_TO_ASCI'
        EXPORTING
          list_index         = zif_utl_constants=>gc_ascii
        TABLES
          listasci           = gt_vlist
          listobject         = gt_list_tab
        EXCEPTIONS
          empty_list         = 1
          list_index_invalid = 2
          OTHERS             = 3.

      ENDIF.

The problem is there are 108 fields altogether in the standard report program.

But when submitting and reading from memory, I am getting only 95 fields.

The remaining fields are getting truncated.

Is it because of some size constraint?

How can this be solved??

Thanks in advance.

Regards,

Vignesh Sunkasi.K

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 22, 2014 at 01:24 PM

    Hi,

    How can you say only 95 fields are coming from memory.

    Provide the data reading information.

    And also you can try to Don't pass the List_Index Parameters and check.

    Regards.

    Praveer.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      That I am asking, how are you able to see the all 95 Columns, as per the LIST_TO_ASCII,

      it's return the all information as list view.

      Could you send the rest of the reading information code after LIST_TO_ASCII FM.

      Regards.

      Praveer.

  • Dec 22, 2014 at 01:40 PM

    Hi,

    Check with the below logic to count the no of columns.

    DATA: lit_str     type standard table of string,

                lfl_str     like line of lit_str.

    loop at gt_vlist into wa.

         refresh: lit_str.

         split wa at '|' into table lit_str.

         *&     check the number of columns from the output into the lit_str.

         *&     it could be 4th or 5th line of the gt_vlist.

    endloop.

    In Debugging mode you cannot see the all information from the LIST View.

    regards.

    Praveer.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Praveen,

      I too have done exactly as u have said. And i found only 95 fields coming.

      ***Delete the junk data from riqmel20 report output
              DO 3 TIMES.
                DELETE gt_vlist INDEX 1.
              ENDDO.


              DESCRIBE TABLE gt_vlist LINES gv_line.
              DELETE gt_vlist INDEX gv_line.


      ***Split the unstructured data based on '|'
              LOOP AT gt_vlist INTO gw_vlist.

                SPLIT gw_vlist-field1 AT zif_utl_constants=>gc_split INTO gw_alv_riqmel20-sdum
                                                 gw_alv_riqmel20-snum
                                                 gw_alv_riqmel20-include-qmnum
                                                 gw_alv_riqmel20-include-qmdat
                                                 gw_alv_riqmel20-include-qmtxt
                                                 gw_alv_riqmel20-include-iwerk
                                                 gw_alv_riqmel20-include-tplnr
                                                 gw_alv_riqmel20-include-swerk
                                                 gw_alv_riqmel20-include-kostl
                                                 gw_alv_riqmel20-include-abckz
                                                 gw_alv_riqmel20-include-gsber
                                                 gw_alv_riqmel20-include-anlnr
                                                 gw_alv_riqmel20-include-anlun
                                                 gw_alv_riqmel20-include-stort
                                                 gw_alv_riqmel20-include-beber
                                                 gw_alv_riqmel20-include-equnr
                                                 gw_alv_riqmel20-include-bautl
                                                 gw_alv_riqmel20-include-msaus
                                                 gw_alv_riqmel20-include-ausvn
                                                 gw_alv_riqmel20-include-ausbs
                                                 gw_alv_riqmel20-include-auztv
                                                 gw_alv_riqmel20-include-auztb
                                                gw_alv_riqmel20-include-eauszt
                                                gw_alv_riqmel20-include-maueh
                                                gw_alv_riqmel20-include-btpln
                                                gw_alv_riqmel20-include-bequi
                                                gw_alv_riqmel20-include-auswk
                                                gw_alv_riqmel20-include-verfv
                                                gw_alv_riqmel20-include-verfn
                                                gw_alv_riqmel20-include-verfm
                                                gw_alv_riqmel20-include-anlzv
                                                gw_alv_riqmel20-include-anlzn
                                                gw_alv_riqmel20-include-anlze
                                                gw_alv_riqmel20-include-inspk
                                                gw_alv_riqmel20-include-datan
                                                gw_alv_riqmel20-include-ingrp
                                                gw_alv_riqmel20-include-qmart
                                                gw_alv_riqmel20-include-bukrs


                APPEND gw_alv_riqmel20 TO gt_alv_riqmel20.

                CLEAR: gw_vlist, gw_alv_riqmel20.

              ENDLOOP.