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

Sum Two Fields

Former Member
0 Likes
704

Dear All,

I have internal table call ITCODE

suppose 4 fields are there

ZCODE = Product Id

ZVAL1 = Price 1

ZVAL2 = Price 2

ZTOTAL =

i wanna fill ZTOTAL column from Price 1 + Price 2

but i don't want to loop

can you please help me to solve this matter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
667

hi

use like this.

loop at itcode.

itcode-ztotal = itcode-zval1+itcode-zval2.

endloop.

Thanks

Ashu

5 REPLIES 5
Read only

S0025444845
Active Participant
0 Likes
667

hi,

for that u have to do loop only,

do like.

loop at itcode.

ZTOTAL = itcode-zval1 + itcode-zval2.

clear: itcode

endloop.

regards,

sudha

Read only

Former Member
0 Likes
668

hi

use like this.

loop at itcode.

itcode-ztotal = itcode-zval1+itcode-zval2.

endloop.

Thanks

Ashu

Read only

Former Member
0 Likes
667

Hi Nelson,

I dont think this is possible without looping.

Regs,

Sameer

Read only

Former Member
0 Likes
667

Hi,

U can't do it without Loop.

U can do it as,

ITCODE-ZTOTAL = ITCODE-ZVAL1 + ITCODE-ZVAL2.

Regards,

Padmam.

Read only

S0025444845
Active Participant
0 Likes
667

Hi,

hi,

for that u have to do loop only,

do like.

loop at itcode.

ZTOTAL = itcode-zval1 + itcode-zval2.

modify itcode transporting ztotal.

clear: itcode

endloop.

regards,

sudha