Although ABAP and ABAP CDS are rather self-explaining some of you still tend to use F1 on ABAP or ABAP CDS keywords in the ABAP Workbench and/or ADT. Then, wondrously, the ABAP Keyword Documentation appears, and if you’re lucky, you directly find what you searched for (of course that kind of context sensitive help is overrated; in HANA Studio, you boldly program without such fancies). But since it still seems to be used, one or the other improvement is also done for the ABAP Keyword Documentation. (B.t.w.: What are the most commonly looked up ABAP statements? –  SELECT, READ TABLE, DELETE itab).

Full Text Search in ADT

In the SAP GUI version of the ABAP Keyword Documentation you can carry out an explicit full text search since long. When calling the documentation by transaction ABAPHELP or from SE38 you find the respective radio button:

/wp-content/uploads/2015/11/adoc1_837894.gif

From the documentation display you can also explicitly call the full text seach by selecting Extended Search:

/wp-content/uploads/2015/11/adoc2_837905.gif

Not so in ADT (Eclipse). In ADT the so called Web Version of the ABAP Keyword Documentation is used. That’s not the one you find in the portal but one that can be reached by an ICF service maintained in transaction SICF and that you can also call with program ABAP_DOCU_WEB_VERSION (of course the contents of all versions are the same, only the display and the functionality of the displays differ, with the functionality of the ADT version coming closer and closer to the SAP GUI version).


Up to now, the Web Version used in ADT started with an index search and only switched to full text search if nothing was found. With ABAP 7.50 you can call the full text search in the Web Version and in ADT explicitly. Simply put double quotes around your search term:


/wp-content/uploads/2015/11/adoc3_837907.gif

So simple. Furthermore, you can continue searching in the hit list of an index search:


/wp-content/uploads/2015/11/adoc4_837917.gif

A piece of cake! Wonder why I had waited so long to implement it. The next one was harder.



Special Characters in Syntax Diagrams

In good old times, the special characters { }, [ ], |  had no special meaning in  ABAP. Therefore, they were used with special meanings in the syntax diagrams of the ABAP Keyword Documentation, denoting logical groups, optional additions and alternatives. This has changed since string templates. Mesh paths and of course the DDL of ABAP CDS are other examples.


This resulted in syntax diagrams, where you couldn’t decide which special characters are part ot the syntax and which are markups, e.g. embedded expressions:


/wp-content/uploads/2015/11/adoc5_837919.gif


After some complaints from colleagues (customers never complain, almost). I changed that and use another format for markup characters from ABAP 750 on. Embedded expressions now:

/wp-content/uploads/2015/11/adoc6_837941.gif


A small step for mankind, but a large step for me. Why that? I had to check and adjust about eighteen thousand { }, [ ], | characters manually arrrgh! Couldn’t figure out a way of replacing them with a program. The results are worth a look.


Maybe it takes a little getting used to, but my colleagues didn’t complain any more. Time for customers to complain? Any suggestions regarding the format? Now I have only a few lines of code to change in order to adjust the format of all markup characters in one go …


To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Sandra Rossi

    Horst, I’d like to complain that the public grammar should be set up by the SAP “compiler” team (the grammar that the compiler really uses), with also a public class to nicely parse the code better than the existing (AFAIK) lexers 😉

    (0) 
    1. Horst Keller Post author

      Sandra, if I understand you right, you propose that the keyword documentation´s syntax diagrams are generated from compiler resources and the info developer only adds the documentation?

      Yes, I´d like to have that too, but its not so easily possible, especially, if one wants to split the documentation into senseful sections.

      Some years ago we gave it a try with the generated syntax diagrams that you find by selecting the icon close to the headings of keyword chapters of the documentation in SAP GUI. The basics of those come from the compiler team. Unfortunately they are not supported any longer and are getting out of date. I switch them off one by one in the moment a statement gets new additions.

      (0) 
      1. Sandra Rossi

        It was more a hope than a real request 😀 I understand “easily that it’s complex” (the ABAP grammar must be one of the most complex in all languages I know); it’s interesting to know that you tried to do it several years ago. I wish you a lot of courage for all these future additions !

        (0) 

Leave a Reply