Skip to Content

Do you know that on average 60% of your custom code is in reality not executed in your productive landscape? Especially in SAP Business Suite migration projects like to SAP HANA or SAP S/4HANA such amounts of unused code result in huge adaptation efforts. Therefore SAP’s recommendation is to clean up your unused custom code before migration. But how can you identify the code that is not used?

The purpose of the ABAP Call Monitor (transaction SCMON) is to monitor the execution (usage) of ABAP code (function modules, method calls etc.) in your productive system. The advantage of the SCMON compared to the UPL (Usage Procedure Logging in SAP Solution Manager) is that using this tool you not only collect the usage data (how often a specific ABAP object was called), but also the information about the calling business process. Therefore as a result of the monitoring, you get a list of business transactions (callers) along with all ABAP objects that have been called within these business transactions including the number of calls.

Since SCMON comes along with enhanced functionality scope compared with UPL, you can consider SCMON as a successor and use it instead of UPL.

In the example below you can see, that the function module HTTP_GET_HOST was called altogether 50 times and 19 times of it within the transaction SICF, 17 times as remote function call from the FB_AUINT_CLASSTEST_EXTERNAL and so on.

ABAP Call Monitor does not provide any performance data.

You can use the collected data for example, to find all business processes that call  a specific ABAP object (e.g.to identify the business processes affected by code change or deprecation) or to find out which ABAP objects are called by a specific business process.

SAP’s recommendation is to keep the monitor switched on for a certain period of time to get reliable data.

Prerequisites

ABAP Call Monitor is available with AS ABAP 7.50 and for the lower releases (>=7.00) per ST-PI Add-on.

The authorization profile for object S_ADMI_FCD with value SCMD for read access to ABAP Call Monitor data.

The authorization profile for object S_ADMI_FCD with value SCMA for administration activities in the ABAP Call Monitor.

Integration into SAP Solution Manager 7.20

SCMON can be activated in different systems from one single place: SAP Solution Manager 7.20, if these systems are connected to SAP Solution Manager (Solman_Setup -> Custom Code Management).

Generally the Solution Manager 7.20 collects either UPL or SCMON data depending whether the connected system is capable of SCMON or UPL. It is also possible to extract the SCMON data into Solution Manager BW. The data will be stored in day slices and if needed as well in weekly, monthly and yearly aggregation. This will help to keep SCMON data during a long time period in one single place, but still keep the time slices and the respective data small in the original system itself. The existing already collected UPL data get also imported into Solution Manager BW and simply mixed with the new SCMON data.

The SCMON data can then be evaluated for decommissioning of unused objects in the connected systems, using Custom Code Lifecycle Management (CCLM) Decommissioning Cockpit in the Solution Manager. (Sm_Workcenter -> Custom Code Management -> Custom Code Management or CCLM Decomissioning Cockpit). Please consider that usage data are collected from different systems and if an object is not used on one system, but used on the other system, you should not decommission it.

Administrator: Configuring ABAP Call Monitor

System administrator configures SCMON and changes the data collection.

CAUTION:

  • You should never run Usage Procedure Logging (UPL) und SCMON in parallel. This can happen coincidentally for example if you activate UPL via Solution Manager and then SCMON locally in ABAP system.
  • Avoid using SCMON (or UPL) for the systems which already run under maximum load

It is the task of a system administrator to activate or deactivate monitoring with SCMON for the entire ABAP system (all server instances) by using the button Activate and then specifying the configuration settings:

Here you specify the point of time when the monitoring will be deactivated automatically (Scheduled Deactivation) and limit the maximum number of records that are created during monitoring (Record Limit).

The time slices in the ABAP Call Monitor make possible to analyze the progress of monitoring results over time. You then have the option to focus on monitoring data for a specific time interval. For example, you might be interested in those ABAP procedures that call development objects that have been declared as deprecated since a specific point of time (ABAP Call Monitor > Configure Time Slices).

Here you can limit the data records created during monitoring to a specific period of time. The ABAP Call Monitor automatically deletes the monitoring data that has been created before Maximum Number of days.

Usually, the data collection takes automatically place once an hour if the ABAP Call Monitor is active in the system. But you can trigger the data collection explicitly at any point of time (button Collect Data).

If you have finished your monitoring activities and no longer need the corresponding data, you have the option to explicitly delete the collected monitor data (menu ABAP Call Monitor > Delete Data).

Developer: Using ABAP Call Monitor for data analysis

Display and analyze the collected data

The Data Browser of the ABAP Call Monitor allows you to analyze the use/dependency relationship between called objects and calling business processes (button Display Data).

You can also specify the data for selective analysis. For example if you want to get all URLs calling the method TRACE of the class CL_HTTP_SERVER during a specific period of time, you need to specify the following options:

And here is the result example:

