Switch statement in ABAP ( 7.4+)

                First Refer * - Introduction to case and switch


 Report

    REPORT zab_rp_switch.

    PARAMETERSp_day TYPE i.

    DATA(lv_outputSWITCH char40( p_day WHEN 1 THEN TEXT-000
                                       WHEN 2 THEN TEXT-001
                                       WHEN 3 THEN TEXT-002
                                       WHEN 4 THEN TEXT-003
                                       WHEN 5 THEN TEXT-004
                                       WHEN 6 THEN TEXT-005
                                       WHEN 7 THEN TEXT-006  

                                       ELSE  TEXT-007 ).   

    WRITElv_output.

Input1


Output1


Input2


Output2



*****************************Thank You*******************

Comments

Popular posts from this blog

Pf status and user command in factory method - OOPS ALV in ABAP

fetch the data from table and send an email in ABAP

Enhancements in abap