Lessons Blog References Contact AJonP Logo Purr-fect Lessons Blog References Contact Subscribe ON THIS PAGE ABAP - Types and Subroutines

How to manage ABAP types. Learn how to create subroutines.

Show Source


Predefined ABAP Types


Examples of Subroutines

Example Report with Subroutines


DATA: num1 TYPE i, num2 TYPE i, sum TYPE i.

num1 = 2. num2 = 4. PERFORM addit USING num1 num2 CHANGING sum. num1 = 7. num2 = 11. PERFORM addit USING num1 num2 CHANGING sum. FORM addit. USING add_sum1 TYPE any add_num2 TYPE any CHANGING TYPE any.

add_sum = add_num1 add_num2. PERFORM out USING add_num1 add_num2 add_sum. ENDFORM. FORM out.

USING out_num1 TYPE any out_num2 TYPE any out_sum TYPE any. WRITE: / ‘Sum of ‘, out_num1, ‘ and ‘, out_sum2, ‘ is ‘, out_sum.


Published by using 101 words.