*&---------------------------------------------------------------------*
*& Report ZDEMO_SCREENWORK
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDEMO_SCREENWORK.
TYPE-POOLS VRM.
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE OK_CODE,
FATHER(10),
STUDENT(10),
FLD(20) TYPE C,
VAL(20) TYPE C,INPUT1(20) TYPE c, INPUT2(20) TYPE c, INPUT3(20) TYPE c.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'CANCEL' OR 'BACK'.
LEAVE PROGRAM.
when 'CREATE'.
CALL SCREEN 200.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0200 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'STATUS_0200'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0200 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0200 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0200 INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
IF SAVE_OK = 'SELECTED'.
GET CURSOR FIELD FLD value val.
CALL SCREEN 300 STARTING AT 10 5 ENDING AT 50 15.
else. save_ok = 'CANCEL'.
leave to screen 100.
endif.
ENDMODULE. " USER_COMMAND_0200
*&---------------------------------------------------------------------*
*& Module INIT_LISTBOX OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE INIT_LISTBOX OUTPUT.
name = 'DROP'. " List Control Name
clear list.
value-key = '1'. APPEND value TO list.
value-key = '2'. APPEND value TO list.
value-key = '3'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ENDMODULE. " INIT_LISTBOX OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0300 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0300 INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'BACK'.
SET SCREEN '0'.
endcase.
ENDMODULE. " USER_COMMAND_0300 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0300 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0300 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
LOOP AT SCREEN.
if val = '1'.
IF screen-group1 = 'IN2'.
screen-input = '0'.
screen-invisible = '1'. "This should be 1 to enable, 0 to disable
MODIFY SCREEN.
endif.
if screen-group1 = 'IN3'.
screen-input = '0'.
screen-invisible = '1'. "This should be 1 to enable, 0 to disable
MODIFY SCREEN.
endif.
elseif val = '2'.
IF screen-group1 = 'IN3'.
screen-input = '0'.
screen-invisible = '1'. "This should be 1 to enable, 0 to disable
MODIFY SCREEN.
endif.
endif.
ENDLOOP.
ENDMODULE.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.