sap strans 表格
<?sap.transform simple?>
<tt:transform xmlns:tt="
<tt:root name="userInf"/>
<tt:template>
<header>
<sid>
<tt:value ref="userInf.sid"/>
</sid>
<pwd>
<tt:value ref= "userInf.pwd"/>
</pwd>
</header>
</tt:template>
</tt:transform>
*&---------------------------------------------------------------------*
*& Report YSTRANS001
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report ystrans002
.
data
: gv_xml
type string
,
li_binary_tab
type
standard
table
of char255
with
header
line
.
data
: lv_filename
type string
,
lv_path
type string
,
lv_fullpath
type string
,
lv_user_action
type
i
.
data
:
begin
of it_mara
occurs
0
,
matnr
like mara
-matnr
,
laeda
like mara
-laeda
,
maktx
like makt
-maktx
,
end
of it_mara
.
select a
~matnr a
~laeda b
~maktx
into corresponding
fields
of
table it_mara
up
to
50
rows
from mara
as a inner
join makt
as b
on a
~matnr
= b
~matnr
where spras
= sy
-langu
.
call transformation ytest0003
source it_mara
= it_mara[]
result xml gv_xml
.
call
function
'CONVERT_STRING_TO_TABLE'
exporting
i_string
= gv_xml
i_tabline_length
=
'255'
tables
et_table
= li_binary_tab
.
concatenate
'財務月度報表' sy
-datum
into lv_filename
.
call
method cl_gui_frontend_services
=>file_save_dialog
exporting
default_extension
=
'xlsx'
file_filter
= cl_gui_frontend_services
=>filetype_excel
default_file_name
= lv_filename
changing
fullpath
= lv_fullpath
filename
= lv_filename
path
= lv_path
user_action
= lv_user_action
exceptions
cntl_error
=
1
error_no_gui
=
2
not_supported_by_gui
=
3
others
=
4
.
call
function
'GUI_DOWNLOAD'
exporting
* BIN_FILESIZE =
filename
= lv_fullpath
filetype
=
'BIN'
append
=
' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
tables
data_tab
= li_binary_tab[]
* FIELDNAMES =
exceptions
file_write_error
=
1
no_batch
=
2
gui_refuse_filetransfer
=
3
invalid_type
=
4
no_authority
=
5
unknown_error
=
6
header_not_allowed
=
7
separator_not_allowed
=
8
filesize_not_allowed
=
9
header_too_long
=
10
dp_error_create
=
11
dp_error_send
=
12
dp_error_write
=
13
unknown_dp_error
=
14
access_denied
=
15
dp_out_of_memory
=
16
disk_full
=
17
dp_timeout
=
18
file_not_found
=
19
dataprovider_exception
=
20
control_flush_error
=
21
others
=
22
.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9522162/viewspace-2993196/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sap strans 資料
- SAP UI5 表格 Click to Select 文字的來源UI
- 將SAP CRM WebClient UI的表格匯出成PDFWebclientUI
- 如何將SAP WebClient UI的表格匯出成PDFWebclientUI
- 如何採用SAP UI5 主從表格的聯動技術顯示覆雜表格內容UI
- SAP CRM WebClient UI表格編輯模式的除錯明細WebclientUI模式除錯
- SAP UI5 Web Component的React表格控制元件用法UIWebReact控制元件
- SAP UI5 應用開發教程之七十五 - 如何採用SAP UI5 主從表格的聯動技術顯示覆雜表格內容UI
- 如何使用 controllerExtensions 給 SAP Fiori Elements 表格註冊事件響應函式Controller事件函式
- SAP UI5 OData V4 表格控制元件的批量修改UI控制元件
- SAP UI5 表格資料如何匯出成 Excel 檔案(Table Export As Excel)UIExcelExport
- 生成表格與合併表格
- 表格
- 如何在 SAP Fiori Elements List Report 表格工具欄裡增添新的自定義按鈕
- SAP Fiori Elements List Report 裡的表格型別(tableType)是如何決定出來的型別
- Poi向Word插入表格,設定表格邊框和表格居中
- SAP UI5 表格行專案內的按鈕點選之後,如何獲得當前所在的表格行專案的資料UI
- VUE-表格佈局、表格查詢、工具欄、表格、分頁欄Vue
- SAP UI5 表格控制元件的支援複選以及如何用程式碼一次選中多個表格行專案試讀版UI控制元件
- markdown表格
- 表格 、背景
- element-UI庫Table表格匯出Excel表格UIExcel
- JavaScript動態建立表格和增加表格的行JavaScript
- 使用擴充套件方式隱藏SAP Fiori應用某個表格標籤頁的實際案例套件
- 自定義表格
- 表格識別
- 表格佈局
- markdown 表格形式
- 舉例說明表格中如何再巢狀表格巢狀
- Element-ui元件庫Table表格匯出Excel表格UI元件Excel
- opencv 表格識別之表格透視矯正(一)OpenCV
- Spread表格元件For JAVA功能介紹—表格相關操作元件Java
- 表格轉文字如何實現-表格文字識別介面整合示例-快速提取表格中的文字
- excel表格文字識別-ocr表格文字提取api介面整合ExcelAPI
- Excel表格底色怎麼去掉?去除Excel表格底色的方法Excel
- SAP UI5 應用開發教程之六十二 - 基於 OData V4 的 SAP UI5 表格控制元件使用方法介紹UI控制元件
- css表格表單CSS
- HTML表格寬度HTML