Hello Stefafn,
no you don't need to change the SQL statement. The optimizer is checking only the where condition to find the bnest strategy. the qualification is important finding the best index.
Just to be sure you sent the output of index S022~Z01 which is created correctly, but the index definition you sent of AFRU~z03 does not correspond to the index structure which I recommend.
The screen shot shows a different index structure than recommended:
Shown index structure: MANDT,WERKS,ERSDA,PERNR
recommended index structure PERNR,WERS,ERSDA
Notice even when the shown index shows the same columns the order of the index fields is important.
So please create an addtional index with the following order -> PERNR,WERKS,ERSDA
Please do not remove the other indexes which are existing n the table.
Regards, Christiane