github.com/abap2UI5-addons/selection-screen

Selection Screen

Select-options with saved variants, from a table name or your data.

ABAP CloudActiveMIT license

What it does

selection-screen builds one select-option per field of a database table or an internal table, read via RTTI, and renders them inline in your page or as a filter popup. Users enter ranges in a popup and save or load the whole selection as a variant, kept in the table z2ui5_t_13 per app and optionally per user. Your app gets the filter back and turns it into a SQL WHERE clause or filters an internal table with it. Use it in data browsers and reports on abap2UI5 that select data on user-defined criteria.

  • Select-options for every field of a table name, an internal table or a filter
  • Range popup per field, Clear, Load and Save variant handled in main( )
  • Inline rendering into your view or as a filter popup app
  • Variants persisted in table z2ui5_t_13, per app, optionally per user, with a default
  • Filter result usable as dynamic SQL WHERE or to filter an internal table

Requirements

  • abap2UI5
  • ABAP Cloud (S/4 Public Cloud, BTP ABAP Environment), S/4 Private Cloud or On-Premise, or NetWeaver 7.50 or higher
  • No 7.02 downport branch

Installation

Pull the repository with abapGit into a package of your own. abap2UI5 itself has to be installed first.

https://github.com/abap2UI5-addons/selection-screen

  1. Install with abapGit in this order: 1. abap2UI5, 2. this repository (branch main)
  2. Contains classes and the table z2ui5_t_13 for the variants; nothing else to set up
  3. Start a sample like any abap2UI5 app, e.g. ?app_start=z2ui5_cl_sel_sample_01

Usage

" on init
mo_variant = z2ui5_cl_sel_multisel_pop=>factory_by_data( data        = mt_table
                                                         var_handle1 = `ZMY_APP` ).
" on the Filter button
client->nav_app_call( mo_variant ).

" back in your app
IF client->check_on_navigated( ).
  DATA(lo_filter) = CAST z2ui5_cl_sel_multisel_pop( client->get_app_prev( ) ).
  IF lo_filter->result( )-check_confirmed = abap_true.
    z2ui5_cl_util=>filter_itab( EXPORTING filter = lo_filter->result( )-t_filter
                                CHANGING  val    = mt_table ).
  ENDIF.
ENDIF.