08-05-2008 1:21 PM
hi gurus,
data: j type i,
n type i.
j = 10.
n = 20.
write j * n.
in above program can we write like that but anm getting error:unable to interpret *
08-05-2008 1:24 PM
08-05-2008 1:30 PM
thanks but i know that,
am asking can we write like this
write j * n.
in abap or not
08-05-2008 1:32 PM
Ali,
am asking can we write like this
write j * n.
in abap or not
Answer is not.
08-05-2008 1:49 PM
Why don't you try it and see, rather than clogging up the forums with trivial questions.
08-05-2008 2:25 PM
08-05-2008 1:25 PM
Hi,
The code which was wrote by you is syntactically wrong. If you want to multiply declare another variable and assign the multiplication value to that variable.
data: j type i,
n type i,
m type i.
j = 10.
n = 20.
m = j * n.
write m.
08-05-2008 1:25 PM
hi,
in ABAP you can't assign runtime vlue to write statement like this. Try this
data: j type i,
n type i,
product type i .
j = 10.
n = 20.
product = j * n
write product.
08-05-2008 1:26 PM
data: j type i,
n type i,
result type i.
j = 10.
n = 20.
result = j * n.
write:result.
08-05-2008 1:26 PM
Hi,
try this code-
data: j type i,
n type i,
result type i.
j = 10.
n = 20.
Result = j * n.
write result.
08-05-2008 1:32 PM
Hi Ali,
No, you cannot write in that way.
Try the following:
data: j type i,
n type i,
w_mul type i .
j = 10.
n = 20.
w_mul = j * n
write w_mul.
Regards,
Chandra Sekhar
08-05-2008 1:33 PM
Hi,
Declare another variable and store the result and use that variable to display the result in the list.
Thanks,
Sriram POnna.
08-05-2008 1:36 PM
hi,
its not possible in abap...
as u know we have to assign it to some variable and display that variable.
Rgds.,
subash