ztoad
An Open SQL editor for ABAP that runs a query written in the editor pane on the server and shows the rows in an ALV window, with a pane of saved queries to reuse and share.
Write a query in ABAP SQL and the program executes it directly on the server, showing a SELECT's result in an ALV window. A query may be complex, with JOIN, UNION and subqueries, and several may sit in the editor at once: the highlighted one runs, or the one the cursor is in, and by default the last. A pane beside the editor stores queries to reuse, to share with named users, a user group or everyone, and to export to a file for another server, while a third pane shows the DDIC object a query currently uses. SELECT, INSERT, UPDATE and DELETE are managed, every multirow SELECT is limited to 1-10,000 rows, native SQL is intentionally rejected, and table access can be restricted with the authorization object ZTOAD_AUTH. The complete saved-query, DDIC and multi-tab workspace is desktop SAP GUI only, and SAP GUI for HTML gets a deliberately smaller, tested mode of an empty editor, ALV results, Help and Exit; the README states the program is a clone of the original ZTOAD by S. Hermann, whose own version installs with SAPlink while this one installs with abapGitabapGitA Git client written in ABAP that runs inside the system, so objects are cloned, pulled and pushed without leaving it; with no package manager in ABAP, a cloned repository is how code is distributed.community org, abap.
Facts
Where it sits
Who is behind it
In the atlas: maintains 35, contributes to 86, wrote 25@marianfoomaintainerStoneRangerContributes to this
In the atlas: contributes to 1@StoneRanger1 contributor
What it declares
Every artifact
- Type
- App
- Origin
- Independently maintained
As an app
- Where it runs
- Inside the system it serves
- Distributed through
- abapGit
Connections
Looking at the data a system holds while developing or supporting it
Git client written in ABAP that runs inside the system
Download
README
quoted from marianfoo/ztoad under GPL-3.0, readZTOAD
Overview
Open SQL Editor
Program : ZTOAD
Author : S. Hermann
Date : 31.12.2017
Version : 5.0.1
This is just a clone of the original ZTOAD, an Open SQL editor.
The original ZTOAD version is available as a SAPlink nugget and can be installed on a SAP System with SAPlink.
This version can easily be installed on a SAP System with abapGit.
For local checks, TDD, the two-system development workflow, native abapGit synchronization, and live validation, see CONTRIBUTING.md, docs/test-strategy.md, and the current baseline findings.

