Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
balazs_takacs
Advisor
Advisor

In some ABAP Support Packages the SQL Editor of DBACOCKPIT will show a right-aligned output.

SAP Note 1969700 (section 'The output is right aligned') respectively 3343639 describe the reason and solution for this from ABAP aspect.

The aim of this post is to present an instant workaround to convert the output to a kind of "human readable" format.

The SQL statement referenced here is a statement from the statement collection attached to the SAP Note 1969700.

I am using Notepad++ as a freeware text editor.

....

When you run a statement via the SQL editor of DBACOCKPIT and you get an output like this:

before_01.png
before_02.png

You might be struggling to read the columns and the values in the right way.
To get this right I usually:

  1. Export the output from the SQL editor to the clipboard
    export.png      export_into_clipboard.png

  2. Paste the copied output from the clipboard to a new text file in Notepad++.

  3. Check which lines I want to have left aligned.

  4. Select the first character of the lines in question and delete them
    select_and_delete_fisrt_char.png
    You can achieve this by using Alt + Mouse cursor (to select column vertically)

  5. Once you have deleted the first character and there are only spaces you can use the
       'Trim Leading Space'
    option.
    trim_leading_space.png

  6. The result looks like this:
    after_01.png

It is not a big deal but helps me every time.

Hope it helps some of you too.