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: 

Get output Result Of report in another report

Former Member
0 Kudos

hi all ,

  i want to get output result of report into another internal table of  another report with it's all features .

i try submit but i can't get my target from it .

Please advise .

3 REPLIES 3

Former Member
0 Kudos

HI,

Here is one sample code,

      SUBMIT rm07mlbd " Stock on Posting Date program

* Selection Screen parameters in the Calling program

                      WITH werks IN werks     " Plant

                      WITH datum IN lit_budat " Selection Date

                      WITH pa_sumfl = l_xsum  " Totals Only - Non-Hierarchical Representation

             EXPORTING LIST TO MEMORY AND RETURN.

* Get the Prepared list import from memory

      CALL FUNCTION 'LIST_FROM_MEMORY'

        TABLES

          listobject = itab_abaplist

        EXCEPTIONS

          not_found  = 1

          OTHERS     = 2.

      IF sy-subrc = 0.

*       Convert a (Saved) List Object to ASCII

        CALL FUNCTION 'LIST_TO_ASCI'

          TABLES

            listasci   = txtlines

            listobject = itab_abaplist.

       endif.

this is very important.........

DESCRIBE TABLE txtlines LINES l_line.

          LOOP AT txtlines .

*          l_cnt = sy-tabix.

            IF l_cnt = 1 OR

               l_cnt  = 3.

              DELETE txtlines .

            ENDIF.

            IF l_cnt = l_line .

              DELETE txtlines .

            ENDIF.

            l_cnt = l_cnt + 1 .

            CLEAR txtlines .

          ENDLOOP.

After this, you can use the LOOP ..... ENDLOOP on TXTLINES ITAB and split the line into field values as per your choice. Keep in mind after the previous deletion process, the first line in the TXTLINES table is the header so skip that by using "sy-tabix <> 1."

Hope this will help you.........

0 Kudos

Thx for your replay , but is there any way to get the output in separated fields with the same properties of the original table .

0 Kudos