*&---------------------------------------------------------------------*
*& MODULE STATUS_0125 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0125 OUTPUT.
SET PF-STATUS '125'.
SET TITLEBAR '125'.
SELECT SINGLE MGR_ID MGR_NAME DEPT_NAME FROM ZPROJECT_MGR
INTO (ZPROJECT_MGR-MGR_ID , ZPROJECT_MGR-MGR_NAME , ZPROJECT_MGR-DEPT_NAME)
WHERE MGR_ID = USER_ID.
ENDMODULE. " STATUS_0125 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0125 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0125 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 120.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CMD'.
CALL SCREEN 129.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'ASSIGN_MARKS'.
CALL SCREEN 127.
WHEN 'EMPLOYEE_DETAILS'.
SELECT * FROM ZPROJECT_EMP INTO TABLE EMP_DETAILS
WHERE DEPT_NAME = TEMP_MGR_DEPT.
REFRESH IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EMP_ID'.
WA_FIELDCAT-SELTEXT_M = 'EMP_ID'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EMP_NAME'.
WA_FIELDCAT-SELTEXT_M = 'EMP_NAME'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DEPT_NO'.
WA_FIELDCAT-SELTEXT_M = 'DEPARTMENT NO.'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DEPT_NAME'.
WA_FIELDCAT-SELTEXT_M = 'DEPARTMENT NAME'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'JOINING_DATE'.
WA_FIELDCAT-SELTEXT_M = 'JOINING DATE'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EMP_PHONE'.
WA_FIELDCAT-SELTEXT_M = 'PHONE NO.'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'ADDRESS'.
WA_FIELDCAT-SELTEXT_M = 'EMP-ADDRESS'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = EMP_DETAILS.
WHEN 'VPD'.
SELECT * FROM ZPROJECT_DETAILS INTO TABLE PROJECT_DETAILS
WHERE DEPT_NAME = TEMP_MGR_DEPT.
REFRESH IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EMP_ID'.
WA_FIELDCAT-SELTEXT_M = 'EMP_ID'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DEPT_NAME'.
WA_FIELDCAT-SELTEXT_M = 'DEPT_NAME'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PROJECT_NAME'.
WA_FIELDCAT-SELTEXT_M = 'PROJECT_NAME'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PROJECT_ID'.
WA_FIELDCAT-SELTEXT_M = 'PROJECT_ID'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PROJECT_START_DATE'.
WA_FIELDCAT-SELTEXT_M = 'PROJECT_START_DATE'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PROJECT_END_DATE'.
WA_FIELDCAT-SELTEXT_M = 'PROJECT_END_DATE'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'PROJECT_STATUS'.
WA_FIELDCAT-SELTEXT_M = 'PROJECT_STATUS'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = PROJECT_DETAILS.
WHEN 'VKM'.
SELECT * FROM ZPROJECT_KPI INTO TABLE KPI_DETAILS
WHERE DEPT_NAME = TEMP_MGR_DEPT.
REFRESH IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EMP_ID'.
WA_FIELDCAT-SELTEXT_M = 'EMP_ID'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'DEPT_NAME'.
WA_FIELDCAT-SELTEXT_M = 'DEPT_NAME'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KPI_1'.
WA_FIELDCAT-SELTEXT_M = 'KPI_1'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TIME_1'.
WA_FIELDCAT-SELTEXT_M = 'TIME_1'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'QUALITY_1'.
WA_FIELDCAT-SELTEXT_M = 'QUALITY_1'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KPI_2'.
WA_FIELDCAT-SELTEXT_M = 'KPI_2'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TIME_2'.
WA_FIELDCAT-SELTEXT_M = 'TIME_2'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'QUALITY_2'.
WA_FIELDCAT-SELTEXT_M = 'QUALITY_2'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KPI_3'.
WA_FIELDCAT-SELTEXT_M = 'KPI_3'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TIME_3'.
WA_FIELDCAT-SELTEXT_M = 'TIME_3'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'QUALITY_3'.
WA_FIELDCAT-SELTEXT_M = 'QUALITY_3'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KPI_4'.
WA_FIELDCAT-SELTEXT_M = 'KPI_4'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TIME_4'.
WA_FIELDCAT-SELTEXT_M = 'TIME_4'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'QUALITY_4'.
WA_FIELDCAT-SELTEXT_M = 'QUALITY_4'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'KPI_5'.
WA_FIELDCAT-SELTEXT_M = 'KPI_5'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'TIME_5'.
WA_FIELDCAT-SELTEXT_M = 'TIME_5'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'QUALITY_5'.
WA_FIELDCAT-SELTEXT_M = 'QUALITY_5'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = KPI_DETAILS.
ENDCASE.
ENDMODULE. " USER_COMMAND_0125 INPUT
Output:
manager navigation page