Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Write statement

Former Member
0 Likes
564

hi,

when i write below statment i get error

WRITE : ( s_amt7 * 20 ) / 100.

can we do arithmetic function like above in write stament ?

4 REPLIES 4
Read only

Former Member
0 Likes
539

Santhosh,

Declare one variable and then perform the arthemetic calculation using that variable and then write that variable.

Data: Var1

Var1 = ( s_amt7 * 20 ) / 100.

WRITE : var1.

Regards..

Read only

Former Member
0 Likes
539

Hi

we cannot use arithmetic statements in write statement

declare a variable and call that in write statement.

a = ( s_amt7 * 20 ) / 100.

write 😕 a.

Read only

Former Member
0 Likes
539

Hi,

Do your calculations first, keep the result in a variable, then try to display the value or variable.

lv_cal = ( s_amt7 * 20 ) / 100.

WRITE : lv_cal.

Rgds,

Bujji

Read only

Former Member
0 Likes
539

Hi

try this way,u can get the output.

data: s_amt7 type i value 1000.

data: var1 type i, var2 type i.

var1 = s_amt7 * 20.

var2 = var1 / 100.

write var2.

Thanks,

chandu.