Performance issues in select from table HRV1222A
We have a custom FM with this select in the code:
SELECT otype objid
INTO TABLE lt_hrv1222a
WHERE plvar EQ '01'
AND begda LE sy-datum
AND endda GE sy-datum
AND istat EQ '1'
AND attrib EQ lv_attrib
AND low EQ lv_value.
We use this FM a lot of times and we're having a lot of performance problems due this select.
Do you know how can I improve this code?
Is there any FM to get the data we want without doing a select to this table? Actually it is a view of two tables.
May be we need to create secondary indexes to the tables of the view...
Thanks in advance,