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

performing calculation in write statement

Former Member
0 Likes
1,066

hi,

I am making a report in which i have to calculate the percentage value . i want to do the calculation in the write statement . is it possible?

plzz do provide me the examples for it as help will be definately rewarded.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
751

Hi I hardly understodd what you meant.. in write statement... write is a command that just prints data on the screen..

all you can do is..


a = 3.
b = 5.

c = a + b.

write:/ c .

Output.
8.

I am guessing you want to calculate c in the write statement rather than above write statement.. its not possible.

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
752

Hi I hardly understodd what you meant.. in write statement... write is a command that just prints data on the screen..

all you can do is..


a = 3.
b = 5.

c = a + b.

write:/ c .

Output.
8.

I am guessing you want to calculate c in the write statement rather than above write statement.. its not possible.

Read only

Former Member
0 Likes
751

Hi Ricx,

WRITE statement is only to output the data.

Do the calculation and store in the variable and display same in the output.

You can do this way...

WRITE: lw_vbap-VBELN,
        lw_vbap-POSNR.

lw_sum = lw-vbap-ZMENG + lw_vbap-FMENG.

WRITE: lw_sum,
lw_vbap-ZIEME,
lw_vbap-MEINS.

.

Best regards,

raam

Read only

0 Likes
751

Hi,

write statement is only for print the data in output.

if you want to do som calculations have to do before write statement and finally write the final variable .

regards.

sriram.

Read only

0 Likes
751

hi,

ok thanks to all of you . i am rewarding points to all of you.