selection-screen
Select-options with saved variants for an abap2UI5abap2UI5One ABAP class implementing z2ui5_if_app is the whole app: the browser loads a generic UI5 shell once, and every interaction after that is an HTTP roundtrip back into ABAP.community org, abap app, built from a database table name or from an internal table the app passes in.
In SAP GUI a report gets its selection screen and its variants from SELECT-OPTIONS; in a UI5 app each filter field, its range dialog and the variant handling are written by hand. This reads the fields over RTTI from a table name or from data passed to it, renders one select-option per field inline in the view or as a filter popup, and hands the filter back as ms_result-t_filter for a dynamic SQL WHERE or for filtering an internal table. Variants go into its own table z2ui5_t_13, per app, optionally per user and with a default variant. The field names come back from the browser, so the README asks the app to keep only the names that are fields of its own table before they reach a dynamic WHERE, since a forged name could carry a condition or a subquery on another table.
Facts
Where it sits
Who is behind it
In the atlas: maintains 21@abap2UI5-addonsmaintaineroblomov-devContributes to this
In the atlas: maintains 4, contributes to 44@oblomov-dev1 contributor
Before choosing this
Conditions
PracticalFunctional boundary
The PARAMETERS-style selection screen with event blocks is not here: z2ui5_cl_sel_screen and z2ui5_cl_sel_screen_sel are a skeleton whose methods are still empty, and the README points at abap-cloud-guiabap-cloud-guiA report-style programming model for abap2UI5: one class produces a selection screen with a WRITE list or an ALV grid, running as a UI5 app on ABAP Cloud as well as on NetWeaver 7.02.independent, abap for a full report-style screen.
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- Inside its host
- Distributed through
- abapGit
Connections
Producing a web user interface from ABAP code
UI5 apps written as one ABAP class, rendered by a generic shell
Git client written in ABAP that runs inside the system
Table and form layouts with saved variants for abap2UI5
Download
README
quoted from abap2UI5-addons/selection-screen under MIT, readselection-screen
Select-options with saved variants for your abap2UI5 apps - generated from a table name or your data.
You pass a database table name or an internal table; selection-screen builds
one select-option per field, lets the user enter ranges in a popup, and saves
and loads the whole selection as a variant. Your app gets the filter back and
turns it into a SQL WHERE clause or filters an internal table with it. For
developers of abap2UI5 apps that read data on user-defined criteria.
Part of abap2UI5-addons - addons and apps for abap2UI5, installed with abapGit.
Why
In SAP GUI a report gets its selection screen and variants for free with
SELECT-OPTIONS. In a UI5 app each filter field, its range dialog and the
variant handling would have to be built by hand.
selection-screen does that generically: it reads the fields via RTTI, renders
the select-options either inline in your page or as a filter popup, and keeps
variants in its own table z2ui5_t_13 - per app, optionally per user, with a
default variant.
Good for:
- Data browsers and reports on abap2UI5 that select from a database table.
- Filtering an internal table the user already sees, with ranges instead of a search field.
Installation
Requirements
- ABAP Cloud (S/4 Public Cloud, BTP ABAP Environment), S/4 Private Cloud or On-Premise, or SAP NetWeaver AS ABAP 7.50 or higher
- abap2UI5
Steps - with abapGit, in this order:
- abap2UI5
- this repository (branch
main) - classes and the tablez2ui5_t_13for the variants; nothing else to set up
Start - run a sample like any abap2UI5 app, e.g.
?app_start=z2ui5_cl_sel_sample_01 for select-options over table T100.
All samples are listed under Samples.
Usage
Select-options for every field of a database table, inline in your page
(condensed from z2ui5_cl_sel_sample_01):
" DATA mo_multiselect TYPE REF TO z2ui5_cl_sel_multisel.
METHOD z2ui5_if_app~main.
IF client->check_on_init( ).
mo_multiselect = z2ui5_cl_sel_multisel=>factory_by_name( val = `T100`
s_variant = VALUE #( handle01 = `ZMY_APP` ) ).
view_display( ). " calls mo_multiselect->set_output( client = client view = lo_panel )
RETURN.
ENDIF.
" range popups, Clear, Load and Save variant are handled here
IF mo_multiselect->main( client ).
RETURN.
ENDIF.
IF client->check_on_event( `GO` ).
DATA(lv_where) = z2ui5_cl_util=>filter_get_sql_where( mo_multiselect->ms_result-t_filter ).
SELECT FROM t100 FIELDS * WHERE (lv_where) INTO TABLE @mt_t100 UP TO 100 ROWS.
client->view_model_update( ).
ENDIF.
ENDMETHOD.
The select-options are bound to the view, so ms_result-t_filter - field
names included - comes back from the browser. Before the names go into a
dynamic WHERE, keep only those that are fields of your table, as
z2ui5_cl_sel_sample_01 does: a forged name could otherwise carry a condition
or a subquery on another table.
As a filter popup over an internal table (condensed from
z2ui5_cl_sel_sample_02):
" 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.
Features
- Ranges, Filters, Selection-Screens
- Persist Variants
What is there
| Class | Purpose |
|---|---|
z2ui5_cl_sel_multisel | select-options for a table name (factory_by_name), for data (factory_by_data) or for a filter (factory_by_filter); renders into your view with set_output( ), handles its events in main( ) |
z2ui5_cl_sel_multisel_pop | the same as a popup app; returns the filter with result( ) |
z2ui5_cl_sel_var_pop_read, z2ui5_cl_sel_var_pop_save | popups to load and save a variant |
z2ui5_cl_sel_var_db | variant persistence in table z2ui5_t_13 |
z2ui5_cl_sel_screen, z2ui5_cl_sel_screen_sel | skeleton of a PARAMETERS-style selection screen - the methods are still empty |
For a full report-style selection screen with PARAMETERS, SELECT-OPTIONS
and event blocks, see abap2UI5-addons/abap-cloud-gui.
Samples
| Sample | Shows |
|---|---|
z2ui5_cl_sel_sample_01 | Select-options for table T100 inline in the page, result read with a dynamic WHERE |
z2ui5_cl_sel_sample_02 | Filter popup over an internal table |
z2ui5_cl_sel_sample_03 | Skeleton of the PARAMETERS-style selection screen |
Demo
Selection-Screen
Filter Popup
Development
npm ci
npm run check # all gates below, as in CI
npm run lint # abaplint, Standard ABAP (v750)
npm run check:cloud # abaplint, ABAP Cloud
npm run check:abap2ui5 # abap2UI5-linter over apps and views
npm run rename # namespace rename check
Contributing
Issues and pull requests are welcome - whether you're fixing bugs, adding new functionality, or improving documentation. Read CONTRIBUTING.md first.
License
MIT - see LICENSE.
History
Others providing
Compare all 17 on the UI written in ABAP page →- abap2UI5-localabap2UI5-localThe whole abap2UI5 framework folded into the local classes of one HTTP handler, so an app runs without the framework installed as a package.community org, abapabap2UI5 folded into the local classes of one HTTP handlerfrom ABAP
- abap2UI5abap2UI5One ABAP class implementing z2ui5_if_app is the whole app: the browser loads a generic UI5 shell once, and every interaction after that is an HTTP roundtrip back into ABAP.community org, abapUI5 apps written as one ABAP class, rendered by a generic shellfrom ABAP
- abap-cloud-guiabap-cloud-guiA report-style programming model for abap2UI5: one class produces a selection screen with a WRITE list or an ALV grid, running as a UI5 app on ABAP Cloud as well as on NetWeaver 7.02.independent, abapReport-style programming model for abap2UI5 on ABAP Cloudfrom ABAP
- custom-controlscustom-controlsThirteen custom controls for abap2UI5, a signature pad and a scanner that reads several barcodes at once among them, each one an ABAP builder class with a single render( ) method and all of them shipped in a BSP of their own.community org, abapThirteen custom UI5 controls for abap2UI5 appsfrom ABAP
- http-connectorhttp-connectorAn add-on that makes the abap2UI5 apps of one ABAP system reachable through another: a thin ICF handler on the consumer system forwards every roundtrip to the source system through an SM59 destination.community org, abapForwards abap2UI5 roundtrips to another system over HTTPfrom ABAP
- layout-managementlayout-managementAn abap2UI5 addon that renders an internal table or a structure as a UI5 table or form with a settings popup, where the user lays it out and saves the result as a layout variant.independent, abapTable and form layouts with saved variants for abap2UI5from ABAP
- abap2UI5 for Excelabap2UI5 for ExcelAn Office add-in that runs an abap2UI5 app in Excel's task pane, where the app reads and writes the workbook through the z2ui5.cc.ExcelBridge control.community org, abapOffice add-in running an abap2UI5 app in Excel's task panefrom ABAP
- abap2UI5-addons/popupsabap2UI5-addons/popupsReady-made dialogs for an abap2UI5 app: confirm, inform, select from a list, file up- and download, table, text edit, PDF, HTML, messages, range, value help and search help, each opened with one factory( ) call.community org, abapReady-made dialogs for abap2UI5 appsfrom ABAP
- rap-extrap-extFloorplan classes that read a CDS entity's UI annotations at runtime and render a list report, worklist, tree, object page, overview page, value help or action dialog as an abap2UI5 app.community org, abapFloorplans rendered from CDS UI annotations as abap2UI5 appsfrom ABAP
- abap2UI5 frontend-webcomponentabap2UI5 frontend-webcomponentAn alternative abap2UI5 frontend: one ES module registering <abap2ui5-app>, which renders the views an unchanged abap2UI5 app class sends with UI5 Web Components and no UI5 core.community org, abapabap2UI5 frontend rendering with UI5 Web Componentsfrom ABAP
- abap2UI5 frontendabap2UI5 frontendThe abap2UI5 frontend as installable ABAP artefacts: per system type one generated branch carrying the BSP or HTTP service with its handler, pulled into the system with abapGit.community org, abapabap2UI5 frontend as ABAP artefacts installed with abapGitfrom ABAP
- abap2UI5 Layout Editorabap2UI5 Layout EditorA browser editor that lays out a UI5 view by drag and drop and writes it out as one abap2UI5 app class, pulled into the system with abapGit.community org, abapDrag-and-drop UI5 view editor that writes an abap2UI5 app classfrom ABAP
- abap2UI5 protocolabap2UI5 protocolThe abap2UI5 roundtrip written down: a versioned specification of the wire between frontends and backends, JSON Schemas for its messages, and two conformance suites that test either side.community org, abapVersioned specification of the abap2UI5 roundtrip protocolfrom ABAP
- ZFPM_TOOLSZFPM_TOOLSA report that shows the development objects of an FPM hierarchy in one view and edits, copies, deletes, imports and exports the hierarchy as a whole rather than one object at a time.independent, abapEdits, copies and transports a whole FPM hierarchy at oncefrom ABAP
- ZWD_CALENDAR_VHZWD_CALENDAR_VHA value help for date fields in Web Dynpro ABAP screens that shows a calendar view, so the user picks a day from it instead of typing the date.independent, abapWeb Dynpro ABAP calendar value help for date fieldsfrom ABAP
- abap_mustacheabap_mustacheA Mustache template engine for ABAP, rendering logic-less templates into HTML or any other text from a structure or table of any type, with partials and a separate Steampunk-compatible branch.independent, abapMustache template engine for ABAPfrom ABAP
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
Flavors
“ABAP Cloud (S/4 Public Cloud, BTP ABAP Environment), S/4 Private Cloud or On-Premise, or SAP NetWeaver AS ABAP 7.50 or higher” — abap2UI5-addons/selection-screen — README, Installation requirements
“ABAP Cloud (S/4 Public Cloud, BTP ABAP Environment), S/4 Private Cloud or On-Premise, or SAP NetWeaver AS ABAP 7.50 or higher” — abap2UI5-addons/selection-screen — README, Installation requirements
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:abap2ui5-addons-selection-screen- JSON
- /artifacts/abap2ui5-addons-selection-screen.json
- MCP
- Connecting an agent