Tuesday, December 21, 2010
REPORT ztest_program. DATA: BEGIN OF it_t001 OCCURS 0, bukrs TYPE t001-bukrs, butxt TYPE t001-butxt, ort01 TYPE t001-ort01, land1 TYPE t001-land1, END OF it_t001. DATA: it_data TYPE TABLE OF lvc_s_1022, wa_data LIKE LINE OF it_data. DATA:spoolid TYPE rspoid. DATA:file_length TYPE int4. START-OF-SELECTION. SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001. LOOP AT it_t001. CONCATENATE it_t001-bukrs it_t001-butxt it_t001-ort01 it_t001-land1 INTO wa_data SEPARATED BY space. APPEND wa_data TO it_data. CLEAR wa_data. ENDLOOP. DESCRIBE TABLE it_data. file_length = sy-tfill * 1022. CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL' EXPORTING i_file_length = file_length IMPORTING e_spoolid = spoolid TABLES it_textdata = it_data. IF sy-subrc EQ 0. WRITE spoolid. 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.