You are on page 1of 1

REPORT ZP39.

data : v_x type i value 10,


v_y type i value 20.
write : / 'Hello'.
perform sub1.
write : / 'welcome'.
PERFORM sub1.
write : / 'Hi'.
PERFORM sub1.
write : / 'Welcome'.
PERFORM sub1.
write : / 'Bye'.
Uline.
perform sub2 using v_x v_y. "actual parameter
perform sub2 using 45 75. " variable also pass
clear : v_x, v_y.
v_x = 41.
v_y = 39.
perform sub2 using v_x v_y.
data : v_r1 type i,
v_r2 type i.
perform sub3 using v_x v_y CHANGING v_r1 v_r2.
write : / 'Sum is',v_r1 LEFT-JUSTIFIED.
write : / 'Difference is',v_r2 LEFT-JUSTIFIED.
clear : v_x,v_y.

v_x = 40.
v_y = 30.
write :/ 'Pass by refernce....'.
write :/'Before calling subroutine v_x and v_y value are ',v_x,v_y.
perform sub4 using v_x v_y.
write :/'After calling subroutine v_x and v_y value are ',v_x,v_y.

form sub1.
write : / 'Core Abap'.
write : / 'Oops Abap'.
write : / 'Cross Abap'.
ENDFORM.

You might also like