Skip to Content
1

Cleaning up ATC-results with CL_SATC_AC_HOUSE_KEEPING?

Mar 16, 2017 at 11:48 AM

310

avatar image

Hi Folks,

as mentioned in an earlier question, I'm in the process to set up ATC functionality in our system. While experimenting with ATC and through triggering some checks in a daily job I noticed that the results just keep stacking up in the result browser:

When I look at the header information for one of the old(er) results, I see that the expiration date is already well in the past:

As these old results are still available in the system, I guess that some housekeeping isn't yet set up properly to run on a daily or weekly basis but I haven't yet found what should be running regularly. I did find mentions of program SATC_AC_CLEANUP (here) and class CL_SATC_AC_HOUSE_KEEPING with Method CLEANUP with the latter (according to UPL) apparently being executed a couple of times (1 to 3) per day. But, as the old entries are still available, it doesn't seem to do what I think it should do.

I tried to find jobs in SM37 for SATC-programs but didn't find anything there either. I also looked in SPRO if anything might stick out there, but no luck. I'm kind of expecting to see a parameter somewhere for the retention period for ATC-results (seems to be set to 3 days at the moment judging from the ATC-header information) and a regularly housekeeping job to take care of "the purge".

This is in a 7.40/SP11 environment.

What am I missing?

Thanks for any input you have!

Baerbel

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Bärbel Winkler May 09, 2017 at 06:33 AM
0

To wrap up this thread, I'm sharing answers I received from SAP to a message I had created for my various questions.

The sole purpose of note 2181508 is to correct an actual error in the system which it does. Without this note (or the relevant support package) the results of each ATC run only had a retention-period of 3 days.

Once this correction is in the system, the retention period is set as follows, dependent on the context ATC is executed in:

3 days for results from ad-hoc checks. These are triggered from the ABAP workbench (SE80), from the ABAP development tools (ADT or ABAP in Eclipse), or the transport organiser (SE09)

20 days for results generated via CL_SATC_API_FACTORY (which is what I'm using in some custom code I wrote to trigger ATC for selected transport requests based on information provided in this thread by Axel Jebens)

Any number of days specified for schedule runs via transation ATC. The default is set to 120 days but it can be changed when the jobs get planned. Less than 7 days are not possible.

There is currently no option to define a minimum retention period.

Finally, there's no reason to worry about deleting old ATC-results where the validity date has come and gone. Whenever the ATC Result browser is accessed via SE80 this will trigger some automated background logic to randomly delete old results in an asychronous process.

The clean-up programs SATC_AC_REORG_REPOSITORY or SATC_AC_CLEANUP can be run if old results should be deleted at once. It doesn't matter which of the two programs is used but SATC_AC_REORG_REPOSITORY does have proper text-elements for the selection-screen so is perhaps the preferred one to use.

Hope this helps others happening upon this thread with questions about ATC!

Share
10 |10000 characters needed characters left characters exceeded
Peter Inotai Mar 16, 2017 at 01:16 PM
1

Hi Bärbel,

In the comment section of this blog there was info about report SATC_AC_REORG_REPOSITORY, which might help you:

https://blogs.sap.com/2012/10/19/getting-started-with-the-abap-test-cockpit-for-qms-and-admins/

Best regards,

Peter

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Peter and thanks!

According to the response from Klaus Ziegler in that thread "expired results shall get deleted more or less automatically" which would make running the reorg-report not necessary. I'm actually trying to find out what needs to be in place to make it run automatically.

Cheers

Bärbel

1
Axel Jebens
Mar 17, 2017 at 09:36 AM
1

Hi Bärbel,

In addition to what Peter added above, it might also be mentioned that from time to time, the cleanup function is called asynchronously in the ATC result browser (-> ABAP Workbench) when the user displays ATC results.

But back to SATC_AC_REORG_REPOSITORY: For some reason, it shall do the same as SATC_AC_CLEANUP. Don't ask me why there are 2 programs with the same purpose. Both should work. If you want to make sure that cleanup is really running, start it online (not as a batch job) and wait until it has finished. Afterwards, all existing outdated ATC results should have gone.

Check out if it works, if not, let me know!

Axel

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks, Axel!

I just ran SATC_AC_REORG_REPOSITORY and all the old results (up to 3 weeks back) have been purged while the most recent one from today is still there. What I still haven't found though, is where the relevant settings need to be maintained to e.g. set the number of days to keep the results. I'd like to increase that to more than the currently defined default of 3 days which seems a bit too short as it deletes everything including the prior Friday if a weekend is inbetween. So, 1 or 2 weeks would be better for this I think. For now, we are not planning to do central runs, but I'd like to do some spot checks on currently "in the works" and recently released transports, so having results stick around for a while longer seems like a good idea for that.

Checking the UPL-data for the last 2 weeks in our dev-environment, it doesn't look as if either of the two programs is automatically running at the moment. As mentioned in my initial quesiton, I did however find some executions for the CLEANUP-method in class CL_SATC_AC_HOUSE_KEEPING. I don't know, what triggered it, though.

Cheers

Baerbel

0

Here is a quick update:

Some more searching found the following code in IF_SATC_STEP~SETUP which apparently sets the retention period to 3 days:

 if ( me->f_Cfg-display_Load-life_Span > 3 ).
me->f_Cfg-display_Load-life_Span = 3.
elseif ( me->f_Cfg-display_Load-life_Span < 100000 ).
me->f_Cfg-display_Load-life_Span = 100000.
endif.

Turns out that this coding doesn't make much sense, so there's OSS-Note 2181508 which corrects this by basically changing the logical operators and in one version of the corrections (for 740 SP13 + 14) also set the days to 7:

 if ( me->f_Cfg-display_Load-life_Span < 3 ).
me->f_Cfg-display_Load-life_Span = 7.
elseif ( me->f_Cfg-display_Load-life_Span > 100000 ).
me->f_Cfg-display_Load-life_Span = 100000.
endif.

We'll implement the note to see what effect it has (if any).

Still doesn't explain why I cannot find a setting anywhere to set the retention period though.

Cheers

Baerbel

0