Skip to Content
Technical Articles

ABAP in jEdit – Offline ABAP Editor

Do you also keep your ABAP snippets in some kind of ASCII-files using notepad or other editors to look them up? If you want to lookup your ABAP code when you are offline everything is displayed in one color (mainly black).

ABAP in eclipse can not be used to display ABAP code offline, because you are not connected to an ABAP project. That is because the pretty printing is done using the ABAP back end. Only in that way ABAP in eclipse is able to keep track of different ABAP versions.

So I was very happy to find out, that with jEdit – a programmers editor written in java – I can do keyword high lightning as well as folding and indention regarding a statement block.

Everything is controlled by a so called mode. It is a xml file which tells the editor, which are the keywords and how the folding and indention is done. Nathan Jones started with some small configuration. I added the keywords regarding ABAP 7.31 as well as folding and indention.

In the first picture you see a typical jEdit coloring. If you want the ABAP coloring, you have to adjust that manually in the settings, because the color itself can not be controlled by the mode.

Finally you have to edit the catalog file, which connects the file extension with the mode. I have chosen .abap as well as the ABAP in eclipse extension .asinc. You add your own. The abap.xml file you put in the main directory c:/programs/jedit/modes. There you also find the catalog.xml, which you have to edit.

What do you think. Is this useful for you? What are your experience with that solution? Do you know other editors to display/edit ABAP?

You must be Logged on to comment or reply to a post.
    • Hey Manish,

      from ur comment I think it is possible to maintain the ABAP code in pretty printing mode usin notepad++.

      But Can I do offline ABAP coding & maintain same in notepad++?

      • Hi Nikhil

        Pretty printing is different.

        Pretty print takes care of uppercase/lowercase and code indentation, whereas syntax highlighting is to apply color to keywords, operators, literals, comments.

        ABAP Editor applies syntax highlighting on presentation server, whereas pretty print needs help from application server.

        Text editors like jEdit and Notepad++ will apply syntax highlighting. They can also help in auto indentation, but not lowercase/uppercase conversion.

        When you see highlighted code in Notepad++, it is a text file, and you can add more code to it. New text will be highlighted automatically.

  • I can not compare to notepad++, but if somebody wants try alternative I use PSPad 🙂

    Even though it is lightweight and portable, it has many usefull functions. I really like its "code compare" function which shows side by side 2 codes with easy to spot differences highlight.

  • Today I installed jEdit and tried to apply the edit mode.

    For some reason, system did not allow me to edit the Catalog file, not from Notepad++, jEdit or any other editor even when jEdit client/server was not running. I renamed it to catalog2, and editor was not able to save changes. There was something about the modes directory. I copied the catalog file to desktop, added the ABAP specific line, saved and then copied the modified file to modes folder, it worked.

    After applying the mode, i was able to get highlighting just like your screenshot.

    jEdit definitely has much more options than Notepad++.

    And the edit mode has much more options than Notepad++ UDL.

    Thanks to you, I'll try using jEdit when Notepad++ is unable to do the job and VI is too scary to work on.

    In the process I noticed that multiple types of keywords can be defined in edit mode. (keyword1, keyword2, keyword3), each having different color according to color scheme.

    However, the New ABAP Editor has only one color for any keyword.

    Menu > Utilities > Global Options > Syntax Highlighting can be used to redefine the color mappings, so that the look-and-feel of code gets closer to New ABAP Editor.

    Since the syntax highlighting setting is global, the changes would mess up the look of other file types too.

    To counter this, I tried using Editor Scheme plugin. Theoretically, it should be able to create abap specific color scheme.

    Practically, opening the Scheme Editor results in BeanShell exception java.lang.NumberFormatException. In future I'll try the steps on a newer version of jEdit/EditorScheme.

    EDIT: Could you please point me to profile of Nathan Jones?

  • Hi

    I'm the Nathan Jones of the Jedit plugin fame. - Hello.

    I "borrowed" the initial set up from VI module that was lurking about.

    I no longer use JEdit and so I've not revisited this for a long while.

    Thanx for the mention though.


    PS yes I am a coder and unfortunatly the song isn't about me 😆