SAP ABAP Program to find the largest number among three given numbers

 Program: 


REPORT ZSM_LARGEST_NUM.

DATAnum1 TYPE i,
      num2 TYPE i,
      num3 TYPE i,
      largest TYPE i.

PARAMETERSp_num1 TYPE i,
            p_num2 TYPE i,
            p_num3 TYPE i.

START-OF-SELECTION.

  num1 p_num1.
  num2 p_num2.
  num3 p_num3.

  IF num1 >= num2 AND num1 >= num3.
    largest num1.
  ELSEIF num2 >= num1 AND num2 >= num3.
    largest num2.
  ELSE.
    largest num3.
  ENDIF.

  WRITE'The largest number is:'largest.


OUTPUT: 


                










Post a Comment

0 Comments