on 03-30-2011 2:44 PM
Hi,
I wrote the following field routine and i have the following error with the the logical expressions OR / AND:
E:Relational operator "AND" is not supported.
Can anybody help me with this?
DATA v_hsme type i.
DATA v_totalinc type i.
DATA v_hsme type i.
DATA ROWCOUNT type i.
describe table itab lines ROWCOUNT.
read table itab into wa_itab
with key incidencia = SOURCE_FIELDS-NROINCIDENCIA.
clear v_hsme.
clear v_hsba.
clear v_hsmb.
clear v_totalinc.
If wa_itab-criticidad EQ 'Media' OR 'Baja'
AND wa_itab-difhoras NE ''.
v_hsme = 1.
v_totalinc = rowcount.
RESULT = v_hsme / v_totalinc.
endif.
Regards,
Diego
Hi there,
You're using your operations incorrectly.
Use this instead:
DATA v_hsme type i.
DATA v_totalinc type i.
DATA v_hsme type i.
DATA ROWCOUNT type i.
describe table itab lines ROWCOUNT.
read table itab into wa_itab
with key incidencia = SOURCE_FIELDS-NROINCIDENCIA.
clear v_hsme.
clear v_hsba.
clear v_hsmb.
clear v_totalinc.
If ( wa_itab-criticidad EQ 'Media' OR wa_itab-criticidad EQ 'Baja' )
AND wa_itab-difhoras NE ''.
v_hsme = 1.
v_totalinc = rowcount.
RESULT = v_hsme / v_totalinc.
endif.
Hope this helps,
Regards,
Diogo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Change your code part as:
If wa_itab-criticidad EQ 'Media' OR 'Baja'
AND wa_itab-difhoras NE ''.
--->>>
If ( wa_itab-criticidad EQ 'Media' OR wa_itab-criticidad EQ 'Baja' )
AND
( wa_itab-difhoras NE '' ) .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.