abap-ui-tools
A helper class for the classic ABAP dynpro UI: hiding, disabling and requiring screen fields, setting dropdown values, and asking yes/no questions, in single calls.
Manipulating dynpro screen fields normally means writing a loop at screen and checking group and field names by hand in the PBO event. ZCL_UITOOLS, used through inheritance or as an instance, replaces that with direct calls such as field('MATNR')->hide() or group('GR1')->set_required() to hide, disable or require whole groups or single fields, and the same field() method sets a list box's dropdown values. Its ask() and ask_with_cancel() methods wrap POPUP_TO_CONFIRM for yes/no and yes/no/cancel questions, with an optional long text pulled from an SE61 document. A demo report, ZP_UITOOLS_DEMO, shows the calls in use.
Facts
Where it sits
Who is behind it
In the atlas: maintains 5, contributes to 6@jrgkrausmaintainer
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- does not say
- Distributed through
- does not say
Connections
Building screens, lists and interactive controls for the SAP GUI
Raises an ABAP exception from a text or the last system message
Download
README
quoted from jrgkraus/abap-ui-tools under MIT, readCollection of tools for the classic dynpro UI of SAP
The provided class ZCL_UITOOLS can be used via inheritance or as an instance.
Manipulate screen fields in PBO
Instead of using loop at screen., you can now use the following calls to influence on the screen behaviour. The following examples are based on a class that inheritates from ZCL_UITOOLS
" hide a field by group or name
group( 'GR1' )->hide( ).
field( 'MATNR' )->hide( ).
" hide a selection or a parameter of a report screen
selection( 'S_MATNR' )->hide( ).
" set fields to no-input
group( 'GR1' )->set_noinput( ).
field( 'MATNR' )->set_noinput( ).
" make a field obligatory
group( 'GR1' )->set_required( ).
field( 'MATNR' )->set_required( ).
Set dropdown values in PBO
Using the field( ) method, you can set dropdown values for a list box
field( 'GROUPNR' )->set_dropdown_values(
value #(
( key = '1' text = 'First group' )
( key = '2' text = 'Second group' )
( key = '3' text = 'Third group' )
( key = '4' text = 'Forth group' ) ) ).
Simple Yes/No (/Cancel) queries
The methods ask( ) and ask_with_cancel( ) provide a simple interface to POPUP_TO_CONFIRM
if ask( question = 'Is this OK?' ).
message 'OK' type 'I'.
else.
message 'not OK' type 'I'.
endif.
" verson that displays also a cancel button
try.
if ask_with_cancel( question = 'Is this OK?' ).
message 'OK' type 'I'.
else.
message 'not OK' type 'I'.
endif.
catch zcx_uitools_user_cancelled into data(e).
message e type 'I' display like 'E'.
endtry.
Both methods provide also an optional parameter LONGTEXT where you can pass a longtext object created with SE61
Demo report
Explore ZP_UITOOLS_DEMO to learn more
dependencies
The coding uses , which depends on
Others providing
Compare all 10 on the SAP GUI screens and lists page →- abeljohny/ZAPabeljohny/ZAPA tiny DSL included into an ABAP report that replaces a SELECT and an ALV call with a pair of macros, _select to read a table and _display to show the result as an ALV list.independent, abapMacro DSL turning a one-line select into an ALV list
- abap-ui-toolboxabap-ui-toolboxA collection of ABAP classes for classic SAP GUI development: an enhanced, editable ALV grid, a single-container screen framework, and a tree wrapper.independent, abapABAP classes for classic SAP GUI development: ALV, screens, trees
- alv_utilitiesalv_utilitiesA single ABAP class that wraps the SALV framework so a report, dynpro or popup listing sets column text, colour, alignment, layout and sorting in single method calls, built against ABAP 7.0.independent, abapABAP class wrapping SALV to set column properties in one call
- abap-alv-struc-viewerabap-alv-struc-viewerAn ABAP tool that generates an ALV table view straight from a DDIC structure, as a control-driven substitute for classic dynpro fields, with search help, validation and formatting from the structure.independent, abapALV table view generated from a DDIC structure
- abapEasyALVabapEasyALVWrapper classes over the classic ALV and SALV frameworks that collect commonly used reporting actions behind fewer method calls, so a report displays a table with set_data and display_data.independent, abapWrapper classes over classic ALV and SALV reporting
- cds2alvcds2alvAn ABAP tool that generates an ALV list report directly from a CDS view's own field definitions, maintained on SAP_ABA 750 SP26, with further extensions shipped from a separate repository.independent, abapGenerator for ALV list reports from a CDS view's field definitions
- guidrasilguidrasilA visual designer for classic SAP GUI screens that wraps containers and controls in a generic shell and generates the ABAP program that displays the layout it places.independent, abapVisual designer generating ABAP code for classic SAP GUI screens
- abapMermaidabapMermaidAn ABAP package that renders Mermaid diagrams inside an SAP GUI container through the Edge Chromium Control, from a diagram's own text syntax passed at runtime.independent, abapRenders Mermaid diagrams inside an SAP GUI container
- ZwdDynscreenZwdDynscreenAn ABAP library that generates a selection screen or a popup for a handful of parameters from objects typed by DDIC elements, without a dynpro created in the program.independent, abapSelection screens and popups generated from ABAP objects, no dynpro
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
History in the atlas
- First seen.
For your agent
- Ref
artifact:jrgkraus-abap-ui-tools- JSON
- /artifacts/jrgkraus-abap-ui-tools.json
- MCP
- Connecting an agent