MODULE USER_COMMAND_2100 INPUT.
CLEAR SAVE_OK.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'ENTER'.
PERFORM FRM_ENTER.
WHEN 'CANC' OR 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'INPU'.
PERFORM FRM_SELE_FUNC USING '1'.
WHEN 'MODI'.
PERFORM FRM_SELE_FUNC USING '2'.
WHEN 'SECH'.
PERFORM FRM_SELE_FUNC USING '3'.
WHEN 'CLEA'.
PERFORM FRM_CLEAR_SCREEN USING '2100'.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_2100 INPUT
*&---------------------------------------------------------------------*
*& Form FRM_ENTER
*&---------------------------------------------------------------------*
* 按回车键引发的动作
*----------------------------------------------------------------------*
FORM FRM_ENTER_2100 .
* 取得当前光标所在位置
CLEAR W_2100-CURPOS.
GET CURSOR FIELD W_2100-CURPOS.
CASE W_2100-CURPOS.
WHEN 'W_2100-DATE'.
* 拣配日期——默认当天日期,可修改。若修改,用户回车后判断日期格式
* 是否正确,若不正确光标停留在“拣配日期”项目上等待用户修改;若正
* 确光标跳到“仓库”项目上。
PERFORM FRM_MAIN_CHECK_JZRQ USING W_2100-DATE. "检查日期
IF G_MAIN_CURPOS = 'W_G-JZRQ'.
W_2100-CURPOS = 'W_2100-DATE'.
EXIT.
ELSE.
W_2100-CURPOS = 'W_2100-LGORT'.
ENDIF.
WHEN 'W_2100-LGORT'.
* 仓库——用户登录后,从“仓管员信息表”里查找出用户名对应的库存地点,
* 显示在“仓库”后面。用户可修改,修改后按回车,系统需要判断用户输入的
* 库存地点代码是否在“仓管员信息表”里,若不存在提示错误信息(您没有操
* 作该仓库的权限)。若正确,回车后光标跳到“请选择”上
SELECT SINGLE LGORT
INTO ZMMWHM-LGORT
FROM ZMMWHM
WHERE NAME = SY-UNAME
AND LGORT = W_2100-LGORT.
IF SY-SUBRC <> 0.
W_2100-CURPOS = 'W_2100-LGORT'.
MESSAGE E000.
EXIT.
ELSE.
W_2100-CURPOS = 'W_2100-SELE'.
ENDIF.
WHEN 'W_2100-SELE'.
* 请选择——用户在该项目上输入屏幕上可供选择的菜单项编号,回车后系统判
* 断输入的内容是否存在对应菜单编号,若不存在光标停留在“请选择”项目
* 上,并选中输入的内容等待用户修改;若存在则进入相应的操作屏幕。
PERFORM FRM_SELE_FUNC USING W_2100-SELE.
WHEN OTHERS.
ENDCASE.
ENDFORM. " FRM_ENTER