Programs using message class:
PARAMETERS: username TYPE char10.
PARAMETERS: password TYPE char10.
IF
*&---------------------------------------------------------------------*
*& Report Z92PROGRAM4
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z92PROGRAM4.
*& Report Z92PROGRAM4
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z92PROGRAM4.
PARAMETERS: username TYPE char10.
PARAMETERS: password TYPE char10.
IF
USERNAME = 'SAPHUB' AND PASSWORD NE 'KHUSHI'.
CLEAR USERNAME. CLEAR PASSWORD.
CLEAR USERNAME. CLEAR PASSWORD.
MESSAGE 'INCORRECT PASSWORD, PLZ ENTER CORRECT PASSWORD' TYPE 'I'.
ELSEIF
USERNAME NE 'SAPHUB' AND PASSWORD = 'KHUSHI'.
CLEAR USERNAME. CLEAR PASSWORD.
ELSEIF
USERNAME NE 'SAPHUB' AND PASSWORD = 'KHUSHI'.
CLEAR USERNAME. CLEAR PASSWORD.
MESSAGE 'INCORRECT USERNAME, PLZ ENTER CORRECT USERNAME' TYPE 'I'.
ELSEIF
USERNAME NE 'SAPHUD' AND PASSWORD NE 'KHUSHI'.
CLEAR USERNAME. CLEAR PASSWORD.
ELSEIF
USERNAME NE 'SAPHUD' AND PASSWORD NE 'KHUSHI'.
CLEAR USERNAME. CLEAR PASSWORD.
MESSAGE 'INCORRECT USERNAME AND PASSWORD , PLZ ENTER CORRECT USERNAME AND PASSWORD' TYPE 'I'.
ELSE.
MESSAGE 'YOU MAY PROCEED' TYPE 'I'.
WRITE : / 'USERNAME :' , USERNAME,
/ 'PASSWORD:' , PASSWORD.
ENDIF.
/ 'PASSWORD:' , PASSWORD.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'PASSWORD'.
screen-invisible = 01.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF screen-name = 'PASSWORD'.
screen-invisible = 01.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
No comments:
Post a Comment