Application Development 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: 

simple Query

Former Member
0 Kudos

Hi all

I had a requirement to subtract two Number/Units

Example v_test type anzhl ,

v_test1 type anzhl .

v_test2 type anzhl .

i want to subtract v_test from v_test1 is there any function module is there or we can directly subtract it

like v_test2 = v_test-v_test1 .

will this work

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

u can directly subtract them

thanks

6 REPLIES 6

Former Member
0 Kudos

hi,

u can directly subtract them

thanks

Former Member
0 Kudos

As anzhl is of type DEC.....u can directly subtract two fields.....

Regards

Vasu

Former Member
0 Kudos

Hi Hitesh,

Ur code will work if the type is numeric-type.

Otherwise u can use subtract statement.

Regards,

LIJO

former_member196517
Contributor
0 Kudos

hi Hitesh ,

just put space there while subtracting after v_test in second line..

Data:

v_test type anzhl ,

v_test1 type anzhl ,

v_test2 type anzhl .

v_test = '2.20' .

v_test1 = '1.20' .

v_test2 = v_test - v_test1 .

write v_test2 .

0 Kudos

i mean second last line

Former Member
0 Kudos

Hi,

this v_test2 = v_test - v_test1 .

will works.