Technical Articles
Remote Code Analysis in ATC – Working with Baseline to suppress findings in old legacy code
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:
Further information
Further details on the baseline concept are available in the documentation on SAP Help Portal: Working with the Baseline in ATC.
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
Hi Chris,
Let me take the freedom to answer your question.
You can refer to this 2014 blog from @thomasfiedler
https://blogs.sap.com/2014/11/28/remote-syntax-check-for-abap-developers/
BR,
Suhas
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
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.
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
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 ?
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.
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
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.
Thanks Olga 🙂
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
Hi Rini,
Please check if you configured ATC for central quality checking properly. Looks like an error somewhere in your configuration or your user doesn’t have the appropriate ATC authorization role.
Regards,
Olga.
This is the same issue for me as well. Put it in another blog for FAQ.
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
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.
Thank you Olga!
😉
Hi Olga,
I'm in the process to set up our central ATC-system and am currently prototyping relevant settings with the help of a sandbox system. I'm about to create the baseline findings and am wondering if the parameter "Life Span in Days" has any bearings for how long it may be available?
At a guess, including the results of the run in the baseline will overwrite the expiration date of the ATC-results, but I'd like to make sure.
Cheers
Baerbel
Hi Baerbel,
the life span (= exprires after ... days) defines how long an ATC result shall exist.After the life span has been exceeded an ATC result can be deleted automatically, e.g. an ATC result with the life span 28 days is visible for 4 weeks.
Best regards,
Olga.
Thanks for the quick response, Olga! I was however already aware of that (I do tend to read documentation ?).
What I'm actually wondering is how a "life span" fits with the results being marked as "add to baseline". Does this render the expiration date moot as it would be rather beside the point for ATC-results used in the baseline to have an expiration date? Those results should actually be in the system until they get taken out of the baseline again, shouldn't they?
I checked the F1-help for the relevant fields but didn't see anything spelled out there.
Cheers
Baerbel
Hi Bärbel,
a result which was added to the baseline will not be deleted. You are totally right, that would not make much sense. If you remove it from baseline, it is again handled like any result and would be deleted when the clean up functionality runs again.
Thanks for the hint! We will add a note to the documentation.
Best regards,
Thomas
Hi Thomas and thanks for the clarifying and reassuring response!
Cheers
Baerbel
I'm currently fine-tuning ATC-checks after defining the baseline and am therefore taking a fairly close look at the results for unresolved and exempted findings. The way these get displayed is a bit confusing because the icon shown for the exempted fndings shows "Has Pragma" as its text whereas there actually is no "pragma" or pseudo-comment for the specific finding:
Actual code without any pragma/pseudo-comment:
The finding is however included in the baseline defined via the central ATC system. Shouldn't the icon therefore indicate this with "In Baseline" (or something similar) in the text instead of the misleading "Has Pragma"?
I already tried finding an OSS-Note for this but wasn't lucky and before I open a message, I'd like to know if others see a misleading icon as well or not.
Our central ATC-system is on the latest release NW 7.52 and the satellite system is on NW 7.50/EHP 8.
Cheers
Baerbel
Here is a quick update:
I turned this comment into a question on Q&A and after not getting answers there, raised it as an OSS message. The issue has been recognized by SAP as something in need of fixing but the correction is more than a simple bug fix and therefore will take some time. I'll add updates to my question in Q&A as I get them.
Cheers
Baerbel
For anybody interested in an actual implementation of central ATC-checks and using the baseline concept, my blog post about Tweaking the settings to our liking might be of interest. We for example didn't include checks for findings we wanted to highlight even if they occurred in already existing code (like e.g. hard table updates to standard tables).
Cheers
Baerbel
Hi Olga
Are objects that are currently held within Repair type tasks included in the baseline when it is set?
Regards
Ian
Hi Ian,
just to make sure: with "object within repair tasks" you mean modified SAP objects?
In general, the baseline does not contain objects but findings. If the findings in the object in the repair task have been found before in an ATC run that was added to the baseline, then these findings are also part of the baseline.
Best regards,
Thomas
Hi Thomas
We have all too often situations where repairs are created on custom objects due to wraparounds in 2 track landscapes (project/production) and the object directory settings not being correct.
I ask as it appears that although I am scanning all Z and customer namespaced objects, and then applying a baseline, I still get objects with findings that I would expect would have been previously found. Recently, I have come across 2 repair tasks including custom objects with findings I would have expected to have been included in a baseline and hence wondered if there was a restriction.
Regards
Ian
Hi Olga/Thomas
In addition to the above comment, we are also seeing occurrences where the baseline has been applied (this is after a full system scan btw - so against all custom code in the system) but within a function group, some findings have had the baseline applied and some not. See below screenshot.
At first I thought this may be due to the 'Cannot be hidden using a pragma or pseudo-comment' but on seeing other findings that had not been 'baselined', this does not hold true.
Below is another example where there are 5 findings hidden by the baseline but the sixth isn't. Therefore, we have had to create our own exemption for this. The FM in question has not been changed since 2016.
Naturally, the developers are starting to get a bit annoyed with creating exemptions for findings that are nothing to do with them, in includes that they have not touched - especially after I said to them that this would not occur due to the baseline.
Are you able to provide a list of situations where the baseline will not be applied to findings?
Regards
Ian
Hi Ian,
I had a similar issue a while ago and mentioned it here:
https://answers.sap.com/questions/739072/why-are-the-atc-result-lists-different-dependent-o.html
As mentioned there, I also raised a SAP-incident and received an OSS-Note a short while ago which fixed the issue for us:
2752191 ATC: Duplicate ATC Findings for Function Module Exits
Might this help in your case as well (it’s a bit difficult to see the details in your sreenshots).
Cheers
Bärbel
Hi Bärbel
I'm not sure it is entirely the same but will investigate further and see if the note makes any difference.
Many thanks for the input as always though 🙂
Cheers
Ian
Hi Ian,
if that note does not help, I would like to ask you to open an incident with system connection, so we can look into a specific issue.
Thanks and best regards,
Thomas
Thanks Thomas. I have request the implementation of the note so will keep you posted.
Cheers
Ian
Hi Thomas/Bärbel
Unfortunately the note is for 7.40 and above systems, ours in question is 7.31.
Therefore, I shall open an incident.
Thanks
Ian
Hello,
is there any Option to use the Baseline concept also in a 7.50 System ? Are there any Pre-Corrections which we can use for this Release ?
The problem ist that we just have made an Update to 7.50 and have no Option to do the next Update to 7.51 or 7.52 in the next months.
Best regards
Mario
Hi Mario,
unfortunately not. Baseline is available only starting with 7.51.
Best regards,
Olga.
Hi Olga,
Is baseline from quality system will affect on dev system findings?
Thanks,
Srinivas
Hi Srinivas,
it depends on how your ATC system setup looks like. E.g. if you use your quality system as an ATC central system and run ATC remote checks for your dev system, then you can create a baseline on your quality system and take the ATC findings from the dev system over into it.
Regards,
Olga.
Hi Olga,
Thanks for prompt response.
So as long ATC Central system has findings and baseline , those will be ignored in all the checked systems. correct me if I am wrong.
We have separate system and it acts as ATC Central system, from there it connects to several quality and dev systems using RFC stubs. In this architecture , one quality system baseline can ignore other systems findings ( same object name)?
Thanks
Srinivas
Hi Srinivas,
at your remote ATC setup if you define a baseline in your quality system and execute remote ATC runs for your RFC connected dev (or quality) systems then you can take over the findings from these central ATC runs into the baseline. This baseline has no effect for the local ATC runs on the connected systems.
Regards,
Olga.
Hi Olga,
From Central ATC system, i ran ATC checks for Z* & Y* packages in remote connected system, and added all errors to baseline as exemptions.
Again i ran ATC checks for specific Z package from Central ATC to same remote system, still i found 1000 unresolved findings. Does that mean, previous ATC check is not successful?
What could be issue? Any leads would be helpful.
Thanks,
Srinivas
Hi Srinivas,
it shouldn't happen. Have you checked the "Consider Baseline" option at scheduling the second ATC run?
Bye,
Olga.
Hi Olga
We routinely 'wraparound' objects from the production track to our project track. Objects with findings that were baselined in the production track (and show a baseline icon next to them) still need to be either rebaselined or new exemptions created and approved in the project track.
Is there a way to make the baseline applicable across 2 development systems?
Regards
Ian
Hi Ian,
no, baseline is system-based. It is just possible to copy/migrate baseline entries across system groups within the same system.
Regards,
Olga.
Hi Olga
Thanks for the quick reply.
I am wondering therefore if our system groups are not setup correctly. Currently we have the system groups set to be the production system which then houses the 2 development systems - production support and project.
What would you suggest is the correct system group configuration?
Thanks
Ian
Hi Ian,
Thanks for the confrmation Olga.
We'll stay with the arrangement we have then.
Regards
Ian
Hi Olga
We seem to be having issues with one 7.02 satellite system in that the baseline does not seem to be working correctly. Although the Exemption State icon is correct and suggests the basline has been applied to a finding, it still will not allow the release of a transport task and we have to approve the exemption to enable the release.
Is there a restriction for 7.02 systems, or should the baseline concept work ok here?
Regards
Ian
Hi Ian,
there is no baseline restriction for 7.02 systems, it should work. Please open a ticket to SAP for this issue.
Regards,
Olga.
Hi Olga
Thanks for the feedback. I’ll open a ticket. Just for further clarity, this screenshot is from a 7.31 system where we have the same problem. Baseline icon clearly there but exemption requested as not allowing the transport to be released.
Regards
Ian
Hi Olga
Noticed that after baselining also complete Legacy Code is not exempted and still P1/P2 and P3 findings are thrown in the next ATC Run . Please keep me posted if its a known issue or we have solution for it.
Created an OSS as well for SAP .
Thanks
Hi Alok Sharma,
baseline should exclude the findings (which you've taken over into baseline) from ATC Result List at the next ATC run. If it doesn't work so for you, then the OSS ticket is the way to go.
Regards,
Olga.
Hi Olga,
I would like to implement the baseline concept on a ATC central system and I have a question for you.
If a developer executes an atc run on 7.50 development system, is the baseline(defined in central system) considered?And 7.52?
About setting up atc transport checking, I couldn’t find documentation related to 1909 . Where can I Find the documentation?
Thank you in advance
Laura
Hi Laura,
baseline is the feature of the central ATC system >=7.51. If your developer system 7.50 is connected to the central ATC system with RFC and your quality expert executes ATC run over it on the central ATC system, then the findings in the code on 7.50 system can be considered for the baseline. But a developer on a 7.50 (or any other system) cannot use baseline.
Setting Up ATC Transport Checking: https://help.sap.com/viewer/DRAFT/ba879a6e2ea04d9bb94c7ccd7cdac446/201909.003/en-US/40c14df0a883467bb90ef5a70cee7cc2.html
Kind Regards,
Olga.
Hi Olga,
I have the following scenarios:
- ATC Central System (>7.51) >> QE used Baseline features to suppress findings for legacy code
- Satellite System (7.50) >> Developer launch ATC for legacy code
- ATC Central System (>7.51) >> QE used Baseline features to suppress findings for legacy code
- Satellite System (7.53) >> Developer launch ATC for legacy code
1. Does Developer see findings for legacy code (in scenario A and B)?
2. Can ATC be integrated in satellite system setting blocking behavior at release for priority 1 errors only (in scenario A and B)?
Hi Laura,
at a guess, Olga meant to link to her blog post about ATC-baseline: https://blogs.sap.com/2016/12/13/remote-code-analysis-in-atc-working-with-baseline-to-suppress-findings-in-old-legacy-code/
When I set up our central ATC-system (NW 7.52) two years ago, I followed the outlined steps and it worked for our NW 7.50 satellite systems (write-up here)
Cheers
Bärbel
Hi Barbel,
Thank you for your answer.
I read your useful blog and I have two questions for you:
about point number 1 : If I understand ( for both scenarios A and B ) the atc executed locally by developer doesn't consider the baseline defined in the central system. is it correct?
Also I read your blog https://answers.sap.com/questions/576953/how-best-to-define-check-variants-to-be-eventually.html .
My question is :
If I define a variant with s4 checks in the central system and I use this variant in a ECC satellite system (No S4) are these checks considered during transport release?
Best Regards
Laura
Elio Grillone
Hi Laura,
when you create the variant in the central system with at least NW 7.52 you can "tell it" to take a defined baseline into account and you can also include S/4HANA Readiness checks. If the check-variant in the satellite-system then references this central variant, the checks will be executed based on the information in the central system but for the code in the satellite system. Developers can therefore make good use of them.
With regards to S/4HANA Readiness checks we haven't done this yet for the variant used during transport release as we have set it up with blocking the release in case of priority 1 or 2 errors. As most S/4HANA issues cannot yet be really fixed in a NW 7.50 system it doesn't really make much sense to inconvenience the developers with these types of messages. It's different for a separate variant which can be "offered" to developers if they are curious to see how well their code would do under S/4HANA!
Hope this helps!
Cheers
Bärbel
P.S.: I may be slow to reply to further comments/questions as I'll be on vacation for the next two weeks and may not see notifications regularly.
Hi Laura,
please follow instructions given in Baerbel‘s blog.
Here is the valid SAP Help Documentation link for setting up ATC Transport Checking: https://help.sap.com/viewer/ba879a6e2ea04d9bb94c7ccd7cdac446/201909.002/en-US/40c14df0a883467bb90ef5a70cee7cc2.html
Regards,
Olga.
Thank you Olga!
Dear Olga,
when we started using remote ATC, we put many objects to baseline reducing the priority.
Now I wanted to remove one development object from baseline.
I ran a check for that object and afterwards I tried to remove the results from the baseline.
But the system refused to remove from baseline. I looked in the coding and it seems to be like this, that only results of an ATC run which is in baseline are used to remove from baseline.
Therefore I put the results to baseline reducing the priority and deleted it afterwards again. But the low priority is still assigned to the findings. Could it be that the baseline is based on object and ATC run?
Is there a possibility to remove findings of a single object from the baseline?
Regards
Jürgen
Hi Jürgen,
baseline is based on the ATC run. But if you use this feature of the ATC Result Browser: Adding ATC Findings to the Baseline in the ATC Result Browser then you could create a new ATC result (e.g. containing only the findings for a particular object) and take it to or remove from the baseline.
Regards,
Olga.
Hi Olga,
that was my idea, but I get:
None of the selected check results is part of the baseline
Message no. SATC_ABAP_CHECK505.
Looking at the code, it ehecks in satc_ac_bsh (Baseline Header) if the ATC run is in the baseline, and not the objects.
Regards
Jürgen
Hi Jürgen,
yes, baseline is based on ATC runs, not the objects. I've looked into our internal systems and have got the same error.
It works as following: only specific results that have been before added to the baseline (these are then marked accordingly in the results overview) can also be removed again. Any results cannot be removed because they are not part of the baseline in this form (the findings may be, but the result is not). If you add individual findings to the baseline, a separate (artificial) ATC result is generated for this selection of findings. This is then actively assigned to the baseline and can also be removed again accordingly.
Regards,
Olga.
Hi Olga,
I understand Baseline concept is available from SAP NETWEAVER 7.51 onwards, Customers like us who are in EHP8 SPS11 ( Backend ) will not be able use 7.51 ( we are stuck with 7.50 for now ).
my question is , we have a central hub model for frontend development .
where gateway is separate instance , can we upgrade it to SAP NETWEAVER 7.51 and use it as central system for ATC baseline ??
is the approach feasible or totally i didn't get the concept right?
Regards,
Dinesh R
Hi Dinesh,
from the technical perspective it is feasible but from a system load point of view it is not recommendable, because if e.g. an ATC mass run is currently running, the SAP Fiori UIs on the SAP Fiori Frontend Server may no longer perform.
Kind Regards,
Olga.
Thanks for the clarification Olga.
Hi Olga,
we have made one of our GRC system ( SAP BASIS 752 ) as central system and made our DEV ( SAP BASIS 750 ) as satellite system.
Baseline functionality works fine when we schedule runs from master system , however if a developer releases a transport in DEV ATC error pops up for legacy code ( whereas baseline is already applied for the same object in master system for legacy code ).
is there a way to recognize baseline results in DEV system ( 7.50 ) ? so that only the delta change is reviewed while releasing the transport?
we are connecting DEV using Trusted RFC ( object provider ) in master system.
Regards,
Dinesh R
Dinesh Ravisekaran
Hi Dinesh,
we had a similar situation a while ago with comparable system version setups as you have. I had asked a question in Q&A then and also opened an OSS incident with SAP which led to this OSS note: 2752191 ATC: Duplicate ATC Findings for Function Module Exits. It resolved the issue for us.
Hope this helps!
Cheers
Bärbel
Hi Bärbel,
Thanks for the OSS note, i was able to apply on my system however issue is not resolved.
Exempted in Master System:
i can able to see the exempted object in master system under (exempted findings ).
however it Prevents Transport Release in Satellite system:
let me know if i am missing any configuration.
Regards,
Dinesh R
I was able to resolve the issue. Variant which i was using in Satellite system was different than centrally defined one ( My Bad ).
Once i change the variant, it started to recognize the baseline results in satellite system and transport release works as expected.
Dear SAP Guru,
please tell me the methodology for prioritizing the results of cheks.
BG, Alexey
Hi Alexey,
the priority of the ATC check is set automatically by SAP (1 - Error, 2- Warning, 3- Information). The priority shows how severe is the problem. Your organization should set the policy for fixing ATC findings.
Kind Regards,
Olga.
Hi Alexey,
if need be you can update message priorities as needed via transaction SCI (or via ATC):
You can find more information in my blog post about setting up a central ATC-system in the section "Tweaking the message priorities".
Hope this helps!
Cheers
Bärbel