Aggregate usage data in your production system with SUSG transaction
You can use transaction SUSG to aggregate usage data recorded by ABAP Call Monitor (transaction SCMON or /SDF/SCMON) in your production system.
The ABAP Call Monitor records the execution (usage) of ABAP code (function modules, method calls etc.) in your production system. Find more about how to configure and use the ABAP Call Monitor in the blog ABAP Call Monitor (SCMON) – Analyze usage of your code.
The purpose of the transaction SUSG is to aggregate this usage information collected by ABAP Call Monitor for a period of time.
The aggregated usage data can be used (for example for Custom code analysis for SAP S/4HANA with SAP Fiori App Custom Code Migration) to identify when an ABAP program or procedure was last used productively. In this way, the aggregated usage data also helps you to identify the custom code, which is not executed in production so that you can minimize your adaptation efforts while converting your SAP ERP system to SAP S/4HANA.
NOTE: You cannot display the aggregated usage data (neither in SUSG nor in SCMON or /SDF/SCMON). A remote enabled API is provided to read the aggregated usage data which you can use to implement your own display or extractor.
Transaction SUSG and ABAP Call Monitor (transaction SCMON or /SDF/SCMON) must be available in your system.
See the SAP Note 2643357 for supported SAP_BASIS releases, the installation instructions of SUSG and the SAP Note 2701371 for using the SUSG.
Aggregate usage data
Start the transaction SUSG. If you haven’t collected usage data with the ABAP Call Monitor before and haven’t used SUSG yet, Aggregation and ABAP Call Monitor will not be active and number of Aggregated Days, Aggregated Records will be 0. Aggregation Log (click “Display Log” button) will be also empty:
Otherwise if the ABAP Call Monitor is running and/or you already aggregated usage data before with the SUSG, your entry screen will look like this:
Press “Activate” button. If not already running the ABAP Call Monitor starts. The aggregation of your usage data will be activated with the record limit 199.999.999. The aggregation batch job will be scheduled on a daily basis at 2.30 a.m. system time and aggregates your usage data of the day before.
If you start again the SUSG transaction after some period of time (at least from the next day after 2.30 a.m.) you will see the information about your aggregated usage data so far:
If you click the “Display Log” button, you will get all aggregation logs sorted by date. The log records all user interactions as well as information and error messages during the aggregation. The log also records the information when usage data could not be aggregated (for example during system downtime) or when aggregated data was deleted.
If you deactivate aggregation (button “Deactivate”) the aggregation will stop, the aggregation batch job will not be scheduled, but the ABAP Call Monitor is still active and records your usage data. You can deactivate the ABAP Call Monitor in the transaction SCMON (or /SDF/SCMON).
Create and manage usage data snapshots
You can create snapshots of the aggregated usage data and use them for analysis or archiving purposes. Snapshots can be created for a certain period of time: between the aggregation activation date until yesterday and record already aggregated usage data. The advantages of snapshots are that you can any time access data records that will no longer change during analysis and you can easily transfer aggregated usage data between systems by downloading/uploading snapshots to/from files or automatically using RFC.
Start the transaction SUSG. The data must be already aggregated, meaning that the numbers of Aggregated Days and Aggregated Records on the aggregation state screen shall be > 0. Click Create Snapshot button and enter Descripton:
Click “Manage Snapshots” button to display a list of the snapshots you have created.
Here you can click “Download to File” button to export your snapshot as a file and upload it later on to the target system, or if you are already on your target system, you can click “Upload from File” button to upload the snapshot to your target system.
Clicking “Export via RFC” or ”Import via RFC” buttons transfers your aggregated usage data snapshot automatically between your production and target systems.
You can also delete not needed snapshots by clicking the “Delete Snapshot” button.
Find more detailed information in the SUSG documentation on the SAP Help Portal.
I followed the steps given above and SUSG seems to be ready. However when I try and create a snapshot, I am getting a message:
Could not create snapshot 'Usage data of system ECX from 09/16/2019 to 09/17/': Usage Data locked for write access
Message no. SUSG_UI121
Any idea what could be causing this error?
it may be that the aggregation started at 2:30 is still running. As long as it's running the aggregated data is locked and snapshot can't be generated. With the (brand new) SAP Note 2830186 - SUSG: Runtime of SUSG_COLLECT_FROM_SCMON the duration of the aggregation should be reduced.
Thanks a lot for the article - it was very interesting. I am wondering once we have the snapshot of data from SUSG what transaction or tool we use to interpret this data? We are not yet on S/4 HANA so cannot use the Custom Code Migration app. Can we import the data into the ATC (ABAP Test Cockpit) and see there what custom code we are actually running?
no, you cannot import an SUSG snapshot into ATC. This is exactly the advantage of the Custom Code Migration App: consideration of the usage data (SUSG snapshots) for scoping of custom code for SAP S/4HANA.
Okay, thanks Olga. But the Custom Code Migration app is only available if you have S/4 HANA, no? If we are not on S/4 HANA is there another way of checking the SUSG snapshots?
yes, the prerequisite for the Custom Code Migration App is the SAP S/4HANA >=1809 system (or SAP Cloud Platform ABAP Environment, since the App can be run there as well). There is no other way for evaluation of SUSG snapshots. If you use the SAP GUI based ATC and want to define custom code scope for SAP S/4HANA based on the usage data, you will need to collect the usage data with SCMON (or UPL) and manually define the scope based on these data.
does this basically mean that we'd need to set up a new S/4HANA 1909 system where the Custom Code Migration App can then be executed from, utilising SUSG-data captured in the existing NW 7.50 production systems? And should such a new S/4HANA system then also take over the tasks our current central ATC-system provides (i.e. ATC-checks during transport release) which is on NW 7.52?
yes, if you want to use the Custom Code Migration App, you need to setup an SAP S/4HANA >=1809 system. This system can also take over the tasks of the central ATC system in your landscape. It depends on your situation: whether you e.g. just want to use the SAP S/4HANA sandbox for checking for S/4HANA readiness and then "get rid of" this system or use it further on as the ATC central check system.
Will SCMON/SUSG benefit us for our business suite on Hana migration (not yet ready for S4) ?
if you want to identify unused custom code and get rid of it, then yes.
I have setup SCMON and SUSG as per blogs..but after uploading SUSG snapshot of EHP system to S/4HANA 1809..Custom code project state remains "loadin usage" only. Also number of objects also fixed to 840 objects all the time.
Am I missing any configuration still?
Hello Olga Dolinskaja,
can you guide here ?
for such functional issues please open a ticket to SAP.
If SCMON was started 1 year ago and then we activate SUSG (after 1 year), will SUSG aggregate data for whole period of time when SCMON was activated?
SCMON runs and collects the data till given deactivation date, but the collected data is stored on the system only for 7 days, meaning after 7 days the “old” data records will be deleted by and by and the “new” (after 7 days) data records will be added by and by. So without SUSG you don’t have the usage data for 1 year stored on the system. If you turn on SUSG, it will aggregate all SCMON usage data available on the system by and by.
Do you mean we need to create snapshot every 7 days from SUSG for a year to analyse data for the period of 1 year?
no, SUSG aggregates SCMON data ongoing. You can e.g. aggregate the data with SUSG for 1 year and only then take a snapshot.
Just to clarify. Is the best practice approach to have SCOM running constantly for the foreeable future, SUSG routinely aggregating the data and snapshots being taken whenever required?
Is there a limit to the length of time a snapshot can be taken for?
the recommendation would be: activate SCMON via SUSG, then SCMON runs continuously and SUSG aggregates the data. The snapshots are actually only taken if you need to transfer data to the CCM app. There is no limit of the length of time for a snapshot to be taken.
That's perfect. 🙂
you mentioned the SUSG API. Where can I find documentation about this API?
I checked the help.sap.com link, but the API is not documented there.
it is the package SUSG_API (respectively the released package interface SUSG_API_PUBLIC). Should be documented there with ABAP Doc.
did you investigate this further?
I just had a quick look, and it seems to me that you can only access the data in its entirety. You cannot give any selection criteria. Is this correct?
We transfer the data with SUSG via RFC to the development system and then access the CDS views SUSG_I_DATA, SUSG_I_ODATA and SUSG_I_RDATA.
Important is the field last_used, since SUSG is currently designed to collect the usages forever.
Hello Olga ,
we have switched on CCLM and using that we have switched SCMON , CCLM periodically delete SCMON Data using House cleaning jobs , if we have CCLM do we still need SUSG ?
if you use CCLM tools of Solution Manager, you don't need to switch on SUSG, since the collected data should be stored in the Solution Manager BW.
can we still import the data already stored/aggregated by SUSG into Solution Manager BW?
no, but you can connect SCMON to the Solution Manager and collect the usage data with SCMON and aggregate them in Solution Manager BW instead of SUSG. See also https://blogs.sap.com/2019/06/25/custom-code-adaptation-for-sap-s4hana-faq/#_Toc470164266
thank you very much for the information.
There is data already, which has been collected and aggregated by SUSG for one year. I was looking a way to analyse that data with CCLM in Solution Manager.
If I understood correctly, that means the data, which have been already collected and aggregated in SUSG can not be imported into Solution Manager and analyzed by it, we can not use already collected data within CCLM in Solution Manager anymore.
yes it is true, because also the aggregation of data in SUSG is different as in Solution Manager BW, they are not compatible.
thank you very much for clarification.
I want to create snapshot in our production system where SUSG is running half of the year. There are more than 95mln data records collected, object data records approx. 25mln (system is multiclient). When I'm trying to create snapshot it never processed till the end and occupied one session (foreground, no errors, just never-ended creation process) and then I can see snapshot with status 'P' - processing in 'Manage snapshots' tab. The system in SAP ECC with SAP_BASIS 702 SP0010 and DB Oracle. With the status I cannot do anything.
Is there any possibility to fix the issue?
please open a ticket to SAP regarding this issue. The development colleagues need to look into your system for further investigation.
Thanks & Regards,
nice manual. Thanks a lot!
If an SAP system has several productive clients, how would I gather client-specific usage data? As it seems "SCMON" shows data without client information. That´s why results in one client appear to be identical to other productive clients.
Can "SUSG" aggregate the information and make somehow client-specific? If not, is there any other option (e.g. maintaining several productive clients in SolMan and switch on usage logging per client). Or is it simply not possible?
Thanks a lot for your answer!
unfortunately it is not possible. Both SCMON/SUSG and UPL in Solution Manager collect usage data for the whole system and not client-dependent.
Hi Olga, nice article. I have one question, I have setup EarlyWatch to SAP using SDCCN.
Both Aggregation and SCMON are showing active and green in SUSG. Not sure what could be the reason But I am getting error message "SUSG is not active in system xxx. Please activate it." in CCA2
I checked every single step from this blog post
Please advise if I am missing anything.
what do you want to do? For example, if you collect the usage data with SCMON on your ERP system and want to store it in the SAP Solution Manager, then you don't need the SUSG.
When SCMON is being run on Solution manager, should the aggregation be done using SUSG in solution manager or is the aggregated data available directly in Solution manager BW
Thanks and Regards,
SCMON must be activated not on the SAP Solution Manager system, but on a productive system, where the usage data should be collected. If this productive system is connected to the SAP Solution Manager system, then the Solution Manager picks up the collected SCMON usage data and stores it in its BW. Please see also the blog https://blogs.sap.com/2017/04/06/abap-call-monitor-scmon-analyze-usage-of-your-code/, chapter "Integration into SAP Solution Manager 7.20" for more details.
Thank you for your reply. Perhaps my wording was bad in the first place. SCMON is indeed active on the productive system, data being collected in Solution Manager. Based on your reply, it would mean that there is no need to use SUSG, but the aggregated data can be directly accessed from Solution manager BW.
Thanks and Regards,