abeljohny/ZAP
A 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.
ZAP is a tiny DSL included into an ABAP report, replacing a SELECT and an ALV call with a pair of macros. _select reads a table into a reference variable with a compact table : fields + where syntax, and _display renders the result as an ALV list. Field catalog and layout can be set directly through _deffcat, _addfcat, _deflayout and _addlayout, using the structures slis_fieldcat_alv and slis_layout_alv, for reports that need custom columns. It lives inside the report that includes it rather than running as a standalone program.
Facts
Where it sits
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- does not say
- Distributed through
- Copied into the project
Connections
Building screens, lists and interactive controls for the SAP GUI
Download
README
quoted from abeljohny/ZAP under GPL-2.0, readZAP
Tiny DSL in ABAP for rapid report prototyping. Featured on https://dotabap.org/explore.html.
Installation
Please visit https://app.assembla.com/spaces/saplink/wiki for installing the NUGG_ZAP.nugg file or simply copy the files in src/ into your system.
Usage
SELECT Syntax
_select '<table name> : <table fields | *> [+ <where condition1> + <where condition2> ...]' <reference variable> <reference variable | zap_null>.
DISPLAY Syntax
_display <reference variable>
Example: Displaying data from table SFLIGHT
INCLUDE zap.
START-OF-SELECTION.
DATA: r_sflight TYPE REF TO DATA.
_select 'sflight : carrid connid fldate price currency + carrid = ''AC'' + connid = 820' r_sflight zap_null.
_display r_sflight.
Example: Displaying data from table SCARR based on data from table SFLIGHT
INCLUDE zap.
START-OF-SELECTION.
DATA: r_sflight TYPE REF TO DATA,
r_scarr TYPE REF TO DATA.
_select 'sflight : *' r_sflight zap_null.
_select 'scarr : * + carrid = <t>-carrid' r_scarr r_sflight.
_display r_scarr.
ZAP supports custom ALV fieldcatalog and layout settings for fine-grained control over report display using the fields defined in the structures slis_fieldcat_alv and slis_layout_alv.
DEFINE FIELD CATALOG Syntax
_deffcat '<field1> <field2> ...'.
ADD FIELD CATALOG Syntax
_addfcat '''<field1>'' ''<field2>'' ...'.
DEFINE LAYOUT Syntax
_deflayout '<field1> <field2> ...'.
ADD LAYOUT Syntax
_addlayout '''<field1>'' ''<field2>'' ...'.
Example: Displaying data from table SFLIGHT using custom field catalog and layout
INCLUDE ZAP.
START-OF-SELECTION.
DATA: R_SFLIGHT TYPE REF TO DATA.
_SELECT 'sflight : carrid connid price' R_SFLIGHT ZAP_NULL.
_DEFFCAT 'col_pos fieldname tabname seltext_m'.
_ADDFCAT: '''1'' ''connid'' ''sflight'' ''Flight No.''',
'''2'' ''carrid'' ''sflight'' ''Airline''',
'''3'' ''price'' ''sflight'' ''Price'''.
_DEFLAYOUT 'no_vline'.
_ADDLAYOUT '''X'''.
_DISPLAY R_SFLIGHT.
License
Others providing
Compare all 10 on the SAP GUI screens and lists page →- 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, treesfrom ABAP
- 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 callfrom ABAP
- 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 structurefrom ABAP
- abap-ui-toolsabap-ui-toolsA 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.independent, abapHelper class for classic ABAP dynpro field handling and popupsfrom ABAP
- 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 reportingfrom ABAP
- 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 definitionsfrom ABAP
- 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 screensfrom ABAP
- 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 containerfrom ABAP
- 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 dynprofrom 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
History in the atlas
- First seen.
For your agent
- Ref
artifact:abeljohny-zap- JSON
- /artifacts/abeljohny-zap.json
- MCP
- Connecting an agent