WHEN 'PROJECT_STATUS'.
SELECT * FROM ZPROJECT_DETAILS INTO TABLE PROJECT_DETAILS.
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.
ENDCASE.
ENDMODULE. " USER_COMMAND_0145 INPUT
Output:
SELECT * FROM ZPROJECT_DETAILS INTO TABLE PROJECT_DETAILS.
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.
ENDCASE.
ENDMODULE. " USER_COMMAND_0145 INPUT
Output:
view project records of employee
No comments:
Post a Comment