DATA: gt_dfies TYPE TABLE OF dfies,
gs_dfies TYPE dfies.
***********判断传入值是否超过长度
CLEAR gt_dfies.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = ls_data-query_table “表
fieldname = ls_fields-fieldname ”表字段
langu = sy-langu
TABLES
dfies_tab = gt_dfies
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
READ TABLE gt_dfies INTO gs_dfies INDEX 1.
IF sy-subrc = 0.
IF gs_dfies-decimals <> '000000'."判断小数位是否有值
lv_hlen = lv_hlen + gs_dfies-decimals + 1.
ENDIF.
lv_hlen = lv_hlen + gs_dfies-leng.
ENDIF.
网友评论