*&---------------------------------------------------------------------*
*& MODULE STATUS_0123 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0123 OUTPUT.
SET PF-STATUS '123'.
SET TITLEBAR '123'.
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.
SELECT SINGLE EMP_ID EMP_NAME DEPT_NAME FROM ZPROJECT_EMP
INTO (ZPROJECT_RESULT-EMP_ID , ZPROJECT_RESULT-EMP_NAME , ZPROJECT_RESULT-DEPT_NAME)
WHERE EMP_ID = USER_ID.
CASE SY-UCOMM.
WHEN 'OK'.
SELECT SINGLE BEHAVIOUR_ISSUE_1 BEHAVIOUR_ISSUE_2 BEHAVIOUR_ISSUE_3 BEHAVIOUR_ISSUE_4 BEHAVIOUR_ISSUE_5
REWARD_1 REWARD_2 REWARD_3 REWARD_4 REWARD_5
FROM ZPROJECT_RESULT
INTO (ZPROJECT_RESULT-BEHAVIOUR_ISSUE_1 ,ZPROJECT_RESULT-BEHAVIOUR_ISSUE_2 ,ZPROJECT_RESULT-BEHAVIOUR_ISSUE_3
,ZPROJECT_RESULT-BEHAVIOUR_ISSUE_4 ,ZPROJECT_RESULT-BEHAVIOUR_ISSUE_5 ,ZPROJECT_RESULT-REWARD_1
,ZPROJECT_RESULT-REWARD_2 ,ZPROJECT_RESULT-REWARD_3 ,ZPROJECT_RESULT-REWARD_4 ,ZPROJECT_RESULT-REWARD_5)
WHERE EMP_ID = USER_ID AND START_DATE = START_DATE AND END_DATE = END_DATE.
ENDCASE.
ENDMODULE. " STATUS_0123 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0123 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0123 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK'.
CLEAR : ZPROJECT_RESULT.
CLEAR : START_DATE , END_DATE.
CALL SCREEN 115.
WHEN 'CANCEL'.
CLEAR : START_DATE , END_DATE , ZPROJECT_RESULT.
CLEAR :USER_ID , PASSWORD.
CALL SCREEN 1000.
ENDCASE.
ENDMODULE. " USER_COMMAND_0123 INPUT
Output:
entering mandatory date field to view the reward behavioral modification
when OK button is clicked the following screen appears and the data for the corresponding year selected is displayed:
display of values
No comments:
Post a Comment