Monday, December 20, 2010
REPORT ZTEST_NOTEPAD. DATA: BEGIN OF IT_DOWNLOAD OCCURS 0, DATA TYPE STRING, END OF IT_DOWNLOAD. DATA: BEGIN OF IT_DATA OCCURS 0, ARBGB TYPE T100-ARBGB, MSGNR TYPE T100-MSGNR, X(5) TYPE C, TEXT TYPE T100-TEXT, Y(5) TYPE C, END OF IT_DATA. CLASS CL_ABAP_CHAR_UTILITIES DEFINITION LOAD. CONSTANTS: CON_TAB TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB. "START-OF-SELECTION START-OF-SELECTION. SELECT * FROM T100 INTO CORRESPONDING FIELDS OF TABLE IT_DATA UP TO 100 ROWS WHERE SPRSL = SY-LANGU. "Populating tab delimited internal table LOOP AT IT_DATA. CONCATENATE IT_DATA-ARBGB IT_DATA-MSGNR IT_DATA-X IT_DATA-TEXT IT_DATA-Y INTO IT_DOWNLOAD-DATA SEPARATED BY CON_TAB. APPEND IT_DOWNLOAD. CLEAR IT_DOWNLOAD. ENDLOOP. "Download CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING FILENAME = 'C:\test.txt' FILETYPE = 'ASC' TABLES DATA_TAB = IT_DOWNLOAD.
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.