Problem: Bruce is a functional consultant who wants that a selection screen should allow only values coming from Domain in the Status Field except for value S which is not applicable. He places the request with Harvey who is the ABAPer.

Solution: Harvey, a seasoned sport, comes with a simple but elegant solution.

  1. Add – AT SELECTION SCREEN ON VALUE REQUEST FOR <field> – in the report.
  2. Call FM – get_domain_values – with domain to get the legal values in an internal table. Remove S from the internal table.
  3. Call FM – f4if_int_table_value_request – to display valid values in a pop-up.
  4. Upon user decision on the pop-up, pass the selected value in the field.