Skip to Content

Searching within the whole source code repository of the ABAP system was never so easy as it is with the ABAP development tools for Eclipse. With the new version ADT 2.19 which is available since a couple of weeks we offer you a new search console in eclipse. With that feature you can search for arbitrary code snippets and navigate to the related development objects in the editor.  

Feature is only available on AS ABAP Systems >= 7.40 SP05. As we are using the HANA Textsearch engine this feature is only working when HANA is your primary database of your ABAP system.

In this video you will see how you can use the new ABAP Sourcecode Search:


Remark about the memory consumption:

Enabling the ABAP Source Search will cause an increased memory consumption in the respective system. The required full text index will consume at least one but regularly several GBs of additional memory, so ensure that the system can provide the needed space!


Before you start you have to enable your backend system for the feature:

In order to enable the ABAP Source Search, you need to switch on the business function SRIS_SOURCE_SEARCH. To be able to do that, you need activation authorizations in the Switch Framework (authorization object S_SWITCH, activity 07). Open transaction SFW5, expand the ENTERPRISE_BUSINESS_FUNCTIONS node and look for the SRIS_SOURCE_SEARCH business function. Switch on the checkbox in the column ‘Planned Status’ and press the button “Activate Changes”. The activation process will take place in a background job. Please check transaction SM37 for the progress.

/wp-content/uploads/2014/01/10_09_sfw5_source_search_370160.png

Remark:
The index activation may be finished within seconds, but please be aware, that the indexing takes place asynchronously and may take up to several hours. You can also use report SRIS_CODE_SEARCH_PREPARATION in order to check the status. It also checks another index on the TADIR table which is under normal circumstances updated regularly with the where-used index. If this TADIR index is incomplete, you can schedule an index rebuild also with this report.

/wp-content/uploads/2014/01/10_09_check_report_370161.png

Have Fun with the new feature !

Kind Regards,

Thomas.

To report this post you need to login first.

21 Comments

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

    1. Thomas Fiedler Post author

      Hi Christian,

      not yet. But with the next version you can restrict the search to packages, object types (e.g. only classes) and to compilation units (e.g. searching only in a specific report or function group). It is like in google when you restrict the search for a specific web site via the addition “site:www.sap.com”.

       

      Regards,

      Thomas.

      (0) 
      1. Guilherme Dellagustin

        Hi Thomas,

        Is the activation of the switch SRIS_CODE_SEARCH_PREPARATION client dependent?

        I asked my IT contacts to activate it and they asked me in which client to do it.

         

        Best Regards.

        (0) 
        1. Sebastian Wolf

          Hi Guilherme,

           

          the business function is not client dependent. So it doesn’t make a difference in which client the activation is performed. It will become active in all clients afterwards.

           

          Best regards, Sebastian

          (0) 
    2. Daniel Ruiz

      Hi,

       

      depending on the package size, you can just add it as favorite and use load full package content (will download to eclipse virtualfs) and you can use the normal eclipse search functions on your workspace.

       

       

      D.

      (0) 
      1. Thomas Fiedler Post author

        Hi Daniel,

        this only works when the development object have been loaded in the editor already.

        Only then the source is cached on the local client and the local search works.

        But for me it is not a recommended workaround.

         

        Regards,

        Thomas.

        (0) 
        1. Daniel Ruiz

          Hi Thomas,

           

          This is no workaround, this is how the search is supposed to work in Eclipse – It is no different than checking out Java Projects into the workspace and searching then.

           

          Also, this was a response to someone asking how to search in a given package – I find this very suitable, and the problems could be around BIG packages; – which in fact resumes to bad design from SAP, but this is a different topic.

          (0) 
  1. Peter Inotai

    Hi Thomas,

     

    What is the SP level requirements for the ABAP backend?

     

    Just checked in our ERP 607 system with ABAP 7.40 SP004, but couldn’t find SRIS_SOURCE_SEARCH.

     

    Is it only available with SP005?

     

    Thanks,

    Peter

    (0) 
  2. Freek Cavens

    It would have been nice if you had mentioned that the feature is only available for systems running on HANA.  I activated the switch, ran SRIS_CODE_SEARCH_PREPARATION and got :

    ‘Hey there! Get a HANA, get the search!’

    I then read the switch release information and there I found that this only works on HANA.

    We recently upgraded to 7.40 SP05, so I thought this would be a very nice feature.  Guess not.

    Regards,


    Freek

    (0) 
    1. Christian Dr. Drumm

      Hi Thomas,

       

       

      you you should really update the blog with the information that the feature is only available on HANA. I also activated the function before noticing its HANA-only.

      So I’ll have to continue using the good old RS_ABAP_SOURCE_SCAN

      Christian

      (0) 
  3. Markus Karsch

    Hi all,

     

    this is to inform you that after activation of this business function in our ERP EHP7 the HANA (latest patchlevel 92) database grew over 90GB. For example REPOSRC disk usage increased from 5,5GB to over 44GB and indexing was still running for new fulltext index SRC. I’m not sure if it’s a bug somewhere because we deactivated business function after we noticed the growth.

     

    Regards

    Markus

    (0) 
    1. Sebastian Wolf

      Hi Markus,

       

      unfortunately, this is not a bug as the required HANA full text index for such a big REPOSRC table just requires that amount of memory.

       

      We are currently evaluating on how we can address that. Sorry for the inconvenience!

       

      Best regards, Sebastian

      (0) 
      1. Markus Karsch

        Hi Sebastian,

         

        thanks for your reply. Unfortunately I only read about 10GB in documentation of business function and for example note 1918229. Maybe it should be mentioned that this index for a normal ECC EHP7 takes a lot more diskspace in HANA.

         

        Regards

        Markus

        (0) 
      2. Marcin Ozdzinski

        Hi Sebastian

        We encountered exactly same problem with extra space consumption.

        Is it possible to turn off this function and release to previous memory consumption level ?

        Is it enough to switch off SFW5 ? Should we also delete some indexes in HANA ?

        Best regards

        Marcin

        (0) 
        1. Sebastian Wolf

          Hi Marcin,

           

          yes it’s absolutely sufficient to switch off the business function via SFW5 again. The system will remove all HANA indexes automatically and you should have the same memory consumption as before.

           

          Best regards, Sebastian

          (0) 
        2. Markus Karsch

          Hi Marcin,

           

          it is enough to reverse the switch in SFW5 and objects in HANA will be deleted, but diskspace is still allocated (and will be reused). To free diskspace you unfortunately need to do a restore.

           

          Regards

          Markus

          (0) 
  4. Marcus Müller

    Hello Thomas,

    we also noticed a relative high memory consumption after activating this very nice BF. We need the search function only in our development systems, not in Q or P systems. Within SFW5 it is not possible to keep this function from being transported to Q and P Systems. (It will be transported next time another BF will be transported!).

    Is it possible to switch off indexing in Q and P systems while BF is active, but keeping it active in D systems?

    Regards

    Marcus

    (0) 

Leave a Reply