Hello,
I have an internal table it_data with all vendor data in it. I also have a selection screen with fields like name, number and address. A user can enter anything on the selection screen and based on thatI need to show the results. I am having issues with when user enters a city as a range with wild card charachter. So let's say user entered A* to D*, so it should show all the cities between A* and D*, for this I have written the below code:
wa_ort01-sign = 'I'.
wa_ort01-option = 'BT'.
wa_ort01-low = s_ort01-low.
wa_ort01-high = s_ort01-high.
IF r_ort01 IS NOT INITIAL.
LOOP AT it_data ASSIGNING <fs_data>.
TRANSLATE <fs_data>-ort01 TO UPPER CASE.
READ TABLE r_ort01 INDEX sy-index into wa_ort01.
IF ( <fs_data>-ort01 CP wa_ort01-low ) or ( <fs_data>-ort01 CP wa_ort01-high ).
ELSE.
DELETE it_data.
ENDIF.
ENDLOOP.
ENDIF.
when I run my code I only see the vendors with cities starting with A* and D* and nothing in between like cities that start with B or C. I know the problem is that I am checking the pattern for the low and high value of the value entered by the user and hence ignoring anything between but I am npt sure how to fix it.
Any suggestion.
Thank you.