日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP上传Excel文档字符限制处理

發布時間:2025/3/20 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP上传Excel文档字符限制处理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

abap中有多個函數處理上傳的excel文檔中的數據,記錄數據的信息(行、列、值)。

如,函數KCD_EXCEL_OLE_TO_INT_CONVERT:

? data: lt_data_in_file type table of kcde_cells,
? ? ? ? ls_data_in_file type kcde_cells.
?
? call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
? ? exporting
? ? ? filename ? ? ? ? ? ? ? ?= g_file "上傳文件名(如:C:\Users\Chen\Upload.xlsx)
? ? ? i_begin_col ? ? ? ? ? ? = 1
? ? ? i_begin_row ? ? ? ? ? ? = 1
? ? ? i_end_col ? ? ? ? ? ? ? = 256
? ? ? i_end_row ? ? ? ? ? ? ? = 65535
? ? tables
? ? ? intern ? ? ? ? ? ? ? ? ?= lt_data_in_file
? ? exceptions
? ? ? inconsistent_parameters = 1
? ? ? upload_ole ? ? ? ? ? ? ?= 2
? ? ? others ? ? ? ? ? ? ? ? ?= 3.
* ?IF sy-subrc <> 0.
* ? ?MESSAGE e160.
* ?ENDIF.

我們將數據以、、的方式存儲在內表lt_data_in_file中。

這里需要注意的是:這里的存儲的文本長度為32。

所以當你上傳的數據值長度超過32的時候,它就自動截取32個文本;

下面這個函數ZALSM_EXCEL_TO_INTERNAL_TABLE,可以接收50個上傳字符:

? data: lt_data_in_file type table of ? ? ? ? ?zalsmex_tabline,
? ? ? ? ls_data_in_file type ? ? ? ? ? ? ? ? ? zalsmex_tabline.
?
? call function 'ZALSM_EXCEL_TO_INTERNAL_TABLE'
? ? exporting
? ? ? filename ? ?= p_file ?"上傳文件名
? ? ? i_begin_col = '1'
? ? ? i_begin_row = '1'
? ? ? i_end_col ? = '256'
? ? ? i_end_row ? = '10000'
? ? tables
? ? ? intern ? ? ?= lt_data_in_file.
* ?if sy-subrc <> 0.
** Implement suitable error handling here
* ?endif.
?

總結

以上是生活随笔為你收集整理的SAP上传Excel文档字符限制处理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。