Monday, December 20, 2010
- Convert data to CSV format using SAP_CONVERT_TO_CSV_FORMAT.
- Download data using GUI_DOWNLOAD.
REPORT ztest_notepad. "Declarations TYPE-POOLS :truxs. DATA : it_download TYPE truxs_t_text_data. DATA: BEGIN OF it_data OCCURS 0, arbgb TYPE t100-arbgb, msgnr TYPE t100-msgnr, text TYPE t100-text, END OF it_data. START-OF-SELECTION. "Select Data SELECT * FROM t100 INTO CORRESPONDING FIELDS OF TABLE it_data UP TO 200 ROWS WHERE sprsl = sy-langu. "Convert SAP to CSV format CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT' EXPORTING i_field_seperator = ';' TABLES i_tab_sap_data = it_data CHANGING i_tab_converted_data = it_download EXCEPTIONS conversion_failed = 1 OTHERS = 2. IF sy-subrc = 0. "Download data using GUI_DOWNLOAD CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING filename = 'C:\test.txt' filetype = 'ASC' TABLES data_tab = it_download. ENDIF.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.