first we define all the data types required in the program work spaces and internal tables and data dictionary tables used in the program.
there are temporary data items to hold the data for certain time and then their spaces are cleared. they are also declared in the beginning.*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
*& Report ZPROJECT_EAS
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZPROJECT_EAS.
*&---------------------------------------------------------------------*
*&* DATA DECLARATION FOR SCREEN ELEMENTS
*&
*&---------------------------------------------------------------------*
DATA:
USER_ID TYPE I,
PASSWORD(10) TYPE C,
PROJECT_NAME(35) TYPE C,
PROJECT_DESCRIPTION(50) TYPE C,
PROJECT_STATUS(15) TYPE C,
PROJECT_START_DATE TYPE date,
PROJECT_END_DATE TYPE date,
COMPLETE(1) TYPE C ,
UNDER_PROCESS(1) TYPE C ,
NOT_STARTED(1) TYPE C,
DEPT_NAME TYPE ZPROJECT_EMP-DEPT_NAME,
EMP_ID TYPE ZPROJECT_EMP-EMP_ID,
EMP_NAME TYPE ZPROJECT_EMP-EMP_NAME,
DEPT_NO TYPE ZPROJECT_EMP-DEPT_NO,
JOINING_DATE TYPE ZPROJECT_EMP-JOINING_DATE,
PASSCODE TYPE ZPROJECT_EMP-PASSCODE,
EMP_PHONE TYPE ZPROJECT_EMP-EMP_PHONE,
ADDRESS TYPE ZPROJECT_EMP-ADDRESS,
KPI_1 TYPE ZPROJECT_KPI-KPI_1,
KPI_2 TYPE ZPROJECT_KPI-KPI_2,
KPI_3 TYPE ZPROJECT_KPI-KPI_3,
KPI_4 TYPE ZPROJECT_KPI-KPI_4,
KPI_5 TYPE ZPROJECT_KPI-KPI_5,
TIME_1 TYPE ZPROJECT_KPI-TIME_1,
TIME_2 TYPE ZPROJECT_KPI-TIME_2,
TIME_3 TYPE ZPROJECT_KPI-TIME_3,
TIME_4 TYPE ZPROJECT_KPI-TIME_4,
TIME_5 TYPE ZPROJECT_KPI-TIME_5,
QUALITY_1 TYPE ZPROJECT_KPI-QUALITY_1,
QUALITY_2 TYPE ZPROJECT_KPI-QUALITY_2,
QUALITY_3 TYPE ZPROJECT_KPI-QUALITY_3,
QUALITY_4 TYPE ZPROJECT_KPI-QUALITY_4,
QUALITY_5 TYPE ZPROJECT_KPI-QUALITY_5,
MARKS_T1 TYPE ZPROJECT_MARKS-MARKS_T1,
MARKS_T2 TYPE ZPROJECT_MARKS-MARKS_T2,
MARKS_T3 TYPE ZPROJECT_MARKS-MARKS_T3,
MARKS_T4 TYPE ZPROJECT_MARKS-MARKS_T4,
MARKS_T5 TYPE ZPROJECT_MARKS-MARKS_T5,
MARKS_Q1 TYPE ZPROJECT_MARKS-MARKS_Q1,
MARKS_Q2 TYPE ZPROJECT_MARKS-MARKS_Q2,
MARKS_Q3 TYPE ZPROJECT_MARKS-MARKS_Q3,
MARKS_Q4 TYPE ZPROJECT_MARKS-MARKS_Q4,
MARKS_Q5 TYPE ZPROJECT_MARKS-MARKS_Q5,
MARK TYPE ZPROJECT_KPI-MARK,
MAXIMUM_MARKS_TIME TYPE ZPROJECT_RECORD-MAXIMUM_MARKS_TIME,
MAXIMUM_MARKS_QUALITY TYPE ZPROJECT_RECORD-MAXIMUM_MARKS_QUALITY,
MARKS_OBTAINED_TIME TYPE ZPROJECT_RECORD-MARKS_OBTAINED_TIME,
MARKS_OBTAINED_QUALITY TYPE ZPROJECT_RECORD-MARKS_OBTAINED_QUALITY,
TOTAL_MAXIMUM_MARKS TYPE ZPROJECT_RECORD-TOTAL_MAXIMUM_MARKS,
TOTAL_OBTAINED_MARKS TYPE ZPROJECT_RECORD-TOTAL_OBTAINED_MARKS,
PERFORMANCE TYPE ZPROJECT_RECORD-PERFORMANCE,
total TYPE i,
R1 , R2 , R3 , R4 , R5 , R6 , R7 , R8 ,R9 ,R10 TYPE C,
CHK1 , CHK2 , CHK3 , CHK4 , CHK5 , CHK6 , CHK7 , CHK8 , CHK9 ,CHK10 TYPE C,
fname TYPE rs38l_fnam.
*&---------------------------------------------------------------------*
*&* DATA DECLARATION FOR TEMPORARY ITEMS
*&
*&---------------------------------------------------------------------*
DATA: TEMP_PASS(10) TYPE C,
TEMP_ID TYPE I,
TEMP_P_STAT(15) TYPE C,
TEMP_P_NAME(35) TYPE C ,
TEMP_MGR_DEPT(15) TYPE C,
TEMP_EMP_ID TYPE I,
TEMP_DEPT(15) TYPE C.
*&---------------------------------------------------------------------*
*&* DATA DECLARATION FOR WORKSPACE ITEMS
*&
*&---------------------------------------------------------------------*
DATA: TEMP_DETAILS TYPE ZPROJECT_DETAILS,
TEMP_KPI TYPE ZPROJECT_KPI ,
TEMP_EMP TYPE ZPROJECT_EMP,
TEMP_MARKS TYPE ZPROJECT_MARKS,
TEMP_RECORD TYPE ZPROJECT_RECORD,
TEMP_RESULT TYPE ZPROJECT_RESULT.
*&---------------------------------------------------------------------*
*&* DATA DECLARATION FOR INTERNAL TABLES & ALV GRID
*&
*&---------------------------------------------------------------------*
DATA : EMP_DETAILS TYPE TABLE OF ZPROJECT_EMP,
PROJECT_DETAILS TYPE TABLE OF ZPROJECT_DETAILS,
KPI_DETAILS TYPE TABLE OF ZPROJECT_KPI,
MARKS_DETAILS TYPE TABLE OF ZPROJECT_MARKS.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA : OK_CODE LIKE SY-UCOMM.
*&---------------------------------------------------------------------*
*&* TYPE POOLS DECLARATION
*&
*&---------------------------------------------------------------------*
TYPE-POOLS : SLIS.
*&---------------------------------------------------------------------*
*&* TABLES DECLARATION
*&
*&---------------------------------------------------------------------*
TABLES sscrfields.
TABLES : ZPROJECT_EMP , ZPROJECT_MGR , ZPROJECT_RO , ZPROJECT_AO , ZPROJECT_RESULT ,
ZPROJECT_DETAILS , ZPROJECT_KPI , ZPROJECT_MARKS , ZPROJECT_RECORD .