*&---------------------------------------------------------------------*
*& MODULE STATUS_0126 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0126 OUTPUT.
SET PF-STATUS '0126'.
SET TITLEBAR '126'.
SELECT SINGLE
KPI_1 KPI_2 KPI_3 KPI_4 KPI_5
TIME_1 TIME_2 TIME_3 TIME_4 TIME_5
QUALITY_1 QUALITY_2 QUALITY_3 QUALITY_4 QUALITY_5
FROM ZPROJECT_KPI
INTO (ZPROJECT_KPI-KPI_1 , ZPROJECT_KPI-KPI_2 , ZPROJECT_KPI-KPI_3 ,
ZPROJECT_KPI-KPI_4 ,ZPROJECT_KPI-KPI_5 ,ZPROJECT_KPI-TIME_1 ,
ZPROJECT_KPI-TIME_2 , ZPROJECT_KPI-TIME_3 ,ZPROJECT_KPI-TIME_4 ,
ZPROJECT_KPI-TIME_5, ZPROJECT_KPI-QUALITY_1 ,ZPROJECT_KPI-QUALITY_2 ,
ZPROJECT_KPI-QUALITY_3 , ZPROJECT_KPI-QUALITY_4 , ZPROJECT_KPI-QUALITY_5)
WHERE EMP_ID = ZPROJECT_KPI-EMP_ID AND START_DATE = ZPROJECT_KPI-START_DATE AND END_DATE = ZPROJECT_KPI-END_DATE.
ENDMODULE. " STATUS_0126 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0126 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0126 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
CLEAR : ZPROJECT_KPI , ZPROJECT_EMP.
CALL SCREEN 127.
WHEN 'SUBMIT'. "STORE THE MARKS GIVEN FOR KPI'S IN A TABLE"
TEMP_MARKS-EMP_ID = ZPROJECT_KPI-EMP_ID.
TEMP_MARKS-EMP_NAME = ZPROJECT_KPI-EMP_NAME.
TEMP_MARKS-DEPT_NAME = ZPROJECT_KPI-DEPT_NAME.
TEMP_MARKS-START_DATE = ZPROJECT_KPI-START_DATE.
TEMP_MARKS-END_DATE = ZPROJECT_KPI-END_DATE.
TEMP_MARKS-KPI_1 = ZPROJECT_KPI-KPI_1.
TEMP_MARKS-KPI_2 = ZPROJECT_KPI-KPI_2.
TEMP_MARKS-KPI_3 = ZPROJECT_KPI-KPI_3.
TEMP_MARKS-KPI_4 = ZPROJECT_KPI-KPI_4.
TEMP_MARKS-KPI_5 = ZPROJECT_KPI-KPI_5.
TEMP_MARKS-TIME_1 = ZPROJECT_KPI-TIME_1.
TEMP_MARKS-TIME_2 = ZPROJECT_KPI-TIME_2.
TEMP_MARKS-TIME_3 = ZPROJECT_KPI-TIME_3.
TEMP_MARKS-TIME_4 = ZPROJECT_KPI-TIME_4.
TEMP_MARKS-TIME_5 = ZPROJECT_KPI-TIME_5.
TEMP_MARKS-MARKS_T1 = ZPROJECT_MARKS-MARKS_T1.
TEMP_MARKS-MARKS_T2 = ZPROJECT_MARKS-MARKS_T2.
TEMP_MARKS-MARKS_T3 = ZPROJECT_MARKS-MARKS_T3.
TEMP_MARKS-MARKS_T4 = ZPROJECT_MARKS-MARKS_T4.
TEMP_MARKS-MARKS_T5 = ZPROJECT_MARKS-MARKS_T5.
TEMP_MARKS-QUALITY_1 = ZPROJECT_KPI-QUALITY_1.
TEMP_MARKS-QUALITY_2 = ZPROJECT_KPI-QUALITY_2.
TEMP_MARKS-QUALITY_3 = ZPROJECT_KPI-QUALITY_3.
TEMP_MARKS-QUALITY_4 = ZPROJECT_KPI-QUALITY_4.
TEMP_MARKS-QUALITY_5 = ZPROJECT_KPI-QUALITY_5.
TEMP_MARKS-MARKS_Q1 = ZPROJECT_MARKS-MARKS_Q1.
TEMP_MARKS-MARKS_Q2 = ZPROJECT_MARKS-MARKS_Q2.
TEMP_MARKS-MARKS_Q3 = ZPROJECT_MARKS-MARKS_Q3.
TEMP_MARKS-MARKS_Q4 = ZPROJECT_MARKS-MARKS_Q4.
TEMP_MARKS-MARKS_Q5 = ZPROJECT_MARKS-MARKS_Q5.
MODIFY ZPROJECT_MARKS FROM TEMP_MARKS.
"CALCULATE TOTALS AND MAXIMUM MARKS FOR EACH AND STORE IN A TABLE"
ZPROJECT_RECORD-MAXIMUM_MARKS_TIME = ZPROJECT_KPI-TIME_1 + ZPROJECT_KPI-TIME_2 + ZPROJECT_KPI-TIME_3 +
ZPROJECT_KPI-TIME_4 + ZPROJECT_KPI-TIME_5.
ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY = ZPROJECT_KPI-QUALITY_1 + ZPROJECT_KPI-QUALITY_2 +
ZPROJECT_KPI-QUALITY_3 + ZPROJECT_KPI-QUALITY_4 + ZPROJECT_KPI-QUALITY_5 .
ZPROJECT_RECORD-TOTAL_MAXIMUM_MARKS = ZPROJECT_RECORD-MAXIMUM_MARKS_TIME +
ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY.
ZPROJECT_RECORD-MARKS_OBTAINED_TIME = ZPROJECT_MARKS-MARKS_T1 + ZPROJECT_MARKS-MARKS_T2 +
ZPROJECT_MARKS-MARKS_T3 + ZPROJECT_MARKS-MARKS_T4 + ZPROJECT_MARKS-MARKS_T5.
ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY = ZPROJECT_MARKS-MARKS_Q1 + ZPROJECT_MARKS-MARKS_Q2 +
ZPROJECT_MARKS-MARKS_Q3 + ZPROJECT_MARKS-MARKS_Q4 + ZPROJECT_MARKS-MARKS_Q5.
ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS = ZPROJECT_RECORD-MARKS_OBTAINED_TIME +
ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY.
IF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 0 AND 20.
ZPROJECT_RECORD-PERFORMANCE = 'POOR PERFORMANE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 21 AND 40.
ZPROJECT_RECORD-PERFORMANCE = 'BELOW AVERAGE PERFORMANCE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 41 AND 60.
ZPROJECT_RECORD-PERFORMANCE = 'AVERAGE PERFORMANCE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 61 AND 80.
ZPROJECT_RECORD-PERFORMANCE = 'ABOVE AVERAGE PERFORMANCE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 81 AND 100.
ZPROJECT_RECORD-PERFORMANCE = 'EXCELLENT PERFORMANCE'.
ENDIF.
TEMP_RECORD-EMP_ID = ZPROJECT_KPI-EMP_ID.
TEMP_RECORD-EMP_NAME = ZPROJECT_KPI-EMP_NAME.
TEMP_RECORD-DEPT_NAME = ZPROJECT_KPI-DEPT_NAME.
TEMP_RECORD-START_DATE = ZPROJECT_KPI-START_DATE.
TEMP_RECORD-END_DATE = ZPROJECT_KPI-END_DATE.
TEMP_RECORD-MAXIMUM_MARKS_TIME = ZPROJECT_RECORD-MAXIMUM_MARKS_TIME.
TEMP_RECORD-MARKS_OBTAINED_TIME = ZPROJECT_RECORD-MARKS_OBTAINED_TIME.
TEMP_RECORD-MAXIMUM_MARKS_QUALITY = ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY.
TEMP_RECORD-MARKS_OBTAINED_QUALITY = ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY.
TEMP_RECORD-TOTAL_MAXIMUM_MARKS = ZPROJECT_RECORD-TOTAL_MAXIMUM_MARKS.
TEMP_RECORD-TOTAL_OBTAINED_MARKS = ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS.
TEMP_RECORD-PERFORMANCE = ZPROJECT_RECORD-PERFORMANCE.
MODIFY ZPROJECT_RECORD FROM TEMP_RECORD.
MESSAGE I005(ZMSG_EAS).
CLEAR : ZPROJECT_KPI , ZPROJECT_MARKS .
CALL SCREEN 127.
ENDCASE.
ENDMODULE. " USER_COMMAND_0126 INPUT
Output:
*& MODULE STATUS_0126 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0126 OUTPUT.
SET PF-STATUS '0126'.
SET TITLEBAR '126'.
SELECT SINGLE
KPI_1 KPI_2 KPI_3 KPI_4 KPI_5
TIME_1 TIME_2 TIME_3 TIME_4 TIME_5
QUALITY_1 QUALITY_2 QUALITY_3 QUALITY_4 QUALITY_5
FROM ZPROJECT_KPI
INTO (ZPROJECT_KPI-KPI_1 , ZPROJECT_KPI-KPI_2 , ZPROJECT_KPI-KPI_3 ,
ZPROJECT_KPI-KPI_4 ,ZPROJECT_KPI-KPI_5 ,ZPROJECT_KPI-TIME_1 ,
ZPROJECT_KPI-TIME_2 , ZPROJECT_KPI-TIME_3 ,ZPROJECT_KPI-TIME_4 ,
ZPROJECT_KPI-TIME_5, ZPROJECT_KPI-QUALITY_1 ,ZPROJECT_KPI-QUALITY_2 ,
ZPROJECT_KPI-QUALITY_3 , ZPROJECT_KPI-QUALITY_4 , ZPROJECT_KPI-QUALITY_5)
WHERE EMP_ID = ZPROJECT_KPI-EMP_ID AND START_DATE = ZPROJECT_KPI-START_DATE AND END_DATE = ZPROJECT_KPI-END_DATE.
ENDMODULE. " STATUS_0126 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0126 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0126 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
CLEAR : ZPROJECT_KPI , ZPROJECT_EMP.
CALL SCREEN 127.
WHEN 'SUBMIT'. "STORE THE MARKS GIVEN FOR KPI'S IN A TABLE"
TEMP_MARKS-EMP_ID = ZPROJECT_KPI-EMP_ID.
TEMP_MARKS-EMP_NAME = ZPROJECT_KPI-EMP_NAME.
TEMP_MARKS-DEPT_NAME = ZPROJECT_KPI-DEPT_NAME.
TEMP_MARKS-START_DATE = ZPROJECT_KPI-START_DATE.
TEMP_MARKS-END_DATE = ZPROJECT_KPI-END_DATE.
TEMP_MARKS-KPI_1 = ZPROJECT_KPI-KPI_1.
TEMP_MARKS-KPI_2 = ZPROJECT_KPI-KPI_2.
TEMP_MARKS-KPI_3 = ZPROJECT_KPI-KPI_3.
TEMP_MARKS-KPI_4 = ZPROJECT_KPI-KPI_4.
TEMP_MARKS-KPI_5 = ZPROJECT_KPI-KPI_5.
TEMP_MARKS-TIME_1 = ZPROJECT_KPI-TIME_1.
TEMP_MARKS-TIME_2 = ZPROJECT_KPI-TIME_2.
TEMP_MARKS-TIME_3 = ZPROJECT_KPI-TIME_3.
TEMP_MARKS-TIME_4 = ZPROJECT_KPI-TIME_4.
TEMP_MARKS-TIME_5 = ZPROJECT_KPI-TIME_5.
TEMP_MARKS-MARKS_T1 = ZPROJECT_MARKS-MARKS_T1.
TEMP_MARKS-MARKS_T2 = ZPROJECT_MARKS-MARKS_T2.
TEMP_MARKS-MARKS_T3 = ZPROJECT_MARKS-MARKS_T3.
TEMP_MARKS-MARKS_T4 = ZPROJECT_MARKS-MARKS_T4.
TEMP_MARKS-MARKS_T5 = ZPROJECT_MARKS-MARKS_T5.
TEMP_MARKS-QUALITY_1 = ZPROJECT_KPI-QUALITY_1.
TEMP_MARKS-QUALITY_2 = ZPROJECT_KPI-QUALITY_2.
TEMP_MARKS-QUALITY_3 = ZPROJECT_KPI-QUALITY_3.
TEMP_MARKS-QUALITY_4 = ZPROJECT_KPI-QUALITY_4.
TEMP_MARKS-QUALITY_5 = ZPROJECT_KPI-QUALITY_5.
TEMP_MARKS-MARKS_Q1 = ZPROJECT_MARKS-MARKS_Q1.
TEMP_MARKS-MARKS_Q2 = ZPROJECT_MARKS-MARKS_Q2.
TEMP_MARKS-MARKS_Q3 = ZPROJECT_MARKS-MARKS_Q3.
TEMP_MARKS-MARKS_Q4 = ZPROJECT_MARKS-MARKS_Q4.
TEMP_MARKS-MARKS_Q5 = ZPROJECT_MARKS-MARKS_Q5.
MODIFY ZPROJECT_MARKS FROM TEMP_MARKS.
"CALCULATE TOTALS AND MAXIMUM MARKS FOR EACH AND STORE IN A TABLE"
ZPROJECT_RECORD-MAXIMUM_MARKS_TIME = ZPROJECT_KPI-TIME_1 + ZPROJECT_KPI-TIME_2 + ZPROJECT_KPI-TIME_3 +
ZPROJECT_KPI-TIME_4 + ZPROJECT_KPI-TIME_5.
ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY = ZPROJECT_KPI-QUALITY_1 + ZPROJECT_KPI-QUALITY_2 +
ZPROJECT_KPI-QUALITY_3 + ZPROJECT_KPI-QUALITY_4 + ZPROJECT_KPI-QUALITY_5 .
ZPROJECT_RECORD-TOTAL_MAXIMUM_MARKS = ZPROJECT_RECORD-MAXIMUM_MARKS_TIME +
ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY.
ZPROJECT_RECORD-MARKS_OBTAINED_TIME = ZPROJECT_MARKS-MARKS_T1 + ZPROJECT_MARKS-MARKS_T2 +
ZPROJECT_MARKS-MARKS_T3 + ZPROJECT_MARKS-MARKS_T4 + ZPROJECT_MARKS-MARKS_T5.
ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY = ZPROJECT_MARKS-MARKS_Q1 + ZPROJECT_MARKS-MARKS_Q2 +
ZPROJECT_MARKS-MARKS_Q3 + ZPROJECT_MARKS-MARKS_Q4 + ZPROJECT_MARKS-MARKS_Q5.
ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS = ZPROJECT_RECORD-MARKS_OBTAINED_TIME +
ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY.
IF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 0 AND 20.
ZPROJECT_RECORD-PERFORMANCE = 'POOR PERFORMANE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 21 AND 40.
ZPROJECT_RECORD-PERFORMANCE = 'BELOW AVERAGE PERFORMANCE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 41 AND 60.
ZPROJECT_RECORD-PERFORMANCE = 'AVERAGE PERFORMANCE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 61 AND 80.
ZPROJECT_RECORD-PERFORMANCE = 'ABOVE AVERAGE PERFORMANCE'.
ELSEIF ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS BETWEEN 81 AND 100.
ZPROJECT_RECORD-PERFORMANCE = 'EXCELLENT PERFORMANCE'.
ENDIF.
TEMP_RECORD-EMP_ID = ZPROJECT_KPI-EMP_ID.
TEMP_RECORD-EMP_NAME = ZPROJECT_KPI-EMP_NAME.
TEMP_RECORD-DEPT_NAME = ZPROJECT_KPI-DEPT_NAME.
TEMP_RECORD-START_DATE = ZPROJECT_KPI-START_DATE.
TEMP_RECORD-END_DATE = ZPROJECT_KPI-END_DATE.
TEMP_RECORD-MAXIMUM_MARKS_TIME = ZPROJECT_RECORD-MAXIMUM_MARKS_TIME.
TEMP_RECORD-MARKS_OBTAINED_TIME = ZPROJECT_RECORD-MARKS_OBTAINED_TIME.
TEMP_RECORD-MAXIMUM_MARKS_QUALITY = ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY.
TEMP_RECORD-MARKS_OBTAINED_QUALITY = ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY.
TEMP_RECORD-TOTAL_MAXIMUM_MARKS = ZPROJECT_RECORD-TOTAL_MAXIMUM_MARKS.
TEMP_RECORD-TOTAL_OBTAINED_MARKS = ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS.
TEMP_RECORD-PERFORMANCE = ZPROJECT_RECORD-PERFORMANCE.
MODIFY ZPROJECT_RECORD FROM TEMP_RECORD.
MESSAGE I005(ZMSG_EAS).
CLEAR : ZPROJECT_KPI , ZPROJECT_MARKS .
CALL SCREEN 127.
ENDCASE.
ENDMODULE. " USER_COMMAND_0126 INPUT
Output:
screen to enter marks to the employees
marks field entered
marks provided by manger are successfully submitted in the DDIC table ZPROJECT_MARKS
data submitted successfully