Upload excel file 到 INTERNAL TABLE 的方法
FORM upload_data .
DATA:w_tab LIKE it_excel.
DATA:lt_excel TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
DATA:l_tabix1 LIKE sy-tabix.
FIELD-SYMBOLS:
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = 1
i_begin_row = 2
i_end_col = 16
i_end_row = 5000
TABLES
intern = lt_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE s398 WITH 'Error occurs when upload Excel file!'.
STOP.
ENDIF.
*&SORT lt_intern BY row col.
LOOP AT lt_excel.
AT NEW row.
l_tabix1 = sy-tabix.
ENDAT.
AT END OF row.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE w_tab TO
IF sy-subrc = 0.
READ TABLE lt_excel INDEX l_tabix1.
IF sy-subrc = 0 AND lt_excel-col = sy-index.
TRANSLATE lt_excel-value TO UPPER CASE.
ADD 1 TO l_tabix1.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
APPEND w_tab TO it_excel.
CLEAR w_tab.
ENDAT.
ENDLOOP.
ENDFORM. " upload_data
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90072/viewspace-927534/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 將Excel file上轉到Internal table的方法Excel
- 實用且常用的FN:Upload Excel File Into Internal TableExcel
- Upload & Download internal table to excelExcel
- 不用SE11建Structure傳Internal Table到Smartforms的方法StructORM
- File upload by JSP (轉)JS
- 採用Docker整合jquery-file-upload元件到WEB應用DockerjQuery元件Web
- Fckeditor PHP/ASP File Upload VulPHP
- html 5 drag and drop upload fileHTML
- angular-file-upload 在IE下使用的坑Angular
- ssis multiple table to one file
- FIneCMS /dayrui/libraries/Chart/ofc_upload_image.php Arbitrary File Upload VulUIPHP
- Salesforce LWC學習(二十七) File UploadSalesforce
- HPUX Error 23 File table overflowUXError
- 內表(internal table)和工作區(work area)的區別
- oracle query output in excel fileOracleExcel
- 上傳報錯:Upload Failed: Your upload has failed a virus scan. Please choose another file.AI
- Use Excel Pivot Table as a BI toolExcel
- 將table表格內容匯入到word或者Excel程式碼例項Excel
- el-upload拍照上傳多個檔案報錯 ERR_UPLOAD_FILE_CHANGED問題
- 百度翻譯 Excel TableExcel
- MySQL InnoDB File-Per-Table表空間MySql
- MySQL中innodb_file_per_table引數MySql
- Vue+element ui table 匯出到excelVueUIExcel
- html table 匯出excel,親測有效HTMLExcel
- VBA從Excel中生成Oracle create tableExcelOracle
- Incorrect key file for table '/tmp/....'錯誤的解決--記錄
- ASM 翻譯系列第八彈:ASM Internal ASM file extent mapASM
- jquery ajax file upload NET MVC 無重新整理檔案上傳jQueryMVC
- php 3個多檔案上傳(uploadify、file upload、 webuploader)PHPWeb
- bootstrap Table的使用方法boot
- 金山文件怎麼匯出excel檔案 金山文件到處excel檔案的方法Excel
- Internal error:1058 解決方法Error
- MyIsam 表 “ Incorrect key file for table 't_ '; try to repair it”AI
- 利用poi將Html中table轉為ExcelHTMLExcel
- EXCEL資料上傳到SQL SERVER中的簡單實現方法ExcelSQLServer
- C# read excel file via ExcelDataReaderC#ExcelLDA
- 忘記INTERNAL密碼解決方法密碼
- elementui upload元件 上傳視訊到七牛雲UI元件