Tuesday 10 September 2013

SEPTEMBER 10

The first task is to create a main page where the individual role can log-in into the system.
I created here four push buttons  naming employee , manager , reviewing officer and accepting officer. with click on each button, the respective role can log-in into the system. Here , the size of buttons and the starting co-ordinates of each button is provided so that buttons appear in a proper way on the screen.
Fifth button is 'exit' button. By clicking exit, I leave the screen area and enter into the coding part.
At the main screen, now I want that when employee clicks the 'EMPLOYEE' button, the log-in page should be displayed where only an employee can log-in but not any other role. same validation is to be applied on all the roles.For that  I have created 4 log-in screens naming 110, 120 , 130 , 140.

The final code structure is as below:

*&---------------------------------------------------------------------*
*& Report  ZPROJECT_EAS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZPROJECT_EAS.

*--------------------------------------------------------------*
*Selection-Screen
*--------------------------------------------------------------*
SELECTION-SCREEN:
  BEGIN OF LINE,
      PUSHBUTTON 5(10) button1 USER-COMMAND but1,
PUSHBUTTON 35(10) button2 USER-COMMAND but2,
    END OF LINE,
    SKIP 2,
       begin of line,
PUSHBUTTON 5(18) button3 USER-COMMAND but3,
PUSHBUTTON 35(18) button4 USER-COMMAND but4,
      END OF LINE,
      SKIP 2,
    BEGIN OF LINE,
PUSHBUTTON 22(10) button5 USER-COMMAND but5,
       END OF LINE.

*--------------------------------------------------------------*
*At Selection-Screen
*--------------------------------------------------------------*
AT SELECTION-SCREEN.
  CASE sscrfields.
    WHEN 'BUT1'.
      CALL SCREEN 0110.
    WHEN 'BUT2'.
      CALL SCREEN 0120.
    WHEN 'BUT3'.
      CALL SCREEN 0130.
    WHEN 'BUT4'.
      CALL SCREEN 0140.
    WHEN 'BUT5'.
      LEAVE PROGRAM.
  ENDCASE.
*--------------------------------------------------------------*
*Initialization
*--------------------------------------------------------------*
INITIALIZATION.
  button1 = 'EMPLOYEE'.
  button2 = 'MANAGER'.
  BUTTON3 = 'REVIEWING OFFICER'.
  BUTTON4 = 'ACCEPTING OFFICER'.
  BUTTON5 = 'EXIT'.

. After executing the above part, following screen is displayed.

OUTPUT: