SQL Cockpit User Guide - Cadaxo GmbH sql... · x SQL Cockpit 2.1.0 – User Guide Page 3...

12
x SQL Cockpit 2.1.0 – User Guide Page 1 SQL Cockpit – User Guide Version 2.1.0

Transcript of SQL Cockpit User Guide - Cadaxo GmbH sql... · x SQL Cockpit 2.1.0 – User Guide Page 3...

x

SQL Cockpit 2.1.0 – User Guide Page 1

SQL Cockpit – User Guide

Version 2.1.0

x

SQL Cockpit 2.1.0 – User Guide Page 2

Table of contents

Introduction ............................................................................................................................................. 3

User interface ......................................................................................................................................... 3

Toolbar ................................................................................................................................................ 4

SQL entry Panel .................................................................................................................................. 5

Which SQL commands are supported? ......................................................................................... 5

Multiple SELECTs ............................................................................................................................ 6

Tagging a section ............................................................................................................................ 6

Comments ....................................................................................................................................... 6

Information panel ............................................................................................................................... 7

Starts screen ................................................................................................................................... 7

Results ............................................................................................................................................ 7

My History ....................................................................................................................................... 8

Jobmonitor ...................................................................................................................................... 8

Saved Lists ...................................................................................................................................... 9

Saving Lists ..................................................................................................................................... 9

Import and export of lists ............................................................................................................... 9

Add lists to result set ...................................................................................................................... 9

Symbol Panel ...................................................................................................................................... 9

Clipboard – place for your notes ..................................................................................................... 10

Personal settings .............................................................................................................................. 10

Column header ............................................................................................................................. 10

ALV result list ................................................................................................................................ 10

Trace .............................................................................................................................................. 11

Window orientation ...................................................................................................................... 11

Symbols ......................................................................................................................................... 11

Editor ............................................................................................................................................. 11

Initial date selection ..................................................................................................................... 11

Variants ............................................................................................................................................. 11

Saving variants ............................................................................................................................. 11

Selecting and managing Variants ................................................................................................ 12

Copyright ............................................................................................................................................... 12

x

SQL Cockpit 2.1.0 – User Guide Page 3

Introduction

Thank you for selecting the SQL Cockpit of Cadaxo. You have, in your hands, a powerful tool that

will support your development operations and support teams. Furthermore you can construct

incomparably quick and simple analyses with the help of the SQL Cockpit.

With this documentation we want – based on our slogan „…there is also a simple way“ – to

introduce the usage and possibilities of the SQL Cockpit.

Sometimes complex issues can be explained simpler and easier by videos, that is why we made

several tutorial videos available on our homepage.

Vielen Dank, dass Sie sich für das SQL Cockpit von Cadaxo entschieden haben. Sie halten nun ein

mächtiges Tool in der Hand, das Sie bei Entwicklungstätigkeiten und bei Supportaufgaben in

Zukunft unterstützen wird. Außerdem können Sie mit Hilfe des Cadaxo SQL Cockpits nun

unvergleichlich schnell einfache Auswertungen erstellen.

In dieser Dokumentation möchten wir Ihnen nun – frei nach unserem Motto „ … es geht auch

einfach“ – die Verwendung und die Möglichkeiten des SQL Cockpits näher bringen.

Manchmal können komplexe Sachverhalte durch Videos einfacher und leichter erklärt werden,

deshalb haben wir auf unserer Homepage mehrere Tutorial Videos bereitgestellt.

User interface

We put a lot of thought into creating a simple, intuitive user interface. After the selection of the

SQL Cockpit with the transaction /CADAXO/SQL you reach the central user interface of SQL

Cockpit:

Wir haben uns viele Gedanken über ein einfaches, intuitives Userinterface gemacht. Nach dem

Aufruf des SQL Cockpits mit der Transaktion /CADAXO/SQL gelangen Sie in die zentrale

Benutzeroberfläche des SQL Cockpits:

x

SQL Cockpit 2.1.0 – User Guide Page 4

The desktop is broken down into four areas. The limiters of these areas are flexible; you can

adapt their size to your needs. The SQL entry panel and the information panel are always

displayed. The symbol panel and our clipboard can be displayed/hidden via a button .

Toolbar

We took great care in the design of the toolbar to ensure a clear structure. Following is an

overview of the functions:

back, forward

Within a transaction the Cockpit keeps track of

every SQL command. With this navigation buttons

one can navigate between the executed SQL

queries.

Syntax check

Conducts a syntax check of the entered SQL

command. The syntax check is also made implicitly

at every execution.

Execute

With these three buttons the SQL commands are

executed. The first one starts a normal processing.

For an execution with progress display, choose the

second button and for background execution the

third one.

Lists

The displayed list(s) can be saved in SQL Cockpit

for future use.

SQL Trace

With this function the ABAP SQL Trace can be

activated. As soon as it is activated, every

executed SQL command is logged.

Variants If you often work with the same or similar SELECT

x

SQL Cockpit 2.1.0 – User Guide Page 5

statements, these can also be saved and re-used

as variants. Private and global variants can be

compiled. Global variants are available to other

users.

Templates

With this function different objects like reports can

be generated on the basis of the SQL statement on

the basis of templates. Templates are offered as

add-ons to the SQL Cockpit.

Settings

With the first function every user can adjust their

personal settings, the second function is available

for admins only.

Feedback mail

You want to let us know about comments, wishes

or complaints? With this button your mail client is

opened, a Cadaxo e-mail recipient is preloaded

and the relevant SQL command included into the

mail body.

Hilfe Directly opens the SAP standard help for SELECT.

Complex statements can be structured new by the

Pretty Printer.

SQL entry Panel

In order to enter different SELECT statements, the SQL entry panel is at your disposal. To simplify

your SQL entries and to create a simpler layout, we have integrated the new modern SAP ABAP

editor. Some useful features are the syntax detection of commands (when you enter an I after a

table name, “INNER JOIN” is recommended immediately, which should be the next command)

and colour coding of key words (SELECT, FROM,…)

Furthermore we built in the forward navigation which is known from other areas of SAP systems.

With a double click on the table name you are directly navigated to the data dictionary (SE11)

Which SQL commands are supported?

The entered SQL statements are to be entered in SAP’s own Open SQL. Thus the queries can be

defined independently from the database behind. The syntax of the entered command has to be

formatted as it would be in an ABAP program. Thereby only SAP commands that are permitted in

ABAP programs (e.g. UNION commands or other database specific information cannot be

interpreted) are allowed.

Some peculiarities have to be regarded at notation. (Brackets, ~, full stop after statement):

SELECT count( distinct a~kunnr ) as zz a~name1

FROM kna1 as a group by a~name1.

x

SQL Cockpit 2.1.0 – User Guide Page 6

Something that would immediately catch a developer’s eye is that the INTO part is missing. The

SQL Cockpit undertakes the construction of the INTO part and the user need not worry about it.

If you have problems with the notation, consult the respective SAP help (via the toolbar) or visit

our homepage www.cadaxo.com. There we will place different problems in the area “tips and

problems”.

The SQL Cockpit supports the whole range of possible SQL SELECT queries: SELECTs, JOINs,

aggregate functions, Sub-SELECTs, Having, Order, DB-Hints, BYPASSING BUFFER, DISCINCT, … - 2

limitations do exist:

- No modifying SQL statements like INSERT, UPDATE or DELETE can be entered.

- Because of security reasons the explicit statement of a client with CLIENT SPECIFIED is

prohibited.

Within a SQL Cockpit session you can only conduct 35 queries with Sub-SELECTs. Unfortunately

this is a limitation of the SAP Basis Releases for dynamic calls.

Multiple SELECTs

One of the big advantages of the SQL Cockpit is the possibility to conduct and display more than

one SELECT at a time. The number of displayed result sets is therefore only dependent on the

screen size.

Multiple SELECT statements are to be separated with a “.” (full stop) as would be the case in

normal ABAP. Unlimited parallel SELECTs are possible. When working with large result sets one

should bear in mind the memory consumption.

Tagging a section

As soon as you tag a section in the SELECT panel, this section will be executed if it is syntactically

correct. The tagging can also be extended to include several SELECT statements.

Comments

Similar to the normal ABAP editor, comments can be used. Lines or areas that are commented

out are ignored during execution.

This is especially useful when working with document variants.

x

SQL Cockpit 2.1.0 – User Guide Page 7

Information panel

Below the entry panel you see the information panel. It is broken down into five sections: start

screen, results, my history, job monitor and saved lists. After starting the SQL Cockpit the start

screen is displayed with some helpful information. With buttons above the information panel you

can change into the four sections:

Starts screen

Besides some information on the usage of the SQL Cockpit you also find the current release notes

and their documentation on the start screen. You reach those via the respective links in the upper

area of the screen.

Results

After executing one or more SQL statements the SQL Cockpit automatically changes into the

result area and displays the lists.

The arrangement of result windows when conducting several concurrent queries can be adjusted

in the personal settings. The results can be presented one below the other, next to each other or

as matrix like in the illustration above.

Every result list consists of a toolbar, a header

with information about the number of hits or

duration time and of the ALV Grid with results.

The toolbar offers different possibilities for interaction and processing of the results. For example

the list can be printed, exported into a file or searched for a string. For value or amount column

sums, means or averages can be calculated.

With the refresh function the SELECT statement for the selected list can be re-executed.

x

SQL Cockpit 2.1.0 – User Guide Page 8

Via drag & drop or double click, values from lines can be copied to the editor area or to the

clipboard. The double click function can be activated in the users’ personal settings. A double

click on the column header adds a column name to the current position in the editor.

My History

All executed SELECT statements are logged by the system and can be displayed in this area.

Additionally, the result size and duration time of the SQL statement are displayed. A green light in

the status column shows that the command was executed without any errors, whereas a yellow

light shows that the SQL command is still being processed or was not executed successfully. The

last column informs if the command has been conducted in dialogue or batch.

Like the list of results, the SELECT statements can be copied to the editor area per drag & drop or

per double click.

In the personal settings it can be defined how many days should be displayed in the history by

default. With the button preset date filter can be changed.

Jobmonitor

The job monitor informs about SQL queries which have been started in the background. In the

status column it is shown if the job is still ongoing or already finished. As soon as a job is finished

a button appears in the second last column with which the list of results can be displayed. Similar

to the section My History, it can be defined in the personal setting how many days are displayed

by default. With the date button in the toolbar the date filter can be changed.

Jobs & lists which are not needed anymore can be deleted with the delete button.

x

SQL Cockpit 2.1.0 – User Guide Page 9

Saved Lists

In this section you find an overview of all saved lists. Every user can only see his own lists.

Additionally to his own manually created lists, lists that were created with batch jobs are also

displayed.

Saving Lists

Saving a list is very simple. As soon as one or more lists are displayed, the

„Save List“ icon becomes active. When executed, a pop-up appears in which

you have to specify a description for the list.

Important information about the lists is saved and is visible in the overview, e.g. creation date and

time, size in kB and system information

Import and export of lists

It is also possible to import or export saved lists. To do so the following buttons are used:

Therewith it is also possible to import

lists to another system. All metadata

is copied along with the lists. Thus, not only is the sorting and sums included, but the metadata is

used for the display of the lists, in case the dictionary objects may have changed between the

systems (e.g. data elements) or are non-existent.

Add lists to result set

With the following button the list(s) are added to the result set.

Symbol Panel

In this section symbols can be defined, which

after that, can be used in your SELECTs. For

example a new symbol MY_SYMBOL can be

created and be referred to in the SELECTs.

x

SQL Cockpit 2.1.0 – User Guide Page 10

Besides your own symbols system symbols are also at your disposal. The content of system

symbols are fetched at the time of execution. The currently available system symbols can be

displayed with the button .

Symbols can also be inserted with drag & drop from the symbol panel into the SQL editor panel.

Clipboard – place for your notes

In order to keep comments or notes we created our

clipboard. The clipboard can be displayed or hidden.

Cell content of result lists can simply be copied via drag

& drop into the clipboard. The content of the action is

added at the beginning of the note in the form of: Field

name …. Field content

The clipboard is saved after every user interaction. The content is also at disposal after log out

and restart of SQL Cockpit. With the delete button on the left-hand side the clipboard can be

emptied.

Personal settings

In order to adapt the behaviour of the SQL Cockpit to

your own needs, several different parameters can be

set in the personal settings.

Column header

Field name or field text: When constructing complex

queries the technical field names (e.g. KUNNR) may

be advantageous. On the other hand, when using

completed queries and variants (typically by end users) the field terms (e.g. Debtor) could be

more helpful.

ALV result list

The settings in the area of the ALV result list influence the behaviour and the output of results. If

Show Result Buttons is deactivated the toolbar is not displayed above the list of results. If you

want to work with the content of the list of results in order to change your SQL statement, then

you can – if the setting Double-click is activated – immediately take on the field value by a double

click to the cursor position in the editor. With Use conversion exit you determine if the conversion

exits (automatic conversion of field values to DB level) should be factored if the “real” value

should be displayed.

x

SQL Cockpit 2.1.0 – User Guide Page 11

Trace

With the trace section it is determined if the DB SQL Trace and/or the Tablebuffer Trace is to be

activated when the SQL Trace is switched on. The Tablebuffer Trace logs access to buffered

tables.

Window orientation

The arrangement of result windows of several SELECTs is defined in the section Window

Orientation. The analysis sheets can be issued vertical, horizontal or as matrix.

Symbols

The section “Symbols” define if the symbol panel or the program symbols are displayed initially.

Editor

The following options are available:

Front-End Editor (new)

Front-End Editor (old)

Editor SE80 User-Specific Settings

Front-End Editor (new) Front-End Editor (old)

Initial date selection

The initial date selection for the sections my history and job monitor can be pre-set here.

Variants

In order for same or similar queries not having to be entered repetitively, there is the possibility to

save a SQL query as a variant for reusability.

Saving variants

As soon as you select the function „Save Variant” in the header toolbar, a pop-up appears into

which the following information has to be entered:

- Variant unique name of variant

- Description short description

- Group group allocation

- Global private or public

x

SQL Cockpit 2.1.0 – User Guide Page 12

The available groups are set by the administrator. If no group is selected the version is

automatically assigned to the group [no group]. By activation of “Global” all other SQL Cockpit

users have access to that variant.

Selecting and managing Variants

With this function you can select variants and transfer it to your editor.

Additionally, you can use Drag&Drop to move it into your Favorites folder.

In the context menu in the variant tree the following options are available:

- Remove Favorite Remove a variant from the Favorites folder

- Make Public/Private Set the status of the variant to Public or Private

- Delete Variant Permanently delete a variant

- Add to Transport Request Add a variant to a transport request

Copyright

© 2009–2014 Cadaxo GesmbH. All rights reserved.

Reproduction or translation of this documents or parts of it is not permitted without explicit

permission of Cadaxo GmbH.

SAP®, ABAP™, R/3®, SAP NetWeaver® are brands or registered trademarks of the SAP AG.

All other products are brands or registered trademarks of the respective companies.