Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering/Sorting table control by partial string(ABAP report)

Former Member
0 Kudos

Hello! Is anyone able to help me with this? I want to filter out table control rows like eg. select * from itab into corresponding fields of table zstaff where position like %lect%. Displaying the results of position being lecturer, senior lecturer, etc.. And yes, the lect will definitely be replaced by a variable..

1 REPLY 1

denniss_
Explorer
0 Kudos

Hi,

  1. put your variable in range with OPTION = 'CP' and use it:
    where POSITION IN range (also for internal table)
  2. DATA lv_pos type zstaff-position.
    lv_pos = '%' && lv_position && '%'.
    SELECT * FROM... WHERE position like lv_pos.
    Take care: possible SQL injection!

Good luck,

Dennis