Hi Ajinkya,
You mention that you maintain the values in a z-table. When you select the values from the z-table, use the SELECT DISTINCT keyword to eliminate duplicate records from the result set. For example,
DATA lt_carrid TYPE STANDARD TABLE OF s_carr_id. SELECT DISTINCT carrid FROM sflight INTO TABLE lt_carrid.
Cheers,
Amy