Application Development 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: 

Problem in LIST_FROM_MEMORY

0 Kudos

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

5 REPLIES 5

ipravir
Active Contributor
0 Kudos

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.

0 Kudos

Hi Praveen,

I found out only 95 fields are coming from the table GT_LIST_TAB which is returned from the RFC 'LIST_TO_ASCII'

ipravir
Active Contributor
0 Kudos

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.

ipravir
Active Contributor
0 Kudos

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.

0 Kudos

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.