*&---------------------------------------------------------------------*
*& Module STATUS_0116 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0116 OUTPUT.
SET PF-STATUS '116'.
SET TITLEBAR '116'.
SELECT SINGLE EMP_ID EMP_NAME DEPT_NAME FROM ZPROJECT_EMP
INTO (ZPROJECT_EMP-EMP_ID , ZPROJECT_EMP-EMP_NAME , ZPROJECT_EMP-DEPT_NAME )
WHERE EMP_ID = USER_ID.
ENDMODULE. " STATUS_0116 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0116 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0116 INPUT.
CASE SY-UCOMM.
WHEN 'RESET'.
CLEAR : PROJECT_NAME , PROJECT_DESCRIPTION.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
CALL SCREEN 115.
WHEN 'SUBMIT'.
TEMP_ID = USER_ID.
TEMP_P_NAME = PROJECT_NAME.
TEMP_P_STAT = PROJECT_STATUS.
TEMP_DETAILS-EMP_ID = USER_ID.
TEMP_DETAILS-EMP_NAME = ZPROJECT_EMP-EMP_NAME.
TEMP_DETAILS-DEPT_NAME = ZPROJECT_EMP-DEPT_NAME.
TEMP_DETAILS-PROJECT_NAME = PROJECT_NAME.
TEMP_DETAILS-PROJECT_DESCRIPTION = PROJECT_DESCRIPTION.
TEMP_DETAILS-PROJECT_START_DATE = PROJECT_START_DATE.
TEMP_DETAILS-PROJECT_END_DATE = PROJECT_END_DATE.
IF COMPLETE = 'X'.
PROJECT_STATUS = 'COMPLETE'.
TEMP_DETAILS-PROJECT_STATUS = PROJECT_STATUS.
ELSEIF UNDER_PROCESS = 'X'.
PROJECT_STATUS = 'UNDER PROCESS'.
TEMP_DETAILS-PROJECT_STATUS = PROJECT_STATUS.
ELSEIF NOT_STARTED = 'X'.
PROJECT_STATUS = 'NOT STARTED'.
TEMP_DETAILS-PROJECT_STATUS = PROJECT_STATUS.
ENDIF.
MODIFY ZPROJECT_DETAILS FROM TEMP_DETAILS.
MESSAGE i005(zmsg_eas).
CLEAR : PROJECT_NAME , PROJECT_DESCRIPTION, PROJECT_START_DATE, PROJECT_START_DATE ,
PROJECT_END_DATE, PROJECT_STATUS.
call SCREEN 115.
IF USER_ID EQ TEMP_ID AND PROJECT_NAME EQ TEMP_P_NAME
AND NOT PROJECT_STATUS EQ TEMP_P_STAT.
MODIFY ZPROJECT_DETAILS FROM TEMP_DETAILS.
ENDIF.
MESSAGE i005(zmsg_eas).
CLEAR : PROJECT_NAME , PROJECT_DESCRIPTION, PROJECT_START_DATE, PROJECT_START_DATE ,
PROJECT_END_DATE , PROJECT_STATUS.
CALL SCREEN 115.
ENDCASE.
ENDMODULE. " USER_COMMAND_0116 INPUT
Output:
*& Module STATUS_0116 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0116 OUTPUT.
SET PF-STATUS '116'.
SET TITLEBAR '116'.
SELECT SINGLE EMP_ID EMP_NAME DEPT_NAME FROM ZPROJECT_EMP
INTO (ZPROJECT_EMP-EMP_ID , ZPROJECT_EMP-EMP_NAME , ZPROJECT_EMP-DEPT_NAME )
WHERE EMP_ID = USER_ID.
ENDMODULE. " STATUS_0116 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0116 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0116 INPUT.
CASE SY-UCOMM.
WHEN 'RESET'.
CLEAR : PROJECT_NAME , PROJECT_DESCRIPTION.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CALL SCREEN 1000.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
CALL SCREEN 115.
WHEN 'SUBMIT'.
TEMP_ID = USER_ID.
TEMP_P_NAME = PROJECT_NAME.
TEMP_P_STAT = PROJECT_STATUS.
TEMP_DETAILS-EMP_ID = USER_ID.
TEMP_DETAILS-EMP_NAME = ZPROJECT_EMP-EMP_NAME.
TEMP_DETAILS-DEPT_NAME = ZPROJECT_EMP-DEPT_NAME.
TEMP_DETAILS-PROJECT_NAME = PROJECT_NAME.
TEMP_DETAILS-PROJECT_DESCRIPTION = PROJECT_DESCRIPTION.
TEMP_DETAILS-PROJECT_START_DATE = PROJECT_START_DATE.
TEMP_DETAILS-PROJECT_END_DATE = PROJECT_END_DATE.
IF COMPLETE = 'X'.
PROJECT_STATUS = 'COMPLETE'.
TEMP_DETAILS-PROJECT_STATUS = PROJECT_STATUS.
ELSEIF UNDER_PROCESS = 'X'.
PROJECT_STATUS = 'UNDER PROCESS'.
TEMP_DETAILS-PROJECT_STATUS = PROJECT_STATUS.
ELSEIF NOT_STARTED = 'X'.
PROJECT_STATUS = 'NOT STARTED'.
TEMP_DETAILS-PROJECT_STATUS = PROJECT_STATUS.
ENDIF.
MODIFY ZPROJECT_DETAILS FROM TEMP_DETAILS.
MESSAGE i005(zmsg_eas).
CLEAR : PROJECT_NAME , PROJECT_DESCRIPTION, PROJECT_START_DATE, PROJECT_START_DATE ,
PROJECT_END_DATE, PROJECT_STATUS.
call SCREEN 115.
IF USER_ID EQ TEMP_ID AND PROJECT_NAME EQ TEMP_P_NAME
AND NOT PROJECT_STATUS EQ TEMP_P_STAT.
MODIFY ZPROJECT_DETAILS FROM TEMP_DETAILS.
ENDIF.
MESSAGE i005(zmsg_eas).
CLEAR : PROJECT_NAME , PROJECT_DESCRIPTION, PROJECT_START_DATE, PROJECT_START_DATE ,
PROJECT_END_DATE , PROJECT_STATUS.
CALL SCREEN 115.
ENDCASE.
ENDMODULE. " USER_COMMAND_0116 INPUT
Output:
entry for project details of employee
the data is entered by the employee as shown:
values of project entered
when submitted a successfully submitted message is displayed and the data is stored in the DDIC table ZPROJECT_DETAILS.
data submitted successfully
No comments:
Post a Comment