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

Coding an arithmetic formula in ABAP

Former Member
0 Likes
414

hi,

I have coded the below formula in ABAP, but when i try to excute it it gives an error

"Incomplete aritmetic expression. ")" missing at end of statement.

v_diearea = v_length * v_width.

v_gdpw = ( 3.1414 / 4 ) * ( ( v_wafer_size ) ** 2 ) *

( 1 - ( ( SQRT ( 8 * ( v_diearea ) ) ) /

( v_wafer_size ) ) ) / ( v_diearea ).

Please let me know what si wrong in the above expression.

1 ACCEPTED SOLUTION
Read only

manuel_bassani
Contributor
0 Likes
371

Hi ,

it seems not to be a parenthesis problem

1. Use '3.1414' instead of 3.1414

2. Use SQRT( instead of SQRT ( -


> No space between SQRT and parenthesis

The following code should work:

v_diearea = v_length * v_width.

v_gdpw = ( '3.1414' / 4 ) * ( ( v_wafer_size ) ** 2 ) *
( 1 - ( ( SQRT( 8 * ( v_diearea ) ) ) /
( v_wafer_size ) ) ) / ( v_diearea ).

Please remember to reward points for useful answers and to close the post if your problem is solved

Best regards,

Manuel

1 REPLY 1
Read only

manuel_bassani
Contributor
0 Likes
372

Hi ,

it seems not to be a parenthesis problem

1. Use '3.1414' instead of 3.1414

2. Use SQRT( instead of SQRT ( -


> No space between SQRT and parenthesis

The following code should work:

v_diearea = v_length * v_width.

v_gdpw = ( '3.1414' / 4 ) * ( ( v_wafer_size ) ** 2 ) *
( 1 - ( ( SQRT( 8 * ( v_diearea ) ) ) /
( v_wafer_size ) ) ) / ( v_diearea ).

Please remember to reward points for useful answers and to close the post if your problem is solved

Best regards,

Manuel