*&---------------------------------------------------------------------*
*& TAB 146 : FINALIZE RESULT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
*&SPWIZARD: FUNCTION CODES FOR TABSTRIP 'TAB_146'
CONSTANTS: BEGIN OF C_TAB_146,
TAB1 LIKE SY-UCOMM VALUE 'TAB_146_FC1',
TAB2 LIKE SY-UCOMM VALUE 'TAB_146_FC2',
TAB3 LIKE SY-UCOMM VALUE 'TAB_146_FC3',
END OF C_TAB_146.
*&SPWIZARD: DATA FOR TABSTRIP 'TAB_146'
CONTROLS: TAB_146 TYPE TABSTRIP.
DATA: BEGIN OF G_TAB_146,
SUBSCREEN LIKE SY-DYNNR,
PROG LIKE SY-REPID VALUE 'ZPROJECT_EAS',
PRESSED_TAB LIKE SY-UCOMM VALUE C_TAB_146-TAB1,
END OF G_TAB_146.
*&SPWIZARD: OUTPUT MODULE FOR TS 'TAB_146'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: SETS ACTIVE TAB
MODULE TAB_146_ACTIVE_TAB_SET OUTPUT.
TAB_146-ACTIVETAB = G_TAB_146-PRESSED_TAB.
CASE G_TAB_146-PRESSED_TAB.
WHEN C_TAB_146-TAB1.
G_TAB_146-SUBSCREEN = '0147'.
WHEN C_TAB_146-TAB2.
G_TAB_146-SUBSCREEN = '0148'.
WHEN C_TAB_146-TAB3.
G_TAB_146-SUBSCREEN = '0149'.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TS 'TAB_146'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GETS ACTIVE TAB
MODULE TAB_146_ACTIVE_TAB_GET INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN C_TAB_146-TAB1.
G_TAB_146-PRESSED_TAB = C_TAB_146-TAB1.
WHEN C_TAB_146-TAB2.
G_TAB_146-PRESSED_TAB = C_TAB_146-TAB2.
WHEN C_TAB_146-TAB3.
G_TAB_146-PRESSED_TAB = C_TAB_146-TAB3.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE.
*&----------------------------------------------------------------------*
*& MODULE STATUS_0146 OUTPUT
*&----------------------------------------------------------------------*
* TEXT
*------------------------------------------------------------------------*
MODULE STATUS_0146 OUTPUT.
SET PF-STATUS '146'.
SET TITLEBAR '146'.
TYPE-POOLS : VRM.
SELECT *
FROM ZPROJECT_YEAR
INTO TABLE YEAR_DETAILS WHERE EMP_ID = ZPROJECT_EMP-EMP_ID.
LOOP AT YEAR_DETAILS INTO TEMP_YEAR.
WA_LISTBOX-KEY = TEMP_YEAR-START_DATE.
WA_LISTBOX-TEXT = TEMP_YEAR-START_DATE.
APPEND WA_LISTBOX TO IT_LISTBOX.
ENDLOOP.
LD_FIELD = 'START_DATE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LD_FIELD
VALUES = IT_LISTBOX.
REFRESH IT_LISTBOX.
SELECT *
FROM ZPROJECT_YEAR
INTO TABLE YEAR_DETAILS WHERE EMP_ID = ZPROJECT_EMP-EMP_ID.
LOOP AT YEAR_DETAILS INTO TEMP_YEAR.
WA_LISTBOX-KEY = TEMP_YEAR-END_DATE.
WA_LISTBOX-TEXT = TEMP_YEAR-END_DATE.
APPEND WA_LISTBOX TO IT_LISTBOX.
ENDLOOP.
LD_FIELD = 'END_DATE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LD_FIELD
VALUES = IT_LISTBOX.
REFRESH IT_LISTBOX.
ENDMODULE. " STATUS_0146 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0146 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0146 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'BACK'.
CLEAR : START_DATE , END_DATE , ZPROJECT_DETAILS , ZPROJECT_RECORD , ZPROJECT_EMP , ZPROJECT_RESULT.
CALL SCREEN 145.
WHEN 'OK'.
CLEAR : START_DATE , END_DATE , ZPROJECT_DETAILS , ZPROJECT_RECORD , ZPROJECT_EMP , ZPROJECT_RESULT.
CALL SCREEN 144.
ENDCASE .
ENDMODULE. " USER_COMMAND_0146 INPUT
*& TAB 146 : FINALIZE RESULT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
*&SPWIZARD: FUNCTION CODES FOR TABSTRIP 'TAB_146'
CONSTANTS: BEGIN OF C_TAB_146,
TAB1 LIKE SY-UCOMM VALUE 'TAB_146_FC1',
TAB2 LIKE SY-UCOMM VALUE 'TAB_146_FC2',
TAB3 LIKE SY-UCOMM VALUE 'TAB_146_FC3',
END OF C_TAB_146.
*&SPWIZARD: DATA FOR TABSTRIP 'TAB_146'
CONTROLS: TAB_146 TYPE TABSTRIP.
DATA: BEGIN OF G_TAB_146,
SUBSCREEN LIKE SY-DYNNR,
PROG LIKE SY-REPID VALUE 'ZPROJECT_EAS',
PRESSED_TAB LIKE SY-UCOMM VALUE C_TAB_146-TAB1,
END OF G_TAB_146.
*&SPWIZARD: OUTPUT MODULE FOR TS 'TAB_146'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: SETS ACTIVE TAB
MODULE TAB_146_ACTIVE_TAB_SET OUTPUT.
TAB_146-ACTIVETAB = G_TAB_146-PRESSED_TAB.
CASE G_TAB_146-PRESSED_TAB.
WHEN C_TAB_146-TAB1.
G_TAB_146-SUBSCREEN = '0147'.
WHEN C_TAB_146-TAB2.
G_TAB_146-SUBSCREEN = '0148'.
WHEN C_TAB_146-TAB3.
G_TAB_146-SUBSCREEN = '0149'.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TS 'TAB_146'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GETS ACTIVE TAB
MODULE TAB_146_ACTIVE_TAB_GET INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN C_TAB_146-TAB1.
G_TAB_146-PRESSED_TAB = C_TAB_146-TAB1.
WHEN C_TAB_146-TAB2.
G_TAB_146-PRESSED_TAB = C_TAB_146-TAB2.
WHEN C_TAB_146-TAB3.
G_TAB_146-PRESSED_TAB = C_TAB_146-TAB3.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE.
*&----------------------------------------------------------------------*
*& MODULE STATUS_0146 OUTPUT
*&----------------------------------------------------------------------*
* TEXT
*------------------------------------------------------------------------*
MODULE STATUS_0146 OUTPUT.
SET PF-STATUS '146'.
SET TITLEBAR '146'.
TYPE-POOLS : VRM.
SELECT *
FROM ZPROJECT_YEAR
INTO TABLE YEAR_DETAILS WHERE EMP_ID = ZPROJECT_EMP-EMP_ID.
LOOP AT YEAR_DETAILS INTO TEMP_YEAR.
WA_LISTBOX-KEY = TEMP_YEAR-START_DATE.
WA_LISTBOX-TEXT = TEMP_YEAR-START_DATE.
APPEND WA_LISTBOX TO IT_LISTBOX.
ENDLOOP.
LD_FIELD = 'START_DATE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LD_FIELD
VALUES = IT_LISTBOX.
REFRESH IT_LISTBOX.
SELECT *
FROM ZPROJECT_YEAR
INTO TABLE YEAR_DETAILS WHERE EMP_ID = ZPROJECT_EMP-EMP_ID.
LOOP AT YEAR_DETAILS INTO TEMP_YEAR.
WA_LISTBOX-KEY = TEMP_YEAR-END_DATE.
WA_LISTBOX-TEXT = TEMP_YEAR-END_DATE.
APPEND WA_LISTBOX TO IT_LISTBOX.
ENDLOOP.
LD_FIELD = 'END_DATE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LD_FIELD
VALUES = IT_LISTBOX.
REFRESH IT_LISTBOX.
ENDMODULE. " STATUS_0146 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0146 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0146 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'BACK'.
CLEAR : START_DATE , END_DATE , ZPROJECT_DETAILS , ZPROJECT_RECORD , ZPROJECT_EMP , ZPROJECT_RESULT.
CALL SCREEN 145.
WHEN 'OK'.
CLEAR : START_DATE , END_DATE , ZPROJECT_DETAILS , ZPROJECT_RECORD , ZPROJECT_EMP , ZPROJECT_RESULT.
CALL SCREEN 144.
ENDCASE .
ENDMODULE. " USER_COMMAND_0146 INPUT
No comments:
Post a Comment