‎2009 Mar 31 7:48 AM
hi gurus.........
the following arithmetic expression gets me error...pls help me ....
*wa_bseg-dmbtr = ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr.*
ERROR is: incomplete arithmetic expression
Thank you
‎2009 Mar 31 7:51 AM
HI,
Try this
wa_bseg-dmbtr = ( ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr.
‎2009 Mar 31 7:50 AM
‎2009 Mar 31 7:50 AM
Write like this
wa_bseg-dmbtr = ( ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr
‎2009 Mar 31 7:51 AM
HI,
Try this
wa_bseg-dmbtr = ( ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr.
‎2009 Mar 31 7:56 AM
hi all ....i tried the way ...but STIL THE SAME ERROR
treid all combinations below
( ( wa_konv-kwert * 11.33 ) / 100 ) - ( wa_bseg-dmbtr )
( ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr
( ( wa_konv-kwert * ( 11.33 ) / 100 ) ) - ( wa_bseg-dmbtr )
( ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr
ERROR
Incomplete arithmetic expression: ")" missing at end of statement.
Statement "33" is not defined. Check your spelling.
‎2009 Mar 31 8:00 AM
‎2009 Mar 31 8:02 AM
Hi
write it this way
( wa_konv-kwert * '11.33' / 100 ) - wa_bseg-dmbtr.
This works and its tested....
Regards,
Siddarth
‎2009 Mar 31 8:04 AM
Hi,
Try this way,
wa_bseg-dmbtr = ( ( wa_konv-kwert * 1133 ) / 10000 ) - ( wa_bseg-dmbtr ).You cant provide numbers with decimal places.
Regards,
Shailaja
‎2009 Mar 31 8:06 AM
‎2009 Mar 31 8:07 AM
Hi Shailaja ,
Who said that numbers cant be provided with decimals, just try giving the number with decimals in single quotes and then tell if it works or not
Regards,
Siddarth
‎2009 Mar 31 8:07 AM
hi,
Just declare a variable of packed decimal type containing the value '11.33'. And then use the variable in the arithmetic expression instead of putting the value directly into the expression.Please ensure that the number of opening brackets matches the number of closing brackets.
Hope this solves your problem.
thanks,
Abhijit
‎2009 Mar 31 8:10 AM
Hi Siddarth,
Numbers with decimals can be provided as variables. But what I meant was, we cant give the numbers with decimals as it is because the system takes the decimal point as period. So the part after the decimal point.... it takes as a next line.
Regards,
Shailaja
‎2009 Mar 31 7:51 AM
hi:
Do like this
data lv_dmbtr type bseg-dmbtr.
lv_dmbtr = *wa_bseg-dmbtr
lv_dmbtr = ( ( wa_konv-kwert * 11.33 ) / 100 ) - lv_dmbtr.
Regards
Shashi
‎2009 Mar 31 7:54 AM
I think U missed one '('
try this
wa_bseg-dmbtr = ( ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr
‎2009 Mar 31 7:55 AM
hi,
*wa_bseg-dmbtr = ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr.*
change it to
data : lv_data type p decimals 2 value '11.33'.
wa_bseg-dmbtr = ( ( ( wa_konv-kwert * lv_data ) / 100 ) - wa_bseg-dmbtr ).
just copy and paste then check for syntax check.
Rgds.,
subash
‎2009 Mar 31 8:09 AM
Your given problem is:
wa_bseg-dmbtr = ( wa_konv-kwert * 11.33 ) / 100 ) - wa_bseg-dmbtr.*
First problem in your expression is: 1 bracket is missing here.
Second problem in your expression is: you need to declare 11.33 as packed decimal.
Do the following declaration.
data : v_val type p decimals 2 value '11.33'.
and use v_val in your expression.The expression will sure work.
Best regards.
P.N. : I just tried in sap editor and found error until and unless i declared 11.33 as packed decimal.So declare it as a packed decimal and use it in your expression as a variable. It'll work.