SPAN {
font-family: "Fixedsys";
font-size: 10pt;
color: #000000;
background: #C7EDCC;
}
.L1S31 {
font-style: italic;
color: #808080;
}
.L1S32 {
color: #3399FF;
}
.L1S33 {
color: #4DA619;
}
.L1S52 {
color: #0000FF;
}
*&---------------------------------------------------------------------*
*& Report ZTEST8
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZTEST8.
TABLES:SBOOK.
DATA GT_TAB LIKE TABLE OF SBOOK.
pARAMETERS: p_file LIKE rlgrap-filename DEFAULT 'C:\test4.xls'.
START-OF-SELECTION.
PERFORM frm_get_data.
PERFORm frm_tab_to_xls.
*&---------------------------------------------------------------------*
*& Form frm_get_data
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form frm_get_data.
* SELECT * INTO TABLE GT_ITA FROM SBOOK .
SELECT * INTO TABLE GT_TAB FROM SBOOK UP TO 10 ROWS.
ENDFORM. "frm_get_data
*&---------------------------------------------------------------------*
*& Form frm_tab_to_xls
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form frm_tab_to_xls.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
i_filename = p_file
TABLES
i_tab_sap_data = GT_TAB.
ENDFORM. "frm_tab_to_xls
阅读(533) | 评论(0) | 转发(0) |