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: 

Download of report output layout to .TXT

Former Member
0 Kudos

Hello ,

Is there any FM to download the normal report output layout to .TXT with the layout design.

Thanks in advance.

Regards

Jai

6 REPLIES 6

Former Member
0 Kudos

how can the layput be stored in .TXT ? text file will only have ascii chars ... not the graphics..

and to download as TXT , we have GUI_DOWNLOAD

NAeda
Contributor
0 Kudos

Hi,

Normally report out put means data is available in internal table, so use these links

type-pools:TRUXS.
data: begin of itab occurs 0,
      vbeln like vbap-vbeln,
      posnr like vbap-posnr,
      end of itab.
data:  itab1 type TRUXS_T_TEXT_DATA.
  select vbeln
         posnr
         up to 10 rows
         from vbap
         into table itab.
 
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
 EXPORTING
   I_FIELD_SEPERATOR          = ','
  TABLES
    I_TAB_SAP_DATA             = itab
 CHANGING
   I_TAB_CONVERTED_DATA       =  itab1
 EXCEPTIONS
   CONVERSION_FAILED          = 1
   OTHERS                     = 2
          .
IF SY-SUBRC  0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
 
   CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename = 'C:TEMPtest.TXT'
    TABLES
      data_tab = itab1
    EXCEPTIONS
      OTHERS   = 1.

Former Member
0 Kudos

Hi,

Its not possible to download layout as it contains graphics.

However to download it to text format use method GUI_DOWNLOAD of CL_GUI_FRONTEND_SERVICES.

Regards

Abhii...

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi,

You can download the report output without any coding as far as i think

Follow these steps

Menu->System>List->save..it will ask for the format

Hope it helps You

Thanks

0 Kudos

Hello,

Yeah, the same format I need when I click on my 'DOWNLOAD' pushbutton.

please let me know.

Regards

Jai

0 Kudos

please search...

there area many FMs listed in this forum which downloads to excel file... gui_download, alsm FMs and many more