03-13-2017 2:40 PM
Hello Team,
I am fetching records from VBAK table and I want to filter those out based on order type.
If the order type is Z*AB than only I want to do some operation like if the order type is Z1AB or Z2AB or Z3AB ..or ZHAB or ZDAB than the loop should be processed.
I am writing code as
LOOP AT IT_VBAK INTO W_VBAK where AUART CP 'Z*AB'.
ENDLOOP.
I had checked in debugging and its working but my doubt is CP basically considers any open spaces and matches the pattern and makes loop pass.
Please suggest how to achieve this in record processing for Z*AB order types.
Thanks,
rg
03-13-2017 10:49 PM
First of all, check the documentation for CP:
Then, I propose to write (module) tests for your expected values.