创建包含结构或表的内表:
DATA: BEGIN OF it_tab.
INCLUDE TYPE/STRUCTURE name. name:结构名或者表名
DATA: num TYPE I,
........
END OF it_tab.
ABAP中加上前导零、去除前导零的function module
*加上p_in的前导零
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_in
IMPORTING
output = p_in.
*去除p_out的前导零
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = p_out
IMPORTING
output = p_out.
在选择屏幕进行各个输入的判断 (至少有一个变量要输入值)
AT SELECTION-SCREEN.
IF S_KUNNR[] IS INITIAL AND S_MAT_C1[] IS INITIAL AND S_MAT_O[] IS INITIAL AND S_MATNR[] IS INITIAL AND S_CDATE[] IS INITIAL.
MESSAGE '客户代码/客户料号1/客户料号/标准料号/创建日期 至少输入一项!' TYPE 'E'.
ENDIF.
类似:SELECT-OPTIONS: S_KUNNR FOR KUNNR. 判断的时候要用 S_KUNNR[]
类似:PARAMETERS S_KUNNR TYPE KUNNR. 判断的时候要用 S_KUNNR