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

REPORT ZP37.

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 = 21.
v_y = 39.
perform sub2 using v_x v_y.

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.

You might also like