If you want to display all ABAP objects that were used (called) by the SE38 transaction within one day you need to specify the following options:

Based on the selection criteria, the ABAP Call Monitor generates a result list of request entry points along with all ABAP objects that have been executed within the selected time interval:

Each entry in the list represents a monitoring data record, which you can drill down for viewing further details. For example Show Time Evolution displays the daily time slices of monitoring data for the selected entry, Show Calling Requests displays the calling requests and Show Called Requests displays the called requests for the selected entry.

Display and analyze the Call Graph

The call graph option allows you to focus on the usage/dependency relationship between requests (button Display Call Graph). For example, if you want to know which objects call the transaction SE38 within a certain period of time, you will need to specify the following options:

And here is the result example:

Display Log

Occasionally, you will need an overview of all monitor activities within a certain period of time (button Display Log).

In the Log Browser screen that appears, you get a list of actions or events – such as activation or deactivation of the call monitor, deletion of records, and collection of data.

 

To report this post you need to login first.

45 Comments

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

  1. Florian Henninger

    Hi Olga,

     

    thank you for this blog. Did not had a try yet to use it, but is it also possible to have a run, which I say to the settings a maximum for collecting the same object. So the example looks like that:

    I want to know every customer-object, but when a object is called more than 100 times a day I’m sure I need to have a look at it, and I want to have the rest of the trace not filled with the same information over and over again. Got the question?

    ~Florian

     

    (0) 
    1. Olga Dolinskaja Post author

      Hi Florian,

      it is not possible but also not necessary, since only the counter is counted up (per call request), that is, there are not more trace entries created.

      Regards, Olga.

      (2) 
  2. Joachim Rees

    Hi Olga,

    thanks for sharing!

    I recently learned about UPL and that it can be also used without SolMan, via Report /SDF/UPL_CONTROL .

    Now you say that SCMON is better than UPL, so it’s probably a good idea not to dig to deep into UPL, but more into SCMON, right?!

     

    Your initial statement (only 60 % of custom code is actual executed) points towards “we can get rid of a lot of dead code, if we can Identify it.”

    But how do I identify that code? You describe a way vie “Custom Code Lifecycle Management (CCLM) ” in SolMan, but is there also a standalone option (without SolMan) available?

    -> IF SCMON logs everything that is called, it should be easy to also show me parts that have never been called. Is there an option for that, or would I have to try to compile that list manual, somehow?

     

    best

    Joachim

     

    (0) 
    1. Thomas Fiedler

      Hi Joachim,

      if you would like to run an Usage Analysis without SolMan we recommend to use SCMON as this is definetly the better approach because of the entry point information. If you would like to identify code which is not used at all you have to use the SolMan CCLM Tooling. But you are right it looks not so complicated to detect this delta when you have SCMON data in the system. So we think about it to provide this feature in the NW stack as well.

       

      Regards,

      Thomas.

       

      (2) 
      1. Stephan Heinberg

        Hi Thomas,

        yes, please integrate that in NW stack!

        CCLM is a lame duck, destroyed by SAP Sales people, who did not know how to sell Enterprise Support.

        We decided to build our own decommissioning tool based on TADIR minus UPL 365 days.

        Thanks,

        Stephan

         

        (0) 
        1. Thomas Fischer

          Hi Stephan,

          I don’t agree that CCLM is a lame duck. It provides a lot of usefull information which helps to make the wright decision for decommissioning. It was developed in several co-innovation projects with our customers. For example it enriches the usage information from UPL with usage information for includes and transactions. As for example usage of includes is not collected by UPL or SCMON. CCLM calculates automatically usage information for includes based on the references and the usage of the main object(s). This is just one example. CCLM is now used by more than 1000 customers with the main use case to decommission unused objects based as well on information coming from TADIR, PROGDIR, UPL/SCMON, workload statistics and many other sources.

          You might even have a look at the new quality cockpit of CCLM provided with SAP Solution Manager 7.20 which support for example the conversion to S/4HANA.

          But yes, CCLM is not part of standard support.

          Best regards,

          Thomas

           

          (0) 
  3. Stephan Heinberg

    Hi Olga,

     

    why another tool? Could SAP not enhance UPL? What about all the UPL ideas in 2014 (DDIC …)

    Now I have two tools, that have both disadvantaged and should not even run this in parallel.

    Do you have a list of objects that are support in UPL, but are not in SCMON (SmartForms, Adobe Forms, WebDynpro?)

     

    Thanks,

    Stephan

     

    (1) 
      1. Thomas Fiedler

        Hi: Jelena, Stephan.

        you don’t need both tools. SCMON is the replacement for UPL. It comes with new features (entry point) and can be used on the ABAP stack without SolMan. So you can analyse the SCMON results within the ABAP stack.

        Technically it was not possible to enhance the UPL infrastructure with new features. Therefore we decided to replace the UPL with a complete new infrastructure.

        Regards,

        Thomas.

         

        (4) 
        1. Stephan Heinberg

           

          Hi Thomas,

           

          what about “runtime -> design time conversion” of SCMON? (Adobe Forms, Smart Forms ..)?

          BTW: We run UPL only in within the ABAP stack and have a retention time of 365 days.

           

          Thanks,

          Stephan

          (0) 
  4. Julian Kruetten

    Hi Olga,

    you say that SCMON is available for Systems < 7.50 per ST-PI Add-on.

    I have a System with 7.40 and the latetest ST-PI, but I cannot find the Transaction. Is there a Report maybe?

    Thanks,

    Julian

    (0) 
    1. Olga Dolinskaja Post author

      Hi Julian,

      in ST-PI add-on is the transaction SCMON in the ST-PI name space. Just enter  /n/SDF/SCMON in ok-field to start it.

      Regards,

      Olga.

      (2) 
  5. Oliver Hütköper

    Hi,

    what exactly does “Avoid using SCMON (or UPL) for the systems which already run under maximum load” mean? Is there a performance decrease when using SCMON or UPL? If yes, how much (roughly)?

    And is it recommended to activate SCMON only for a short period or should it be activated it all the time. Because if we want to get a continuous picture about the use of our custom code for example, I think it should be activated all the time, right?

    Best regards,
    Oliver

    (0) 
    1. Olga Dolinskaja Post author

      Hi Oliver,

      I would roughly say about 5% CPU time on the application server. We recommend to activate SCMON for a longer period of time in order to get representative picture about the use of custom code.

      Regards,

      Olga.

       

      (0) 
  6. Martin Luedecke

    Hi Olga,

    Thanks for this great blog post. I was wondering if you only get info from SCMON about specific ABAP objects such as classes and FMs, or if you also learn about what  lower-level objects such as data elements or even message classes are being used.

    It would be quite interesting too learn what has been called in a system on a very detailed level!

    Thanks so much

    Martin

    (0) 
    1. Olga Dolinskaja Post author

      Hi Martin,

      SCMON monitors the execution of ABAP procedures, therefore the objects must be “executable/callable” like function modules, method calls.

      Best regards,

      Olga.

      (1) 
  7. AI Application Infrastructure

    HI Olga,

    We are running SAP system 7.4, but having latest ST-PI and kernel that enables us to activate SCMON. It working well in the managed system. however when I try to get the SCMON extractors in the solution manager, its not able to detect the SCMON. I don’t see the Start symbol in the extractor and Root is ticked as it supposed to when SCMON is enabled.

    We are running our solution manager 7.2 SP4. Anything special we have to do to make it work in solution manager?

     

    Thanks

    Vijay

     

    (1) 
    1. Olga Dolinskaja Post author

      Hi Vijay,

      Please refer to the SAP Note1828848 to check the prerequisites for your SCMON NetWeaver System as well (must be NetWeaver 740 SP14+).

      You need to start SCMON not in the SCMON system but from Solution Manager via Set-Up. To do this, you must activate the entire infrastructure in Solution Manager and then activate SCMON. Please refer to the CCLM guide für Solution Manager 7.20 (SP5) (we don’t have it for the SP4, but the most information is relevant for SP4 as well).

      Best regards,

      Olga.

      (0) 
  8. ANSHIKA SHARMA

    Hi Olga,

    Thanks for sharing.

    We have been using UPL for a long time and now we have upgraded to Solman 7.2. Knowing the capabilities of SCMON we are now looking forward to replacing UPL with SCMON. So, interested in knowing the implications and any use case for SCMON.

     

    Regards,

    Anshika

    (0) 
  9. Global Software Development ERP adidas-Group

     

    We’ve recently decided to start using SCMON instead UPL. My problem now is that not sure how to move captured results to BW infocubes. We were using 0SM_UPL but with SCMON data is not transferred. Which should be the infocube/DSO that collects SCMON data? Is any infocube available?

    Thanks in advance.

    Iñigo.

    (0) 
    1. Thomas Fischer

      Hi,

      it is possible to transfere SCMON data to SAP Solution Manager BW using SAP Solution Manager 7.2. This can be impleted within SAP Solution Manager set-up for Custom Code Management. With SAP Solution Manager 7.2 SP05 there is a new procedure to set-up usage logging without following the set-up for Custom Code Management.

      Please read https://www.sap.com/documents/2017/05/d493008a-bd7c-0010-82c7-eda71af511fa.html# for more information and you can also find information directly embedded in th UI for the set-up.

       

      Best regards,

      Thomas

      (0) 
  10. Marga Biebeler

    Hello Olga,

    thank you for this overview.

    I am wondering, if SCMON replaces UPL in regards to all the UPL-based tools? Is SCMON able to logg Smartforms, Adobe print forms and SAPscript? Are system recommendations and SWLT supported by SCMON?

    Thank you very much!

    Marga

     

    (0) 
    1. Olga Dolinskaja Post author

      Hello Marga,

      SCMON collects only the ABAP-based usage data. SWLT doesn’t support SCMON result as “Coverage Data” and SCMON data cannot be mixed up against static check results.

      Best regards,

      Olga.

       

      (0) 
          1. Marga Biebeler

            Hello Olga,

            I am asking as as far as I knew UPL was able to log Smartforms, Adobe print forms and SAPscript? So if SCMON is not able to do so, is there a way to log these objects by UPL and the rest by SCMON? Or do I have to choose between SCMON and UPL and have to accept then the disadvantage against UPL?

            Thank you. I am just investigating the difference between UPL and SCMON in conrete.

            Best regards

            Marga

             

            (0) 
            1. Olga Dolinskaja Post author

              Hi Marga,

              I’m not aware that UPL can collect other data as you mention. Technically SCMON collects the same usage data as UPL, so you don’t have any disadvantage with SCMON.

              Best Regards,

              Olga.

              (0) 
              1. Marga Biebeler

                Hello Olga,

                on page 8 of the How-To Guide SAP Custom Code Management Usage & Procedure Logging there is explained:

                https://www.sap.com/documents/2017/01/a28f29f1-9f7c-0010-82c7-eda71af511fa.html

                “It will be used to log all called and executed ABAP units (procedures) like programs ,
                function modules down to classes, methods and subroutines. On top you can evaluate the usage of Smartform, Adobe print form and SAPscripts.”
                So how can I understand this in regards to SCMON? Thanks for your feedback! It is highly appreciated.
                Best regards
                Marga
                (0) 
                1. Olga Dolinskaja Post author

                  Hi Marga,

                  UPL and SCMON collect the same data (ABAP runtime objects only).

                  Additionaly using the report /SDF/SHOW_UPL with the option “Runtime-Designtime” the result list of UPL data can be analyzed for potential for conversion to design time objects. In this way, if it works, you can also get the usage of SAPscripts, Adobe Printforms and Smartforms. But this conversion does not always succeed (e.g. the conversion is not always clear and partly coupled with versions of the objects). See also the page 30 of the UPL Guide.

                  I hope, it helps you.

                  Best Regards,

                  Olga.

                   

                  (1) 
  11. Marga Biebeler

    Hello Olga,

    I have a new question where I didn’t find any information on. Should I activate the root flag in the SCMON-configuration?

    I found this hint in the CCLM-Guide: “The activation for SCMON will be done without extracting the root information. Root collection has to be activated by the customer itself.” But then there is another hint: “Attention: Extracting root information from the managed system will increase the usage data in BW of SAP Solution Manager by a factor up to 20.”

    So I am not sure if I should activate it or not and which would be the consequences and how to manage these (data volume management?)?.

     

    Thanks in advance for your help.

    Best regards

    Marga

     

    (0) 
    1. Olga Dolinskaja Post author

      Hello Marga,

      I am not able to give you any recommendation on that. The decision about if you need root data or not depends on your use case for usage data: what you what to achieve with usage data and if root data is required for this. If root data is required, then you can expect a larger volume of data compared to SCMON without root.

      Best regards,

      Olga.

      (0) 
      1. Marga Biebeler

        Hello Olga,

        we want to use CCLM scenario and most probably SEA. Does it makes sense in these use cases? Where can I find more information about the use of the root flag? I could not find anything but it will produce hugh quantity of data volume.

        Thank you very much!

        Best regards

        Marga

        (0) 
        1. Olga Dolinskaja Post author

          Hello Marga,

          for SEA I don’t have any contact person, you need to ask your SAP contact at customer. SCMON always collects data with root information. But you need to decide if you need this root data in your particular CCLM/SCMON scenario. The root information means request entry points – such as a specific transaction, RFC call, URL request, or ABAP report. As a result of monitoring you get a list of executed request entry points along with all ABAP procedures that have been executed under the umbrella of these entry points. For more information take a look at Application Help in the SCMON transaction.

          Regards,

          Olga.

           

          (0) 
          1. Marga Biebeler

            Hello Olga,

            thank you for helping.

            Do I understand well?

            The SCMON data collection in the managed systems is always done with root data and does not depend on whether I activate the root flag in the setup or not.

            If I activate the root flag in the setup the data which will be transferred into Solution Manager BW will be transferred with root data information and will be available for the analysis of the specific use cases.

            So the question where I have to worry about data volume points to the BW of the SolMan and is no issue on the managed systems?

            Thank you again,

            best regards

            Marga

            (0) 

Leave a Reply