选择屏幕 modif ID
REPORT zmmr0085.
TABLES:
ekko,ekpo,mkpf,mseg.
TYPES:BEGIN OF ty_po,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
bsart TYPE ekko-bsart,
matnr TYPE ekpo-matnr,
txz01 TYPE ekpo-txz01,
bednr TYPE ekpo-bednr,
werks TYPE ekpo-werks,
lgort TYPE ekpo-lgort,
END OF ty_po.
DATA:gt_po TYPE STANDARD TABLE OF ty_po.
DATA:gt_mkpf TYPE TABLE OF mkpf,
gt_mseg TYPE TABLE OF mseg.
DATA:gt_zmmt0060 TYPE STANDARD TABLE OF zmmt0060.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
PARAMETERS: p_cbox TYPE c AS CHECKBOX USER-COMMAND uc.
SELECT-OPTIONS:s_budat1 FOR mkpf-budat MODIF ID b1 .
SELECT-OPTIONS:s_cpudt FOR mkpf-cpudt MODIF ID b2 OBLIGATORY DEFAULT sy-datum,
s_cputm FOR mkpf-cputm MODIF ID b2,
s_ebeln FOR mseg-ebeln MODIF ID b2,
s_ebelp FOR mseg-ebelp MODIF ID b2,
s_mblnr FOR mkpf-mblnr MODIF ID b2,
s_zeile FOR mseg-zeile MODIF ID b2.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_cbox IS NOT INITIAL.
IF screen-group1 EQ 'B2'.
screen-active = '0'.
ENDIF.
IF screen-group1 EQ 'B1'.
screen-active = '1'.
ENDIF.
ELSE.
IF screen-group1 EQ 'B2'.
screen-active = '1'.
ENDIF.
IF screen-group1 EQ 'B1'.
screen-active = '0'.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
START-OF-SELECTION.
IF p_cbox IS INITIAL.
PERFORM frm_get_matdoc.
PERFORM frm_send_out.
ELSE.
PERFORM frm_delete_log.
ENDIF.
FORM frm_get_matdoc.
DATA:lt_zmmt0060 TYPE STANDARD TABLE OF zmmt0060.
DATA:lt_mseg TYPE STANDARD TABLE OF mseg.
SELECT * FROM zmmt0060 INTO TABLE lt_zmmt0060
WHERE cpudt IN s_cpudt
AND cputm IN s_cputm
AND mblnr IN s_mblnr
AND ebeln