Cadaxo SQL Cockpit Report Generation

Cadaxo SQL Cockpit Report Generation

One important (and cool) feature of SQL Cockpit is an ability to auto-generate ABAP reports directly from the SQL query entered in the cockpit.

We illustrate below, one example of how this may be utilised

As you can see from the code snippet and screenshot below, suppose we want to generate a report output that executes a relatively complex select query :

If you want to generate SAP report that executes this query, it would be a tedious and repetitive work to create a report manually in ABAP. Report generation feature of SQL Cockpit makes this work much simpler and quicker as illustrated below (We have implemented customer requirements with many more fields and complex select query that pulls data from upto 10 database tables!).

After executing the SQL query, just click on the highlighted „Template“ icon and „Select Template“ textbox appears

Choose an ‚advanced‘ option in the screenshot above.

We are taken to the Report Template Wizard

Click on the Continue button

Enter the report name, description, and other optional information. Note that „Tabular Selection Blocks“ checkbox to generate multiple tabs on the selection screen is selected. Continue to the next window

As shown below, we get a list of selection screen field options, (also auto-generated from the WHERE condition of the SQL query 🙂 )

As shown above, we have three options…

  1. create a selection screen field with an auto-populated value from the SQL where condition
  2. create a selection screen field without an auto-populated value from the SQL where condition
  3. Select query of a generated report will contain hard-coded value from the SQL where condition

Click on Continue button again after making your selections from one of these options

Finally, a generate report option is presented along with a list of specified report parameters in the previous step as seen below

Click on the Generate Report button

Select package as applicable and we are done.


A generated report can be viewed / executed in SE38 like any other custom report.

Note the selection screen as seen below (with different selection screen tabs for fields from different tables)

Here is a screenshot from the select query (that was also auto-generated, of course 🙂 )

As highlighted in the screenshot, one of the where condition was created with a hard-coded values from the select query („Wien“) as per the selection in the report generation template!

Conclusion: we can auto-generate complex SAP reports using SQL Cockpit in less than 15 minutes! We can even customize special features based on individual client requirements.

This saves a lot of a lot of repetitive work for programmers and power users 😉

Domain Text Feature in SQL Cockpit

I don’t see the domain description in the result SQL statement screen? What should I do?
The solution is very easy in our SQL Cockpit, there is an user setting with which the user can see not only the fixed value, but the description of the value itself. There is no need to manual check the description, in case it exists it is displayed in the result screen.

The “Business partner category“ domain contains the following values entries in the Value Range tab. In a simple standard SQL statement selection the description it is not displayed as a part of the selection query, so the user should manually check the value.

Executing a simple select statement with multiple parameters (Partner, Type) from “Business Partner: General Data I“ table.

Second column values comes from the first data element domain. The name of the new field is a generated value. It can be used also with the Column Header: “Fieldtext“ and “Show alias in header“ functionality from the user Personal Settings, which allows the user to customize the result list header name.

Personal Settings
On the SQL Cockpit main screen the Personal Settings button is highlighted.

If the user wants to use the Domain Text functionality must tick the “Add Domain Text” checkbox. It is saved permanently (after the system log off as well), in case of it is not needed anymore should be unchecked after the use.