Upload & Download internal table to excel
上傳Excel檔案到SAP內表
REPORT z_upload_excel.
TYPE-POOLS: truxs.
TYPES: BEGIN OF t_datatab,
col1(30) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab,
wa_datatab TYPE t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
PARAMETERS: p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = it_datatab[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3.
ENDLOOP.
如果excel中1個單元格內容的長度可能有1000以上或更多,
就把alsm_excel_to_internal_table copy出來,然後copy
一個intern所參考 的structure,把value的長度改為4096.
Excel格式下載內表到本機
report z_export_excel.
PARAMETERS: p_file LIKE rlgrap-filename DEFAULT 'C:test4.xls'.
DATA: t100_lines TYPE STANDARD TABLE OF t001 WITH HEADER LINE.
t100_lines-mandt = '200'.
t100_lines-bukrs = '公司'.
t100_lines-butxt = '公司程式碼'.
t100_lines-ort01 = '公司程式碼'.
APPEND t100_lines.
SELECT * FROM t001 APPENDING TABLE t100_lines.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
i_filename = p_file
TABLES
i_tab_sap_data = t100_lines.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90072/viewspace-1017939/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Servlet – Upload、Download、Async、動態註冊Servlet
- HTML Table 輸出ExcelHTMLExcel
- 百度翻譯 Excel TableExcel
- Vue+element ui table 匯出到excelVueUIExcel
- html table 匯出excel,親測有效HTMLExcel
- win10系統中“來自microsoft download、upload host”程式佔用cpu高如何關閉Win10ROS
- 利用poi將Html中table轉為ExcelHTMLExcel
- vue+elementUI el-table匯出excel表格VueUIExcel
- element-UI庫Table表格匯出Excel表格UIExcel
- VulNyx - Internal
- jdk downloadJDK
- Element-ui元件庫Table表格匯出Excel表格UI元件Excel
- SAP UI5 表格資料如何匯出成 Excel 檔案(Table Export As Excel)UIExcelExport
- Upload Files
- save download pdf
- Download Notepad++
- Vue element-ui 裡面的table匯出excel表格 步驟VueUIExcel
- TableTools Export Excel前Table內容格式的轉換應用ExportExcel
- vue + element UI 中 el-table 資料匯出Excel表格VueUIExcel
- leapftp download,leapftp download軟體的8大傳輸功能FTP
- Java 8 Documentation DownloadJava
- Reflected File Download Attack
- Altium Designer 20.2.5 Download
- HDK Fileheader Download(2.0)Header
- Accessing Internal Members in the UNO FrameworkFramework
- xftp 6 download,4步掌握xftp 6 download軟體的安裝FTP
- DVWA--File Upload
- How Oracle Store Number internal(zt)Oracle
- ORA-00600: [OSDEP_INTERNAL]
- vxe-table 使用 vxe-upload 在表格中實現非常強大的貼上上傳圖片和附件
- 計算upload路徑
- sublime出現 unable download.......
- 隱藏 Download the React DevTools for a betterReactdev
- create table,show tables,describe table,DROP TABLE,ALTER TABLE ,怎麼使用?
- Swift 3.0 的 open,public,internal,fiSwift
- [ACTF2020 新生賽]UploadTF2
- 【封神臺】Upload-Labs wp
- Multi-Agent Oriented Programming PDF Download
- Free Download Manager(FDM下載器)