*&---------------------------------------------------------------------* *& Report ZLR_LIB_BASIC_04_CONDITIONS *& *&---------------------------------------------------------------------* *& Description: *& Control Program Flow Logic *& *& Technical description: *& *& More Information: *& *&---------------------------------------------------------------------* *& Change log: *& Date Author Action *& xxx-xx-xx ABAP_ACADEMY Created *& *&---------------------------------------------------------------------* REPORT zlr_lib_basic_04_conditions. *----------------------------------* " DECLARATIONS CONSTANTS: BEGIN OF gc_work_day_event, morning TYPE syuzeit VALUE '060000', day TYPE syuzeit VALUE '090000', afternoon TYPE syuzeit VALUE '120000', evening TYPE syuzeit VALUE '180000', END OF gc_work_day_event. DATA: gv_month_number TYPE i. *----------------------------------* " MAIN LOGIC *-----------------------------* " IF - ELSEIF - ELSE statement FORMAT COLOR = col_heading. WRITE: / 'IF - ELSEIF - ELSE statement'. SKIP. FORMAT COLOR = col_background. WRITE: / 'Current Time: ', sy-uzeit. " Say hello to user " Say: "Have a good morning USERNAME", when it is morning " Say: "Hey, have a good day USERNAME", when it is day time " Say: "Have a good night. Do not work too much ;)", when it is already evening or night SKIP. ULINE. **-----------------------------* " CASE statement FORMAT COLOR = col_heading. WRITE: / 'CASE statement'. SKIP. FORMAT COLOR = col_background. " Output the name of current month WRITE: / 'Current month is: '.