获取表字段长度
作者:
Mmm_余安 | 来源:发表于
2020-07-23 10:52 被阅读0次 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.
本文标题:获取表字段长度
本文链接:https://www.haomeiwen.com/subject/rzpclktx.html
网友评论