Skip to Content

This is the third blog of the blog series about Remote Code Analysis in ABAP Test Cockpit (ATC).

See also blogs:

Working with Baseline – Live Demo

If you are interested in the live demonstration of working with baseline watch this YouTube Video on abap channel

 

Baseline concept – Focus on new or recently changed code

This problem knows almost everybody, who takes care of code quality in the SAP system landscape. At the latest you get in touch with this problem as soon as you run ATC for your whole custom code. Then you will namely get very many findings especially if you apply all standard checks like naming conventions, SLIN checks, performance checks, security checks and so on:

What to do with this long list of findings? Actually you have a lot of legacy custom code in your landscape and want now to focus your quality assurance efforts only on the new or recently changed code.

The baseline concept (available with SAP NetWeaver AS for ABAP 7.51 innovation package) offers you a solution. With baseline you can exclude after the first ATC run your well-known or legacy findings from the ATC result list (add the ATC results to the baseline) so that at the second ATC run they will be treated as a special kind of exemption and will not appear in your ATC result list. Of course you can anytime change the scope of the baseline (add or remove findings) and in this way you can always very flexible decide which findings you want to take care of.

The setup of the baseline is quite simple. You need to logon to the ATC system as administrator. In the transaction ATC under ATC Administration -> Runs double-click the Manage Results entry. In the ATC: Browse Results screen you can specify the query for ATC run series and visibility of results and press Execute button or F8. The ATC result list displays the results according to your specified query settings.

Now you can add (or remove) findings to baseline after selecting the relevant finding from the results (Baseline -> Add to Baseline to…) and by choosing the appropriate option for it (suppress, exempt, assign low priority).

After this the ATC check result gets added to the baseline (this is indicated by column Is in Baseline):

After this you can schedule a new ATC check run, and you will see, that the ATC result contains no findings (double-click the result to see the findings list):

Optionally you can still display the suppressed findings (findings which are now in the baseline):

Note: as long as you only change coding that does not affect the exempted finding (for example you change something in line 20 of an INCLUDE and the finding marks code in line 200), the exempted finding is still recognized as the same.

If you now for example change the source code and schedule the ATC check run again, the new ATC result will contain only the new findings:

 

To report this post you need to login first.

16 Comments

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

  1. Christian Punz

    hi Olga,
    seems to be a great option to do central code checks. Unfortunately we do not have 7.51 yet 🙁

    Regarding that check-topic I have a question: currently we develop with 7.40 (and rather new ABAP-keywords thanks to the nice blog posts of Horst Keller). When we want to transfer the code to an older system (e.g. 7.02 where ABAP is rather ‘retro’) it happens that import fails because the old system cannot generate due to unknown keywords/syntax.
    Is there an option to check ABAP-code in a new system e.g. 7.40 with the notion “the code should be syntax-error-free in 7.02”?
    Any hint appreciated.
    br
    chris

    (0) 
  2. Ian Stubbings

    Hi Olga

    I have created a baseline for a 7.01 system via the Central ATC system.  When running a scan on a transport in the local 7.01 system using a central RFC variant, the baseline is not reflected. Is this because the baseline is not considered for local systems that do not have the ATC ?

    Regards

    Ian

     

    (0) 
    1. Olga Dolinskaja Post author

      Hi Ian,

      yes, exactly, baseline is the ATC feature. If you scan your 7.01 system from the central ATC system, the baseline will be considered.

      Regards,

      Olga.

      (0) 
  3. Ian Stubbings

    Hi Olga

    Thanks for the prompt response.

    We will schedule a twice weekly job on the Central ATC system to check the delta changes then and run adhoc scans from here instead.

    Thanks

    Ian

    (0) 
  4. Srinivas Rao

    Hi Olga,

    Suppose I add around 20 lines of code in between for an include, then all the below code will be shifted by 20 lines down. In such cases, since the line numbers have changed for the old code – will the ATC issues for these codes will start showing up even though I base-lined it earlier ?

    (0) 
    1. Olga Dolinskaja Post author

      Hi Rao,

      please see the answer above in the blog:

      Note: as long as you only change coding that does not affect the exempted finding (for example you change something in line 20 of an INCLUDE and the finding marks code in line 200), the exempted finding is still recognized as the same.

      Regards,

      Olga.

       

       

      (0) 
  5. Ian Stubbings

    Hi Olga

    Previously we established that the baseline is not considered when scanning from a 7.01 system and using the RFC variant from the Central ATC.

    I have now created a baseline for a system that has a local ATC and scanned from local ATC to central ATC using the same RFC based variant.  This time the baseline is considered as expected, however in the Exemption State column, it says Has Pragma as a tooltip on the displayed icon – which is confusing.

    I was expecting a green light and a tooltip that says ‘Approved’ instead.

    Can you advise?

    Thanks

    Ian

     

    (0) 
    1. Olga Dolinskaja Post author

      Hi Ian,

      I suspect that the findings with the “Has Pragma” exemption state have been exempted via pseudo-comment (not the baseline). I will address it at development.

      Thanks and regards,

      Olga.

       

      (0) 
  6. Former Member

    Hi Olga,

     

    Thanks for the post. I have a situation. We have a central ATC system NW 7.52 SP 01(01/2018) .

    I am trying to set up ATC there . I am tryinng to pushthe ATC results from Central system to Satelllite Systems. However I dont see button to replicate my Central ATC results to Satellite Systems

    Could you pls help

     

    I do see Replicate targets option –

    Thanks,

    Rini

    (0) 
  7. Eduardo Kendy

    Hi Olga,

    Based on the described concept, it seems that we could used this functionality to check only new code of a program:

    However, I´m trying the baseline functionality and I could not get it to work properly.

    For example PROG ZABC:

    SELECT * FROM TAB.

    In a first ATC (1) run we have one finding and I add it to baseline.

    If I run ATC (2) again there is no finding.

    Now, I change PROG ZABC by adding a new statement to the end of the code (and not affecting the previous exempted finding):

    SELECT * FROM TAB.
    SELECT * FROM TAB2. –> new code

    When I run ATC (3) now we have two findings.

    So, until ATC run (2) everything was fine. For ATC run (3) I expected to see only one finding related to the new code, however the previously exempted finding is now there again. Perhaps I am I missing something? Or did I misunderstood this part related to new code?

    Best regards,
    Kendy

    (0) 
    1. Olga Dolinskaja Post author

      Hi Kendy,

      the baseline is effective as long as the related code sections remain unchanged: if the code is changed or a new code is added, the unique identifier for each ATC finding changes so that it does not match any more with the finding that has been added to the baseline. Therefore you get the finding again if you add a new line. The example from the blog relates to the source code change within the INCLUDE program which is used within the source code program, that is checked with ATC. In this case the source code program itself remains unchanged.

      Best regards,

      Olga.

      (0) 

Leave a Reply