ZTOAD – Open SQL editor
I want to share with you one of the best program from my toolbox. I called it ZTOAD, in reference of a famous query builder in the SQL world.
As you know, SAP don’t give to developper tools to execute query (there is a crappy tool for admin, and some function modules for devs, but not so usable…).
So i took my keeboard and made my own…
With ZTOAD, you can write and execute queries, in Open SQL format (the format used in ABAP program). Result is displayed in an ALV at bottom part of the screen. You can access to DDIC to help you when writing query and use SAP standard help.
You could save your best queries, and also share it to friends.
With this tool it become very easy to debug a complex query in production (with lot of join or subqueries for example). Just copy past the query in the editor and run, you will see in live the result.
French presentation can be found here : http://quelquepart.biz/article7/ztoad-requeteur-open-sql
And there is a direct download link (remember that you will need SAPLINK with table extension to install) : http://quelquepart.biz/telechargements&file=L2RhdGEvZG9jdW1lbnRzL3p0b2FkLnppcCozZThiNjE,&source=scn-ZTOAD
Final bonus: if ZSPRO is also installed, ZTOAD will get tables listed in ZSPRO repository and display it in a tree under DDIC tree (to help you to create queries)
Feel free to comment here 🙂
My others blogpost :
ZAL11 : a replacement for AL11
LISTCUBE replacement : a new way to display data
Abstraction class to generate MSWORD with SAP using OLE
ZAUTODOC : Automatic generation of technical BW documentation
Thanks for sharing your work.
Very interesting, like always!
Two small bugs I've run into:
1. When ZSPRO table doesn't exist, the search functionality (in right pane) doesn't work (FM POPUP_GET_VALUES fails).
I've edited method handle_header_click_ddic (lines 469-470) and replaced field ZSPRO-TEXT with RSDXX-FINDSTR.
2. When F1 is pressed and no text is selected a dump occurs.
I've added "lw_cursor_pos_to <> lw_cursor_pos_from" check
in method handle_f1_textedit (line 379).
One additional feature/improvement I may suggest:
1. It would be nicer if double-clicking on table field in the right pane will add it automatically to the SQL/source code instead of just exporting it to clipboard like now.
Drag and drop support might also be useful.
I've already implemented it in my system.
You may review the modified code here.
Very nice. I'm pleased to read you 😀
Thanks for the 2 bug fix and for the feature "ready to paste"
I included them. Just have to do some more tests and i will release new version with theses fix/enh
I made some minor changes from your implementation (for example drop si done at the cursor drop position, instead of last cursor position)
Wow... I'm impressed. I managed to create this kind of program similar to SQL's "Query Analyzer" but without such a sophisticated interface called Z_QUERY_ANALYZER. Just simple text editor to write Open SQL and ALV Table to show the result.
The first version of ZTOAD was similar to your screenshot 🙂
Quite a fantastic tool. 🙂
Amazing job .. very useful. there was another tool ZSQL I was using earlier developed by another amazing programmer. Now I will use this 🙂
As i said on my blog, ZTOAD is born on the ashes of ancestors (Z_TETARD & YES4SQL). I see with your comments that there was a lot of ancestors... a lot of ashes 😀
Hello Raghavendra & Sebastien,
First of all thanks a lot to mention about my tool zSQL: A tool to execute SQL statements directly in sap
And congratulations to Sebastien, another wonderful tool for developers. ZTOAD seems so cool, it deserves five stars. Thank you for your effort.
thanks for that great tool, disabling the form routine where zspro is refered solved the problem
Very nice stuff, Sebastien, thanks for sharing!
I too have seen similar custom-built tools, but yours is the nicest I can remember.
Would you consider uploading it to github (or anything similar) so it would be easier for the community to report bugs, suggest changes, etc?
Thank you 🙂
I'm not very familiar with github, but as i understood, it's not really usable for abap. You cannot use directly your local fork of the project, need to upload into sap, do the changes and then download from sap to share the changes...
i think it's finaly simplier to use this blog or mine to share enhancement 😉
consider using Git client for ABAP - alpha release it will do the uploading and downloading directly from SAP, if your system is connected to the internet
"alpha release" ? 😀
I think i will continue to use SAPLINK for a while, it is a robust and "validated" tool 🙂
But maybe in few years...
Your tool looks great!
Is there a software license for the tool?
you could use it, enhance it, share it freely.
Just 2 requirements :
- if you enhance it, share me 🙂
- If you want to make money with it, then tell me before in MP 😉
could you please officially attach an open source license?
GPLv2 for example would be appropriate according to your requirements.
For legal requirements we cannot install any software without a license... 😉
Bonjour Sébastien HERMANN
il y a une nouvelle bonne page d'aperçu où tous les projets ABAP Open Source sont listés.
J'ai également téléchargé votre version de ZTOAD dans un dépôt.
Il est nécessaire de spécifier une licence. Je vous ai indiqué dans le README et j'ai sélectionné la licence "GPL-3.0 License".
Cela vous convient-il ?
Merci pour l'info. N'hésitez pas a me remonter les éventuelles modifications ultérieures.
Pour la licence, je n'ai pas eu le temps de me pencher dessus, je ne pourrais donc confirmer si c'est la bonne.
I have not yet looked at the code. But one question, is there any risk of harmful scripts being used with it, i.e. DELETE FROM VBAK, etc?
at the very begin of the code, you can define globally the pattern of allowed table for each SQL command (select, insert, update, delete).
You could also use a specific authorization object to restrict range of table allowed by user 🙂
1 user can have access to select on any table, insert/update on Z*, delete on ZTEST*
1 other can have access to select only on Z* table, and no access to insert/update/delete
A responsible company will never have such a tool in productive server.
It maybe useful for development issues, in integration systems it may be helpful for testing under live conditions. In productive systems, you will run into legal trouble.
Best regards, Clemens
As you can manage authorization, you can prevent all "riskly" operations. So there is no good reason to forbid this kind of tool on all productive servers...
for a limited population, with limited access, of course.
Or you have to delete also all admin transactions, as you can do some riskly operation with them !
SE14 can drop the content of any standard table, for example.
This is pretty much like Hovitaga OpenSQL Editor... http://www.hovitaga.com
The UI looks very similar. Congrats!
Actually, There are some similarities in the UI (Well, SAP UI options are pretty limited), but (at least for now) the Hovitaga solution is much more robust.
They seems to do a pretty good job and included many nice features.
The most interesting feature, in my opinion, is the queries pipelining ("Select for all entries in" syntax) option.
Hovitaga is very complete (wizzard, "for all entries" management...) and not free 🙁
But you are right, the look & feel is similar 🙂
For everyone who want to buy Hovitaga, you could test mine before and if it correspond to your requirement, give me only half of the price 😈
Wonder if it would work fine with the craziest queries from this blog 😀
A complete guide to OpenSQL statements - Step-by-step tutorial with screenshots
Nice tool, I'll check it later today!
A user give me a crazy query that make ZTOAD mad...
I released a new version to cure my son 🙂
- 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
Thanks to Shai Sinai for this 2 points
- Fix management of table alias
- Fix Issue with comment removing
- Add Ignore "into table" statement
- Add Ignore alias in field list
I have run the nugget for same but when I am activating Report 'ZTOAD' , I am getting Error as ' Type "ZSPRO" is unknown ' pls let me know how to resolve this error.
You just have to remove or comment all the subroutine where append the error. 🙂
One more comment regarding the authorization object:
How about replacing the 4 separate ID fields with standard TABLE, ACTVT fields?
AUTHORITY-CHECK OBJECT s_auth-auth_object
ID 'TABLE' FIELD lw_table
ID 'ACTVT' FIELD actvt_auth_display.
You are right, it's easier for developper point of view :
- easier to implement the auth object
The problem is ACTVT has a restrictive value list.
Which actvt choose for each allowed SQL statements ?
For the moment, there is no problem, the more accurate may be
* 01 - Create for INSERT
* 02 - Change for UPDATE
* 03 - Display for SELECT
* 06 - Delete for DELETE
Theses activity may be explicit for the 4 sql statements.
But the current design has been built to be flexible. In a future release i can add statements like create/delete index. How i will manage them in ACTVT ?
I agree that ACTVT isn't flexible, but I would prefer to stick with it.
I guess that In case of new supported statements, I would add additional field for object type: Table, Index, etc. (maybe DICOBJTYP).
Understood, you could easily replace the current authority check to use ACTVT / TABLE 🙂
Actually, auth object have all theses fields independants.
Your proposal fit more with sap standard auth strategy where all fields in an auth object are linked.
I can implement one or other in ztoad, your proposal is better because fit sap standard way.
I will probably add in the next release a "NATIVE" command to execute any NATIVE SQL command. In actual design, it will be a 5th independant parameter, no problem.
But it cause a problem with your proposal :
you will have 2 dependants fields (ACTVT & TABLE) and 1 field independant (NATIVE).
It's a pain to maintain auth with this kind of object.
The proper way is to use 2 auth objects : 1 for each set of dependants fields
Maybe you have a better idea ?
You can take a look at the row and column level authorizations of Hovitaga OpenSQL Editor here:
I think you cannot go further than this.
Thank you for the link 🙂
Hovitaga go very far in auth level for "classical" query. The probable target is to replace SQ01 and build reports.
ZTOAD go in another direction. This is an IT tool. As a tool, it must be the most usable as possible. I love having a lot of blades on my knife, even if each blade is less polished than an other knife 😉
So ZTOAD will not go down to line or column level on authorization. If you need this kind of thing, use (and pay) Hovitaga, i think i cannot do better 😉
But, for hovitaga team : we can ALWAYS go further. Why not add a time auth on line. For example : you can modify data only for 1 to 5 of the month, or you can modify data that is not older than XXX days... It make sense for some business ^^
There can always be more complex options which will require some smart adaptation (or even introduction of separate authorization object, as you've suggested) 🙂
Regarding your actual new option (Native SQL),
I'm not sure if you are planning to parse the SQL statement or just execute it.
For the second I would probably just add auth. check of DUMMY table and ACTVT 16 (Execute).
initialy, i think to parse one by one the allowed native command. (1 auth field for each command).
But... i'm afraid to forgot one very important command and be blocked in an emergency production problem, so i think i will package all native command in 1 auth field "NATIVE"
16 - Execute : is not really evident... but maybe could be acceptable.
Ok ok i could include the change in the next release...
Somebody think that its a bad idea ? have another idea ?
After running NUGG file, below dump i am getting, please let me know how to solve it.
Thanks in advance.
Have you installed the "TABLE" extension for saplink ? this is a mandatory prerequise 🙂
I'm getting dump while importing nugget file.
I tried to do the install on a fresh sap system :
First point is that the lattest saplink version is bugged on my older sap system. I cannot activate it.
Then, I used an older one, posted on 2014-10-10,
Install SAPLINK from SAPLINK_INSTALLER OK
Activation of SAPLINK OK
Install of DDIC extension OK.
Activation of DDIC Extension OK
Download of ZTOAD.zip OK
Unzip of ZTOAD.zip OK
Install of ztoad.nugg using ZSAPLINK OK
Activate table ZTOAD in SE11 OK (with warning)
Activate program KO : It was a too old sap version : i removed manually some too new syntax and then activation OK.
Maybe you missed ddic extension table Katrice ? Or your saplink is corrupted.
I will work to enhance ZTOAD compatibility with older sap system (but it's activation errors, not installation errors).
Following is my system config.
ok you run on a verry recent sap version.
But which saplink version are you using ?
Try another saplink version, older or newer... that's all i can tell you...
How to check the saplink version?
As they remove version info in lattest release... i dont know 🙁
If you run saplink. Does the title display version number or just "saplink" ?
It just shows as below
Following are the program attributes.
OK, no version info...
Have you installed DDIC extension ?
If no, it is mandatory and may be the cause of your dump.
If it is already installed... you could try this SAPLINK version :
Dont forget to install DDIC extension for saplink after installing this version.
There is a new 3.2.1 version which take all your feedbacks in account :
- Manage new SQL Syntax introduced by NW7.40 SP5
- Add All NATIVE Sql commands
- Auth object use now the sap standard way
- Automatic removing of useless INTO TABLE statement in query
- Default limit to 100 rows is now optional
and some bugfixs :
- 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
Thanks for the ongoing updates.
I've replaced the default internal "UP TO X ROWS" statement with a new button in our system:
I may share the code if you're interested.
you have lot of nice ideas 🙂
Which kind of element did you used to add this line ?
I understoud you splitted the screen, but not sure which kind of object you inserted... HTML ?
Actually, it's a small trick:
It's a simple standard toolbar with a standard button.
When you press the button an input popup is displayed.
OK please, send me the code, it could be usefull to add some other buttons 🙂
Here is the source code.
It includes also some other modifications.
There is a new version 3.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
Thanks again to Shai Sinai for his suggestions
For the next release of your tool I have the following Feature proposal: Code Completion 🙂
To implement it, just add the following lines of Source Code to FORM init_editor on line 1092 of ZTOAD program:
" Activate Code Completion and Quickinfo
DATA(lo_completer) = o_textedit->get_completer( ).
SET HANDLER lo_completer->handle_completion_request FOR o_textedit.
SET HANDLER lo_completer->handle_insertion_request FOR o_textedit.
SET HANDLER lo_completer->handle_quickinfo_request FOR o_textedit.
Afterwards, Code Completion shows up after pressing [CTRL]+[SPACE]
Wonderfull ! i didnt understood how to add it 😳
Done on the dev version, will be available in next release 🙂
great tool (again) Sébastien !
will make good use of this.
I have been using se16 & se16n for a long time out of convenience when putting solutions together - but this is handy for ad-hoc query or putting something together that will be more complex.
I would really like to see the native SQL conversion like you can with PeopleSoft SQL editor, in addition to the generated source code.
If there is one very slight negative is that SE16/n tool offers ability to look at possible entries with drop down fields on a selection screen upfront which at times is most useful.
Brilliant stuff! Very much like what I would want & expect from an SQL editor.
Thank you Steve 🙂
Nice idea, i will see if i can do something for you 😉
thanks for this wonderful tool!
One question though: when using the context menu to delete all items in the queries tree on the left side, it really deletes all entries disrespecting the current folder I've focused on.
For example I would like to delete history items only, I focus on the tree leaf "history" and select "Delete all" from the context menu. Instead of just deleting the sub-entries from "History" it too deletes my saved queries.
Could you please fix this in one of you next releases?
Sorry about that ! Its now fixed.
- Fix issue with delete all history context menu
- Add Code completion on SQL editor (Thanks to Benjamin Krencker for his code)
- Add Remove useless APPENDING TABLE statement in query
Thank you for the alert 🙂
I've another one: when using a statement like ...AND KZWI3 <= '23,00' I get a short dump about CONVT_NO_NUMBER. Of course it's clear what caused this exception, however, could you please enclosed the appropriate (generated) coding inside a try...catch..endtry statement and show it as an e.g. error dialog or perhaps a status message?
Today I got a GENERATE_SUBPOOL_DIR_FULL short dump, see attached image. Don't know exactly what I did before but anyway I was extensively testing (many executions) an SQL-statement without leaving ZTOAD at any time.
After some try, it seem that the CONVT_NO_NUMBER error is not catchable in this context...
If you find a working solution i take it 😉
The GENERATE_SUBPOOL_DIR_FULL dump is a standard process. SAP does not allow more than 36 generated subroutine. For ZTOAD it mean that you cannot execute more than 36 sql command during 1 run.
There are 3 solutions :
- i can count the sql and stop execution when 36 is reached
- i can rework a little to generate subroutine in an external memory area (with a submit)
- i can rework a lot to no more generate subroutine (with RTTS)
I think i will be limited in query design if i use RTTS. I will probably do the 2nd solution for a next release.
Vey good tool.. congratulations!!!
I've probably found a new issue with ZTOAD. I tried the following SQL statement, which runs fine inside a plain ABAP report but not within ZTOAD.
Sorry for posting an image <rant> but this damn SCN-editor does not allow pasting any code into this text box. I know this is a problem solely with IE but obviously SAP is not capable of fixing such simple things anytime soon </rant>
Anyway, when executing this statement, I get an error that the compiler could not interpret "4". Guess this is due to the above used CASE..WHEN '4'..END construct.
If I change the statement to WHEN status = 4, I get a new error: There is no component with name "CASE".
I'm running 7.40 SP8. Obviously ZTOAD has some problems with the new OpenSQL syntax I guess.
You are right. Sap introduce lot of new syntax in 7.40 and again in 7.50.
Theses new syntax elements are not managed by ZTOAD.
The only new syntax elements managed are :
- comma between fields in select part
- alias for fields
- @ for variables
I do no say that it is not possible to manage them. But i will no do it mainly because i have no access to a 7.40/7.50 sap system to test changes.
It's your chance to enrich the tool and share the code 🙂 .
very good job Sébastien.
Cool that there is a open source solution. I'm using http://www.cadaxo.com/content/en/products
since several years, for all my customers. It's really the best SQL tool I've every seen.
This tool support also the new SQL possibilities from SAP.
Thank you Markus 🙂
The tool you link is not free, like hovitaga. If you find customers that want to pay for this kind of tool, it's wonderfull !
All my tools are free and open source, and it will never change.
I have already received commercial offer for some of them, but i'm not interrested 😉
Very usefull. Thank you very much for sharing it.
Thank you very much for sharing this great tool.
Since working with SAP for the first time, I have searched for exactly this program 🙂
If I may help you with translating it to German, please send me a direct message in SCN and tell me how I could help you best.
Thank you for your suggestion. In fact i've not planned to deliver translated version (as English become, year by year, more and more mandatory in IT...)
But, if you want you can translate it in german easilly by using the sap standard translation mechanism.
Then simply use saplink to create a new nugget, include program ZTOAD and table ZTOAD 🙂
I published a version partly translated to german here:
ZTOAD 3.4.3 - partly translated to German
I tried to also get the dynpro and status texts to the nugget, but I did not know how to do it.
very nice sql editor, but one question, where can i find ZSPRO
ZSPRO is not mandatory, you can use ZTOAD without having ZSPRO (and without change any code in ztoad 😉 )
ZSPRO is another piece of my toolbox, not yet published here. It's a launcher/repository where you can centralize objects (program, tables, transaction, function module, IMG activity, class, url). For each object, you can execute, display documentation, search where it is used, display code/definition...
If you are interested, you can find it on my blog
The synergy with ZTOAD is that ZTOAD add in the top/right part of the screen (in the "sap table" tree) all tables defined in ZSPRO.
So if you build a repository of used tables in zspro, you can retrieve it in ztoad to help you to write quick query.
thanks for the post - and the tool!
You are probably right, but i'm not lawyer, and very bored by all this long text i dont understand.
To be clear :
- You can install and use ZTOAD
- You can modify and rename ZTOAD. If you think your modifications can be usefull to others, feel free to share your modifications here
- You can sell ZTOAD to customers. I just ask you to not lie to your customer and say that you are the owner of this program.
- As the program does not contain any malicious code, you are responsible of all damages done by the program. Before use, you can check and review the source code to be sure 😉
Check samples at https://gnu.org/licenses/gpl-howto.en.html 😎
I try to instal ztoad but does not exist CL_ABAP_PASER in my system. I just coment the code refer by lo_completion.
It´s work fine. Great job !
Thank you !
Great work, cheking the CL_ABAP_PASER problem I ended up adjusting a new version (3.5) wich i hope can be usefull and hope you revise to publish in your site.
The changes i implemented are:
The nugget with the source:
Thank you for sharing your code. Lot of things changed ! Very difficult to check the difference as you renamed all objects (variable ok, your naming rules, but why rename subroutine ???) and change order for some objects...
I do not create "copy/paste" program anymore since i've found SAPLINK 🙂
But when i did it, i used the same tricks you used (overwrite the selection-screen, use report variant table...). There are nice but stay dirty trick, less robust than true dynpro, true table, so i think it's better to keep the actual version regarding this changes.
For information, the function CONVERT_TABLE_TO_STRING you used doesn't exist on my sap system
I've scanned the code to find all other différences. I hope i've not missed one...
I will keep :
- New query button
- Move option button in main toolbar
- Adapt the default query to the limits defined for the user
- Change "exit without save" popup
- Refresh ddic tree when execute query, even if an error occur
- Remove confirmation popup on display code for no select statement
And merge theses changes to my local new version which contain some cool features !
I will also have a look on the CL_ABAP_PARSER "problem" but your solution reduce the number of allowed query by 1, so i'm not sure it's a good way in this case...
New version will be available here soon 😉
There is a new version of ZTOAD. Thanks to Patrick Prime Reinoso for many of theses changes.
Here is the changes :
* Add Value Help on DDIC field. Select a value to paste in editor
* Add Button Execute into file to download results instead of display it in ALV
* Use class CL_RSAWB_SPLITTER_FOR_TOOLBAR for creation of DDIC toolbar
* Refresh the DDIC tree when executing a query even if error found
* Remove confirmation popup on display code for no select statement
* Add Option to display technical name in ALV
* Move option button to main toolbar
* Rename subroutines (code cleaning)
* Allow save on exit popup
* Add New query button
* New query template changed
Very good work.. I installed and tested... the code is very clear...
I found small bus in your latest version 3.5
on lines 3259-60
s_customize-auth_insert shoud be s_customize-auth_delete
SPLIT lw_query AT space INTO fw_table fw_param.
TRANSLATE fw_table TO UPPER CASE.
IF fw_table = 'FROM'.
SPLIT fw_param AT space INTO fw_table fw_param.
TRANSLATE fw_table TO UPPER CASE.
IF s_customize-auth_object NE space.
lw_table = fw_table.
AUTHORITY-CHECK OBJECT s_customize-auth_object
ID 'TABLE' FIELD lw_table
ID 'ACTVT' FIELD s_customize-actvt_delete.
ELSEIF s_customize-auth_insert NE '*'
AND NOT fw_table CP s_customize-auth_insert.
sy-subrc = 4.
And on lines 1660-61
causes runtime error CX_SY_RANGE_OUT_OF_BOUNDS
lw_offset = ls_find_select-offset + 7.
lw_length = ls_find_from-offset - ls_find_select-offset - 7.
is fixed with
lw_offset = ls_find_select-offset + 6.
lw_length = ls_find_from-offset - ls_find_select-offset - 6.
Thank you for the report 🙂
Both points are now fixed in 4.5.1.
For the 2nd issue, i prefered check the lw_length value as i want to remove the space after "SELECT", so the +7 offset is correct.
Thanks for the new version, but when I try to install it SAPLINK abends:
Is my SAPLINK outdated or is it a corrupt ztoad nugget file?
PS installed the newest Version with the same result (the new version captured the exception if rootnode is initial, but same rootnode stays initial, Checked the nugg file and its is really a nugg file.
Could you please retry ?
I think it's an Unicode problem... I changed the format of the nugg into the ZIP, it may be ok now.
Thx, but now I cant unzip/extract the nugget:
OK, new package again, sorry
Could you please retry ?
By the way, your ZAL11 Nugget has the same issue. Notepad++ identifies the encoding as UC2 BOM, saving it as UTF-8 is doing the trick,
You are right. It's linked to a new tool i tried to implement... Fixed now for ZAL11, i have to check all other files...
When I import ZTOAD nugget in ZSAPLINK. It shows:
Plugin for object type TABL is not installed on this system
I can confirm I've installed DDIC extention. What's the reason?
Maybe you dont have activated the DDIC extension before import ztoad ?
Thanks a lot! I've activated DDIC extension in system. But I got another dump when I import ZTOAD nugg. Maybe it is because that somebody else has imported it before but failed which generated some data inconsistancy in system table. Do you know how to solve it?
possible, you could try to delete ZTOAD program and ZTOAD table in your system and restart import.
Maybe it is saplink that is broken. You could try to remove all saplink program and class, and recreate them, reactivate them and reimport the nugg.
About new syntax managment.
I plan to add "case" management this week end. Any other usefull command that you wish to see in ZTOAD ? (please give a query example 🙂 )
Down in the comments I posted a small bug I found in the program, maybe you could consider that for another release. Thanks again for this tool 🙂
Hi, very good tool.
But i can give you the idea for the next step.
The next step is to make it undestand dynamic SQL, because in different ABAP versions there are different restrictions for dynamic SQL, for example, dynamic SQL cannot handle subqueries like
select * from table where db_key in ( select distinct foreigh_key from other_table where some_field in range ). inner join here will produce duplicates .
also i think that removing duplicates by using DISTINCT also not allowed in dynamic sql, because it doesn't recognize field distinct.
I will look at your code and think about it , maybe when i will have sufficient time .
BTW do you have this source code on github ? You may use something like ABAPGit, the source code will be easily readable on github.
Also using ranges can be helpful too.
data: lr_date type range of table-created_at,
ls_date like line of lr_date.
ls_date-sign = 'I'. ls_date-option = 'BT' . ls_date-low = '20170101'. ls_date-high = '20170424'.
append ls_date to lr_date.
select * from table where created_at in lr_date.
I am trying to get the source of your tools, but unfortunatelly the given linkes doesn't work anymore. Is there any chance to still get them?
Sorry, my website was down partially last summer. It's fixed, you could retry 🙂
Thanks for sharing your work this tool is very useful. But, when using many aggregations in the select statement (MIN, MAX, SUM), sometimes the program ends with a dump. This is how I solve it, just in case. Maybe you can consider it in another release.
The select statement is this:
The dump was the following:
To solve this, its necessary to clear the variable “LW_STRING2” before the DO-ENDDO instruction (in the subroutine GENERATE_SUBROUTINE). This variable keeps the name of the tablefield. So, if you have more than one field with an aggregation, the program will take the first tablefield read in the SELECT statement and will give a dump.
Thanks a lot for your feedback and your detailed solution.
I will post a new version ASAP 🙂
New version released with your fix, thanks again Sabrina 🙂
I always get this error:
How can I fix it?
Thanks a lot
Your ZTOAD DDIC table is inactive.
Thanks a lot Sebastien for this wonderful tool.
Is there any possibility to add 'Number of Entries' feature like we have in SE16? The count shown in the ALV output at the last row is very useful but if the data is in millions it will be difficult to load the entire Data in ALV Output which might cause dump. If it is possible to add this feature, it will be useful in case of joins of multiple tables also..
Once again thanks a lot for this excellent and useful tool..
I think you may just use a SELECT COUNT(*) statement.
It looks like ZSAPLINK can no longer install the .NUGG package
It fails with the following runtime error
An exception has occurred which is explained in more detail below. The
exception is assigned to class 'ZCX_SAPLINK' and was not caught in procedure
"CREATE_PFSTATUS" "(METHOD)", nor was it propagated by a RAISING clause.
Currently there is no fix implemented for this program from http://saplink.org
possible solution here
so the solution may be to migrate over to use ABAPgit https://github.com/larshp/abapGit
From which SAP version have you got this dump ? I have never encountered this issue.
For the ABAPGit solution, it could be possible, only if it can be used 100% without any internet access.
I could switch to abapgit only if following requirement is meet :
– no need internet connexion (not always possible to have it)
– no need separate package for each application (not always possible to have creation autorization for a package…)
– possible to simply import/export objects, like with saplink (and possibility to select which objects !)
I quickly tested abapgit, and it seem that it does not meet theses requirements.:(
I checked deeper in the saplink code / fix.
Are you sure you are using the latest saplink version ?
Latest version can be found here :
This version should solve your dump as it have partial implementation of your link which fit 100% with the ZTOAD program.
I encountered the following error when importing ZTOAD using ZSAPLINK.
Am I missing any key components?
Thanks a lot.
It seems you are missing the SAPLink plugin for TABL (Tables):
Can we not limit it? Like ZSQLEXPLORER.
Thanks a lot.
I'm not sure that it's a good idea, but if you want to store more than the 100 last queries, simply modify the lw_number definitionin the repo_save_current_query form.
line 2994 :
To set the limit to 1000, change to : lw_number(3) type n,
limit 10 000 ? change to : lw_number(4) type n,
You can try "no limit" with a type string : lw_number type string (not sure that you will not have to change a little line 3051 / 3054 in this case)
Ok,let me try.
Thanks a lot.