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

simple Query

Former Member
0 Likes
633

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
Read only

Former Member
0 Likes
612

hi,

u can directly subtract them

thanks

6 REPLIES 6
Read only

Former Member
0 Likes
613

hi,

u can directly subtract them

thanks

Read only

Former Member
0 Likes
612

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

Regards

Vasu

Read only

Former Member
0 Likes
612

Hi Hitesh,

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

Otherwise u can use subtract statement.

Regards,

LIJO

Read only

former_member196517
Contributor
0 Likes
612

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 .

Read only

0 Likes
612

i mean second last line

Read only

Former Member
0 Likes
612

Hi,

this v_test2 = v_test - v_test1 .

will works.