标签:类型 when for oop arc ons 创建时间 code refresh
DATA:BEGIN OF gs_sel, werks TYPE marc-werks, "工厂 matnr TYPE mara-matnr, "物料 mtart TYPE mara-mtart, "物料类型 beskz TYPE marc-beskz, "采购类型 ersda TYPE mara-ersda, "创建时间 END OF gs_sel. SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001. PARAMETERS:p_but1 RADIOBUTTON GROUP g1 DEFAULT ‘X‘ USER-COMMAND cm1, p_but2 RADIOBUTTON GROUP g1, p_chek1 AS CHECKBOX DEFAULT ‘X‘. SELECTION-SCREEN END OF BLOCK blk1. SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE TEXT-002. SELECT-OPTIONS: s_werks FOR gs_sel-werks MODIF ID ty1 OBLIGATORY DEFAULT gco_9020,"工厂 s_matnr FOR gs_sel-matnr MODIF ID ty1,"物料 s_mtart FOR gs_sel-mtart MODIF ID ty2, "物料类型 s_beskz FOR gs_sel-beskz MODIF ID ty2, "采购类型 s_ersda FOR gs_sel-ersda MODIF ID ty2. "创建时间 SELECTION-SCREEN END OF BLOCK blk2. AT SELECTION-SCREEN OUTPUT. IF p_but2 IS NOT INITIAL. PERFORM frm_get_date. ENDIF. LOOP AT SCREEN. CASE screen-group1. WHEN ‘TY1‘. IF screen-name = ‘S_MATNR-LOW‘. IF p_but1 IS NOT INITIAL. screen-required = ‘2‘. ENDIF. ENDIF. WHEN ‘TY2‘. IF p_but2 IS INITIAL. screen-active = ‘0‘. ELSE. screen-active = ‘1‘. IF screen-name = ‘S_ERSDA-LOW‘. screen-required = ‘2‘. ENDIF. ENDIF. ENDCASE. MODIFY SCREEN. ENDLOOP. AT SELECTION-SCREEN ON s_ersda. IF p_but2 IS NOT INITIAL AND sy-ucomm <> ‘CM1‘ AND s_ersda IS INITIAL. MESSAGE e001(00) WITH TEXT-003. ENDIF. AT SELECTION-SCREEN ON s_matnr. IF p_but1 IS NOT INITIAL AND sy-ucomm <> ‘CM1‘ AND s_matnr IS INITIAL. MESSAGE e001(00) WITH TEXT-003. ENDIF. *&---------------------------------------------------------------------* *& FRM_GET_DATE *&---------------------------------------------------------------------* FORM frm_get_date. * REFRESH:s_ersda. DELETE s_ersda[] WHERE sign EQ space . s_ersda-high = sy-datum. CALL FUNCTION ‘RP_CALC_DATE_IN_INTERVAL‘ EXPORTING date = s_ersda-high days = ‘00‘ months = 1 signum = ‘-‘ years = ‘00‘ IMPORTING calc_date = s_ersda-low. APPEND s_ersda. ENDFORM.
标签:类型 when for oop arc ons 创建时间 code refresh
原文地址:https://www.cnblogs.com/JackeyLove/p/13069255.html