ZP38

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

REPORT ZP38.

data : v_x type i value 0,


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 vr_2.
write : / 'Sum is',v_r1 LEFT-JUSTIFIED.
write : / 'Difference is',v_r2 LEFT-JUSTIFIED.

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

*form sub2. " sysntax error


*form sub2 using v_x v_y. "formal parameter (or)
form sub2 using k1 k2.
data lv_z type i. "local variable
lv_z = k1 + k2.
write : / 'sum is ',lv_z LEFT-JUSTIFIED.
endform.

form sub3 using k1 k2 CHANGING m1 m2.


m1 = k1 + k2.
m2 = k1 - k2.
ENDFORM.

You might also like