01-27-2007 8:00 AM
I WOULD LIKE TO KNOW IF THIS IS CORRECT
IF EQUI-ANSDT BETWEEN 'O1.O4.1992' AND '31.03.1993'.
AMT = ( AMT1 * 8.24 ) / 100 .
AMT2 = AMT1 - AMT.
CLEAR AMT.
IT GIVES ME THE ERROR :
INCOMPLETE ARTHIMETIC EXPRESSION.: ")" MISSING AT END OF STMT.
PLS HELP,
CAPC
01-27-2007 10:08 AM
hi,
chk this.
data : f_val type f value '8.24'.
AMT = ( AMT1 * f_val ) / 100 .
AMT2 = AMT1 - AMT.
CLEAR AMT.
this will work
Rgds
Anver
01-27-2007 8:03 AM
IF EQUI-ANSDT ge '19920401' or EQUI-ANSDT le '19930331'.
AMT = ( AMT1 * 8.24 ) / 100 .
AMT2 = AMT1 - AMT.
CLEAR AMT.
endif.
if EQUI-ANSDT is a date field.
regards
shiba dutta
01-27-2007 8:16 AM
hi,
try this.
IF ( EQUI-ANSDT GE '19920401' AND EQUI-ANSDT LE '19930331' ).
AMT = ( AMT1 * 8.24 ) / 100 .
AMT2 = AMT1 - AMT.
CLEAR AMT.
Rgds
Anver
01-27-2007 8:42 AM
sorry anver is right in if condition instead of or it will be and please change that.
regards
shiba dutta
01-27-2007 9:38 AM
Date format is different in different systems according to the user profile settings.
So , please make the below. It will work in any system.
Date : lv_date1 like equi-ansdt,
lv_date2 like equi-ansdt.
Move the dates :
lv_date1 = s_ansdt-low.
lv_date2 = s_ansdt-high.
If ( equi-ansdt >= lv_date1 ) and ( equi-ansdt <= lv_date2 ).
amt = ( amt * 8.24 ) / 100.
amt2 = amt1 - amt.
clear amt.
endif.
The above thing will work out.
Reward Points if helpful and close the thread.
Kannu.
01-27-2007 9:56 AM
Hi kannu,
my problem is not with the if condition,
but the
amt = ( amt * 8.24 ) / 100 stmt.....
i gave amt as type i.
is it oK, pls help
capc
01-27-2007 10:22 AM
Hi
amt = ( amt * 8.24 ) / 100
It depends on how you need to have the result, if you use an integer the result will be rounded off :
DATA: AMT TYPE I VALUE 200.
AMT = ( AMT * '8.24' ) / 100.
* ---> 200 * 8.24 / 100 = 16.48 =======> AMT = 16
DATA: AMT TYPE I VALUE 300.
AMT = ( AMT * '8.24' ) / 100.
* ---> 300 * 8.24 / 100 = 24.72 =======> AMT = 25
Max
01-27-2007 9:57 AM
01-27-2007 10:08 AM
hi,
chk this.
data : f_val type f value '8.24'.
AMT = ( AMT1 * f_val ) / 100 .
AMT2 = AMT1 - AMT.
CLEAR AMT.
this will work
Rgds
Anver
01-27-2007 10:35 AM
01-27-2007 10:47 AM
Hi CAPC,
I believe you have to give a space after )
Best Regards
Renjan