*&---------------------------------------------------------------------*
*& MODULE STATUS_0128 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0128 OUTPUT.
SET PF-STATUS '128'.
SET TITLEBAR '128'.
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_EMP-EMP_ID , ZPROJECT_EMP-EMP_NAME , ZPROJECT_EMP-DEPT_NAME)
WHERE EMP_ID = USER_ID.
ENDMODULE. " STATUS_0128 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0128 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0128 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CLEAR : START_DATE ,END_DATE.
CALL SCREEN 1000.
WHEN 'BACK'.
CLEAR : START_DATE , END_DATE.
CALL SCREEN 115.
WHEN 'SUBMIT'.
TEMP_YEAR-START_DATE = START_DATE.
TEMP_YEAR-END_DATE = END_DATE.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZPROJECT_EAS'
IMPORTING
FM_NAME = FNAME.
CALL FUNCTION FNAME
EXPORTING
USER_ID = ZPROJECT_EMP-EMP_ID
START_DATE = TEMP_YEAR-START_DATE
END_DATE = TEMP_YEAR-END_DATE.
CLEAR : START_DATE ,END_DATE .
ENDCASE.
ENDMODULE. " USER_COMMAND_0128 INPUT
Output:
*& MODULE STATUS_0128 OUTPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE STATUS_0128 OUTPUT.
SET PF-STATUS '128'.
SET TITLEBAR '128'.
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_EMP-EMP_ID , ZPROJECT_EMP-EMP_NAME , ZPROJECT_EMP-DEPT_NAME)
WHERE EMP_ID = USER_ID.
ENDMODULE. " STATUS_0128 OUTPUT
*&---------------------------------------------------------------------*
*& MODULE USER_COMMAND_0128 INPUT
*&---------------------------------------------------------------------*
* TEXT
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0128 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
CLEAR : USER_ID , PASSWORD.
CLEAR : START_DATE ,END_DATE.
CALL SCREEN 1000.
WHEN 'BACK'.
CLEAR : START_DATE , END_DATE.
CALL SCREEN 115.
WHEN 'SUBMIT'.
TEMP_YEAR-START_DATE = START_DATE.
TEMP_YEAR-END_DATE = END_DATE.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZPROJECT_EAS'
IMPORTING
FM_NAME = FNAME.
CALL FUNCTION FNAME
EXPORTING
USER_ID = ZPROJECT_EMP-EMP_ID
START_DATE = TEMP_YEAR-START_DATE
END_DATE = TEMP_YEAR-END_DATE.
CLEAR : START_DATE ,END_DATE .
ENDCASE.
ENDMODULE. " USER_COMMAND_0128 INPUT
Output:
enter year values to print the result
print preview screen
print format of the complete appraisal form
No comments:
Post a Comment