ASSIGN COMPONENT ls_excel_tab-col OF STRUCTURE <fs_excel_s> TO <fs_value>.
IF sy-subrc EQ 0.
CONDENSE ls_excel_tab-value.
cl_descr ?= cl_abap_typedescr=>describe_by_data( <fs_excel_s> ).
ASSIGN cl_descr->components[ ls_excel_tab-col ] TO <fs_comp>.
IF <fs_comp>-type_kind = 'P'.
lvfldvalue = ls_excel_tab-value.
PERFORM RV_MARK_OF_thousandth(zabap_common_program) USING lvfldvalue CHANGING lvfldvalue.
ls_excel_tab-value = lvfldvalue.
ENDIF.
MOVE ls_excel_tab-value TO <fs_value>.
ENDIF.
AT END OF row.
APPEND <fs_excel_s> TO <fs_excel_t>.
lv_row = ls_excel_tab-row + 1.
ENDAT.
*解决千分位问题 eg.123,123.00 → 123123.00 add by gavin
FORM RV_MARK_OF_thousandth USING iv_feild TYPE char50 CHANGING ev_feild TYPE char50.
CHECK iv_feild IS NOT INITIAL.
DATA: lv_str TYPE string,
lv_strt TYPE string,
lv_char1 TYPE char1,
lv_idx TYPE int4,
lv_idxt TYPE int4.
lv_str = iv_feild.
lv_idxt = strlen( lv_str ).
lv_idx = 0.
DO lv_idxt TIMES.
lv_char1 = lv_str+lv_idx(1).
CASE lv_char1.
WHEN '0' OR '1' OR '2' OR '3' OR '4' OR '5' OR '6' OR '7' OR '8' OR '9' OR '.'.
lv_strt = lv_strt && lv_char1.
WHEN OTHERS.
ENDCASE.
lv_idx = lv_idx + 1.
ENDDO.
CONDENSE lv_strt.
IF lv_strt+0(1) NE '.'.
ev_feild = lv_strt.
ENDIF.
ENDFORM.
SAP ABAP上传Excel数据 报CONVT_NO_NUMBER千分位问题的处理
gavin_gxh2023-12-05 2:38
相关推荐
冰淇淋烤布蕾7 小时前
EasyExcel使用图片转成excel表格8 小时前
Excel中怎么提取超出部分数值,比如5w是目标,超出100%和120%的值怎么用公式提取?周末zm14 小时前
golang将word、excel转换为pdf孟秋与你15 小时前
【excel】easy excel如何导出动态列Say Bay To The Bugs17 小时前
EasyExcel 使用多线程按顺序导出数据机器懒得学习17 小时前
Python & PyQt5 实现 .his 文件批量转 Excel 工具可靠百灵鸟17 小时前
Python 操作 Excel 表格从简单到高级用法理想不理想v1 天前
[经典] 前端js将文件流导出为csv/excel文件m0_589828871 天前
Excel根据条件动态索引单元格范围匆匆整棹还1 天前
已有账号,重装系统激活office后发现没有ppt,word,excel等