You are on page 1of 1

Sanjivani SAP Training Programme

Program 01: Perform the simple addition operation

REPORT Z1208PROG1.

data : a type i. " data declaration


data : b type i.
data : c type i.

a = 10. " data or variables initialization


b = 20.
c = a + b. " perform calculations

write : 'sum of two no.s ', c left-justified.”Display result


Statement chaining

data : x type i, y type i, z type i.

x = 20.
y = 20.
z = x + y.

write : / ' sum of two variables', z centered.

uline.

data : x_v type i value 35,


x_y type i value 40.
z = x_v + x_y.

write z.

uline.

data : s type i,
t type c.

write : / s,
t.

s = 33.
t = 'sai' .

write : / s,
t.

data : f(10) type c. " array of characters

f = 'sai' .

write f.
Prepared By: Salkar Sailee R (SAP Co-Incharge, SAP ABAP Trainer, Sanjivani College of Engineering
Kopargaon)

You might also like