Description
This program allow you to execute query directly on the server
- Write your query in the editor window (ABAP SQL)
- View the result in ALV window (in case of SELECT query)
Features : The top center pane allow you to write your query in ABAP SQL format. Query can be complex with JOIN, UNION and subqueries. You can write query on several lines. You could also add spaces. To add comment, start the line by * or prefix your comment by "
You could write several queries in the query editor, separated by dot ".". To execute one of them, highlight all the wanted query, or just put the cursor anywhere inside the wanted query. By default, the last query is executed.
In case of error, you can display generated code to help you to correct your query (only if you have S_DEVELOP access)
F1 Help is managed to help you on ABAP SQL Syntax Code completion is also available :
- TAB to autocomplete with tooltip word
- CTRL + ESPACE to display list of available words Be carefull to not use with INSERT statement (see below)
The top left pane allow you to store your query :
- You could save your query to reuse it later
- You could share your query : define users, usergroup, all
- You could export query into file to reuse it on another server
The top right pane display ddic object that is currently used to help you to write the proper query Synergy with ZSPRO program : display tables defined in ZSPRO in the ddic tree Tips : You can search a table in the tree using header clic
Frontend support
The complete saved-query/DDIC/multi-tab workspace is available in desktop SAP GUI. SAP GUI for HTML uses a deliberately smaller, tested mode: an initially empty query editor, stream transfer with deterministic execution of the last statement, ALV results, Help, and Exit. Initial templates, cursor/selection execution, saved-query and DDIC trees, automatic history, generated-code display, downloads, options, import/export, and multiple tabs remain desktop-only until each frontend operation has its own WebGUI integration test.
Managed queries
SELECT, INSERT, UPDATE, DELETE
About New SQL Query Syntax You could use new syntax (if your SAP system manage it) ZTOAD autmatically detect if you are using new sytax when:
- You separated your selected fields with comma
- You prefixed your variable with @ in the INTO TABLE statement
Select Clause managed
SELECT [DISTINCT / SINGLE] select clause
FROM from clause
[UP TO x ROWS]
[WHERE cond1]
[GROUP BY fields1]
[HAVING cond2]
[ORDER BY fields2]
[UNION SELECT...]
UP TO (Default max rows) ROWS is applied if omitted.
Every multirow SELECT is limited to 1-10,000 rows. UP TO 0 ROWS, invalid
limits, and explicit values above 10,000 are rejected before execution. A saved
default of zero or a negative value safely falls back to 100; a larger saved
default is capped at 10,000.
COUNT, AVG, MAX, MIN, SUM are managed
DO NOT FORGET SPACE in ( ) of aggregat
Insert special syntax In ABAP, insert query is always used with given structure In this SQL editor, you have 2 ways to do an INSERT :
-
By passing each value, 1 by 1
INSERT SEOCLASSTX VALUES ( 'ZZMACLASS', ' ', 'Test claSS' ) -
By passing value of used fields only
INSERT SEOCLASSTX SET CLSNAME = 'ZZMACLASS' DESCRIPT = 'TeSt class'
Native SQL is intentionally rejected. Database-specific statements belong in audited database-administration tooling, not in ZTOAD.
Sample queries
SELECT SINGLE * FROM VBAP WHERE VBELN = '00412345678'
SELECT COUNT( * ) SUBC MAX( PROG ) FROM TRDIR GROUP BY SUBC
SELECT VBAK~* from VBAK UP TO 3 ROWS ORDER BY VKORG.
SELECT T1~VBELN T2~POSNR FROM VBAk AS T1
JOIN VBAP AS T2 ON T1~VBELN = T2~VBELN
INSERT SEOCLASSTX VALUES ( 'ZZMACLASS', ' ', 'Test claSS' )
INSERT SEOCLASSTX SET CLSNAME = 'ZZMACLASS' DESCRIPT = 'TeSt class'
UPDATE SEOCLASSTX SET DESCRIPT = 'txt' WHERE CLSNAME = 'ZZMACLASS'
DELETE SEOCLASSTX WHERE CLSNAME = 'ZZMACLASS'
Add Authorization with Object
You could define your authorization object to restrict function usage by user.
If you dont define auth object, all users will have same access as defined bellow.
The auth object have 2 fields TABLE and ACTVT
ACTVT can take 4 values that you could define here.
By default :
- 01 for INSERT command
- 02 for UPDATE command
- 03 for SELECT command
- 06 for DELETE command
- TABLE contain allowed table name pattern
The Authorization object name ist ZTOAD_AUTH.
Add Authorization in code
Alternatively, you could define your authorization in code.
First, make the auth_object object initial.
auth_object(20) TYPE c VALUE 'ZTOAD_AUTH',
auth_object(20) TYPE c VALUE '', " 'ZTOAD_AUTH',
No you define globally the authorizations:
* Bellow is default AUTH used if no auth_object is defined
* Allow SELECT query on SAP table (restricted by given pattern)
auth_select TYPE string VALUE '*',
* Allow INSERT query on SAP table (restricted by given pattern)
auth_insert TYPE string VALUE space, "'*',
* Allow UPDATE query on SAP table (restricted by given pattern)
auth_update TYPE string VALUE space, "'*',
* Allow DELETE query on SAP table (restricted by given pattern)
auth_delete TYPE string VALUE space, "'*',
* Deprecated and ignored; Native SQL cannot be enabled
auth_native(1) TYPE c VALUE space, "abap_true,
Changelog
- 2022.06.15 v4.0.4:
- Add authorization object
ZTOAD_AUTH
- Add authorization object
- 2022.02.25 v4.0.3:
- Increase max queries to 1000
- change master language to english
- 2017.12.31 v4.0.2:
- Fix dump in case of multiple aggregations
- 2017.04.01 v4.0.1:
- Fix new Tab dump
- 2016.12.17 v4.0 :
- Add Tab management.
- You can have up to 30 tabs
- Fix Status corruption
- Add Import/Export function for saved queries
- Mod Code cleaning
- 2016.09.10 v3.6 :
- Add New syntax management of "case"
- 2016.07.06 v3.5.1:
- Fix Auth issue
- Fix Dump on select with no empty selection part
- 2016.03.28 v3.5 :
- Add Value Help on DDIC field. Select a value tompaste in editor
- Add Button Execute into file to download results instead of display it in ALV
- Mod Use class CL_RSAWB_SPLITTER_FOR_TOOLBAR for creation of DDIC toolbar
- Add Refresh the DDIC tree when executing a query even if error found
- Fix Remove confirmation popup on display code for no select statement
- Add Option to display technical name in ALV
- Mod Move option button to main toolbar
- Mod Rename subroutines (code cleaning)
- Mod Allow save on exit popup
- Add New query button
- Mod New query template changed
- 2015.11.07 v3.4.3:
- Fix dump if cursor on first position
- Fix prevent dump on too many sql run
- 2015.11.07 v3.4.2:
- Fix cancel of save query popup
- Fix Allow usage of " and . inside ''
- 2015.11.01 v3.4.1:
- Fix issue with delete all history context menu
- 2015.09.19 v3.4 :
- Add Code completion on SQL editor
- Thanks to Benjamin Krencker for his code
- Add Remove useless APPENDING TABLE statement in qry
- 2015.09.13 v3.3 :
- Add New Options panel to save user preferences
- Add Delete all history entries context menu
- Add option to add linebreak after paste field from ddic tree
- Add Count column in alv grid display
- 2015.09.06 v3.2.1:
- Mod Default limit to 100 rows is now optional
- 2015.08.30 v3.2 :
- Add Manage new SQL Syntax introduced by NW7.40 SP5
- Add Remove useless INTO TABLE statement in query
- Add All NATIVE Sql commands
- Mod Auth object use now the sap standard way
- Fix Dump in case of up to xx rows in unioned query
- Fix Dump at activation if ZSPRO does not exist
- Fix Compatibility issues with older sap system
- 2015.08.05 v3.1 :
- Add Manage drag&drop from DDIC tree to SQL Editor
- Mod Double clic on field in DDIC tree paste field in editor instead of filling clipboard
- 2015.06.13 v3.0 :
- Add INSERT, UPDATE, DELETE command
- Add Authorization management
- Add History tree display first query line if it is a comment line
- Mod Code cleaning
- 2015.03.05 v2.1.1:
- Mod grid size is no more changed before display query result
- 2015.01.11 v2.1 :
- Add UNION instruction managed to merge 2 queries
- Mod Do not refresh result grid for count(*)
- Mod Back close the grid instead of leave program if result grid is displayedAdd Display program header as default help
- Add Run highlighted query
- Mod Documentation rewritten
- 2014.10.23 v2.0.2:
- Add Display number of entries found
- Add Confirmation before exit for unsaved queries
- 2014.10.19 v2.0.1:
- Fix bug on search ddic function
- 2014.08.03 v2.0 :
- Completely rewritten version
- Save and share queries with colaborators
- Queries are now saved in database
- Display tables (+ fields) of the where clause
- Display ZSPRO entries in ddic tree
- Allow direct change in query after execution
- Count( * ) allowed
- Can display generated code
- Display query execution time
- Allow write of several queries (but 1 executed)
- 2013.12.03 v1.3:
- Allow case sensitive constant in where clause
- 2012.08.30 v1.2:
- Rewrite data definition to avoid dump on too long fieldname
- 2012.04.01 v1.1:
- Updated to work also on BW system
- 2009.10.26 v1.0:
- Initial release
History
Fixes 10
Notes
Bug Fixes
- bound temporary subroutine pools (#32) (ef54657)
- classify ZTOAD table as not extensible (#26) (e5ae759)
- enforce bounded SELECT results (#33) (b6acc14)
- execute queries safely in WebGUI (#24) (5218476)
- execute UNION as one SQL set (a5ad27c)
- generate aggregate CASE result types (#21) (d532b2e)
- isolate generated query failures (#31) (b0b4d9f)
- parse top-level SQL clauses (#28) (c5ca65b)
- support ABAP SQL string functions (#27) (0f056e8)
- verify complete native-abapGit installation (#22) (2360fe4)
Breaking 1, Features 1, Fixes 8
Notes
⚠ BREAKING CHANGES
- The NATIVE command and its arbitrary Native SQL execution path are no longer supported.
Features
- establish tested development baseline (50d590b)
Bug Fixes
- add ZTOAD transaction launcher (8fb3131)
- add ZTOAD transaction launcher (#17) (a907835)
- authorize every SELECT source (#19) (1bf2d4d)
- generate strict select clauses in valid order (5ca4cc9)
- guard generated ABAP fragments (#20) (27bb674)
- retire arbitrary Native SQL execution (#18) (dc065dd)
- support WebGUI query editor (ca17984)
- support WebGUI query editor (b711f8b)
Others providing
Compare all 13 on the Browsing table data page →- sapguisapguiThirty classic transactions, SE80 and SE16N among them, rebuilt as abap2UI5 apps and installed with abapGit into a standard ABAP system.independent, abapThirty classic transactions rebuilt as abap2UI5 appsfrom ABAP
- se16nse16nAn abap2UI5 app that browses and filters the content of a table in the browser, on ABAP Cloud systems that have no SE16N as well as on premise.independent, abapTable content browser in abap2UI5, for ABAP Cloud and on premisefrom ABAP
- sql-consolesql-consoleA browser-based SQL console built on abap2UI5, in an Open SQL and a native ADBC variant, that shows a query's result as a filterable table without Eclipse or SAP GUI.independent, abapBrowser-based SQL console built on abap2UI5from ABAP
- HammerHammerA native macOS code editor for ABAP and CDS, with an Object Navigator, Transport Organizer, Data Browser and Gateway Client in the same app as the editor.independent, abapNative macOS code editor for ABAP and CDSfrom ABAP
- abap-db-browserabap-db-browserAn SAP GUI program for browsing tables, views, CDS views, custom queries and joins, installed with abapGit together with two other repositories from the same maintainer and needing ABAP 7.50.independent, abapSAP GUI browser for tables, views, CDS views and joinsfrom ABAP
- ABAP_DATABASE_MANAGERABAP_DATABASE_MANAGERA report that runs custom SQL queries against the SAP database or an external connection, shows the results in an ALV grid, and inserts, updates and deletes data in the connected database.independent, abapABAP report running custom SQL queries into an ALV gridfrom ABAP
- urbani-saplinkurbani-saplinkAn SE16 clone shipped as SAPlink files: an ABAP report that reads a table named at runtime with up to 190 select-options, and a Web Dynpro application beside it.independent, abapSE16 clone shipped as SAPlink filesfrom ABAP
- ABAP remote filesystemABAP remote filesystemA Visual Studio Code extension that opens an ABAP system over ADT as an editable filesystem and exposes system tools to GitHub Copilot and external MCP clients.independent, abapVS Code extension editing ABAP systems over ADT as a filesystemfrom ABAP
- ABAP Development Tools for EclipseABAP Development Tools for EclipseSAP's Eclipse plugins for ABAP: source, dictionary and CDS editors, Project Explorer, Outline and ABAP Unit, calling ADT resources on the connected system.sap official, abapSAP's Eclipse plugins for ABAP development over ADTfrom ABAP
- HR_DMEHR_DMEA read-only SAP GUI report that lists every infotype, payroll cluster and assignment table holding data for one SAP HCM person or organisational object.independent, abapRead-only SAP GUI report listing where HCM object data is storedfrom ABAP
- Simple Data ExplorerSimple Data ExplorerA multi-window SAP GUI explorer for tables, views and CDS SQL views, with filters that re-read as they change, foreign-key navigation, a join builder and pivot tables.independent, abapMulti-window SAP GUI explorer for tables, views and CDS SQL viewsfrom ABAP
- VERTEXVERTEXAn extension for ABAP Development Tools for Eclipse and VS Code that shows Simple Data Explorer, AVE and ACE in the editor over the developer's ADT connection.independent, abapADT extension for Eclipse and VS Code showing three SAP GUI toolsfrom 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
“The complete saved-query/DDIC/multi-tab workspace is available in desktop SAP GUI.” — marianfoo/ztoad — README, Frontend support
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:marianfoo-ztoad- JSON
- /artifacts/marianfoo-ztoad.json
- MCP
- Connecting an agent