*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_1115 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_1115 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
CLEAR : ZPROJECT_KPI, START_DATE , END_DATE .
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'BACK'.
CLEAR : START_DATE , END_DATE, ZPROJECT_KPI.
CALL SCREEN 115.
WHEN 'RESET_ALL'.
CLEAR ZPROJECT_KPI.
WHEN 'CLEAR'.
IF R1 = 'X'.
CLEAR : ZPROJECT_KPI-KPI_1 , ZPROJECT_KPI-TIME_1 , ZPROJECT_KPI-QUALITY_1.
ELSEIF R2 = 'X'.
CLEAR : ZPROJECT_KPI-KPI_2 , ZPROJECT_KPI-TIME_2 , ZPROJECT_KPI-QUALITY_2.
ELSEIF R3 = 'X'.
CLEAR : ZPROJECT_KPI-KPI_3 , ZPROJECT_KPI-TIME_3 , ZPROJECT_KPI-QUALITY_3.
ELSEIF R4 = 'X'.
CLEAR : ZPROJECT_KPI-KPI_4 , ZPROJECT_KPI-TIME_4 , ZPROJECT_KPI-QUALITY_4.
ELSEIF R5 = 'X'.
CLEAR : ZPROJECT_KPI-KPI_5 , ZPROJECT_KPI-TIME_5 , ZPROJECT_KPI-QUALITY_5.
ENDIF.
WHEN 'SUBMIT'.
TEMP_KPI-EMP_ID = ZPROJECT_EMP-EMP_ID.
TEMP_KPI-START_DATE = START_DATE.
TEMP_KPI-END_DATE = END_DATE.
TEMP_KPI-EMP_NAME = ZPROJECT_EMP-EMP_NAME.
TEMP_KPI-DEPT_NAME = ZPROJECT_EMP-DEPT_NAME.
TEMP_KPI-KPI_1 = ZPROJECT_KPI-KPI_1.
TEMP_KPI-KPI_2 = ZPROJECT_KPI-KPI_2.
TEMP_KPI-KPI_3 = ZPROJECT_KPI-KPI_3.
TEMP_KPI-KPI_4 = ZPROJECT_KPI-KPI_4.
TEMP_KPI-KPI_5 = ZPROJECT_KPI-KPI_5.
TEMP_KPI-TIME_1 = ZPROJECT_KPI-TIME_1.
TEMP_KPI-TIME_2 = ZPROJECT_KPI-TIME_2.
TEMP_KPI-TIME_3 = ZPROJECT_KPI-TIME_3.
TEMP_KPI-TIME_4 = ZPROJECT_KPI-TIME_4.
TEMP_KPI-TIME_5 = ZPROJECT_KPI-TIME_5.
TEMP_KPI-QUALITY_1 = ZPROJECT_KPI-QUALITY_1.
TEMP_KPI-QUALITY_2 = ZPROJECT_KPI-QUALITY_2.
TEMP_KPI-QUALITY_3 = ZPROJECT_KPI-QUALITY_3.
TEMP_KPI-QUALITY_4 = ZPROJECT_KPI-QUALITY_4.
TEMP_KPI-QUALITY_5 = ZPROJECT_KPI-QUALITY_5.
MODIFY ZPROJECT_KPI FROM TEMP_KPI.
MESSAGE I005(ZMSG_EAS).
CALL SCREEN 115.
ENDCASE.
ENDMODULE. " USER_COMMAND_1115 INPUT
*&---------------------------------------------------------------------*
*& MODULE STATUS_0118 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0118 OUTPUT.
SET PF-STATUS '118'.
SET TITLEBAR '118'.
SELECT SINGLE EMP_ID EMP_NAME DEPT_NO DEPT_NAME JOINING_DATE PASSCODE
EMP_PHONE ADDRESS
FROM ZPROJECT_EMP
INTO
(ZPROJECT_EMP-EMP_ID , ZPROJECT_EMP-EMP_NAME ,ZPROJECT_EMP-DEPT_NO ,
ZPROJECT_EMP-DEPT_NAME,ZPROJECT_EMP-JOINING_DATE,ZPROJECT_EMP-PASSCODE ,
ZPROJECT_EMP-EMP_PHONE , ZPROJECT_EMP-ADDRESS)
WHERE EMP_ID = USER_ID.
ENDMODULE. " STATUS_0118 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0118 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0118 INPUT.
CASE SY-UCOMM.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'SUBMIT'.
TEMP_EMP-EMP_ID = ZPROJECT_EMP-EMP_ID.
TEMP_EMP-EMP_NAME = ZPROJECT_EMP-EMP_NAME.
TEMP_EMP-DEPT_NO = ZPROJECT_EMP-DEPT_NO.
TEMP_EMP-DEPT_NAME = ZPROJECT_EMP-DEPT_NAME.
TEMP_EMP-JOINING_DATE = ZPROJECT_EMP-JOINING_DATE.
TEMP_EMP-PASSCODE = ZPROJECT_EMP-PASSCODE.
TEMP_EMP-EMP_PHONE = ZPROJECT_EMP-EMP_PHONE.
TEMP_EMP-ADDRESS = ZPROJECT_EMP-ADDRESS.
MODIFY ZPROJECT_EMP FROM TEMP_EMP.
MESSAGE I005(ZMSG_EAS).
CALL SCREEN 0115.
WHEN 'BACK'.
CALL SCREEN 0115.
ENDCASE.
ENDMODULE. " USER_COMMAND_0118 INPUT
*&---------------------------------------------------------------------*
*& TAB 119 - VIEW MARKS AND RESULT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
*&SPWIZARD: FUNCTION CODES FOR TABSTRIP 'TAB'
CONSTANTS: BEGIN OF C_TAB,
TAB1 LIKE SY-UCOMM VALUE 'TAB_FC1',
TAB2 LIKE SY-UCOMM VALUE 'TAB_FC2',
END OF C_TAB.
*&SPWIZARD: DATA FOR TABSTRIP 'TAB'
CONTROLS: TAB TYPE TABSTRIP.
DATA: BEGIN OF G_TAB,
SUBSCREEN LIKE SY-DYNNR,
PROG LIKE SY-REPID VALUE 'ZPROJECT_EAS',
PRESSED_TAB LIKE SY-UCOMM VALUE C_TAB-TAB1,
END OF G_TAB.
*&SPWIZARD: OUTPUT MODULE FOR TS 'TAB'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: SETS ACTIVE TAB
MODULE TAB_ACTIVE_TAB_SET OUTPUT.
TAB-ACTIVETAB = G_TAB-PRESSED_TAB.
CASE G_TAB-PRESSED_TAB.
WHEN C_TAB-TAB1.
G_TAB-SUBSCREEN = '0121'.
WHEN C_TAB-TAB2.
G_TAB-SUBSCREEN = '0122'.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TS 'TAB'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GETS ACTIVE TAB
MODULE TAB_ACTIVE_TAB_GET INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN C_TAB-TAB1.
G_TAB-PRESSED_TAB = C_TAB-TAB1.
WHEN C_TAB-TAB2.
G_TAB-PRESSED_TAB = C_TAB-TAB2.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE.
*&---------------------------------------------------------------------*
*& MODULE STATUS_0119 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0119 OUTPUT.
SET PF-STATUS '119'.
SET TITLEBAR '119'.
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_0119 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0119 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0119 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
CLEAR : START_DATE , END_DATE , ZPROJECT_KPI , ZPROJECT_MARKS , ZPROJECT_RECORD.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'OK'.
CLEAR : START_DATE , END_DATE .
CLEAR : ZPROJECT_KPI , ZPROJECT_MARKS , ZPROJECT_RECORD.
CALL SCREEN 115.
ENDCASE.
ENDMODULE. " USER_COMMAND_0119 INPUT