TAKE INPUT FIELD IN ABAP

 * There are two types.

        1. SELECT-OPTIONS.

        2. PARAMETERS.

    SELECT-OPTIONS

        * Select-options is the keyword which accepts the single value, multiple single values, single range & multiple ranges.

Syntax of select-options: -

            Select-options <name of the select-options> for <variable name>.

CODE 

    REPORT zajay_practice.
    DATA: A TYPE I.
    SELECT-OPTIONS :S_ID FOR A.
    DATA(L) = S_ID-low.
    DATA(H) = S_ID-high.

    WHILE L LE H.
      WRITE: / L.
      L = L + 1.
    ENDWHILE.

INPUT



OUTPUT


        PARAMETERS
            * It‟s the keyword which accepts the single value at run time.

        Syntax:-
            * Parameter <name of the parameter> type <data type>   
        CODE
        REPORT zajay_practice.
        PARAMETERS A TYPE I.
        DATA : L TYPE I VALUE 1.
        WHILE L LE A.
          WRITE: / L.
          L = L + 1.
        ENDWHILE.
        INPUT



        OUTPUT 





Comments

Popular posts from this blog

Custom entity/Action dialog in RAP using Unmanaged scenario

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).