Recently I am helping customer to measure the performance of APIs in function group CRM_ORDER_API and find this trace tool.

1. use tcode CRMD_TRACE_SET to activate the trace mode:

/wp-content/uploads/2014/04/clipboard1_423813.png

2. run the one order scenario under trace mode. In my case I execute the program( source code attached to this blog). Once finished, go to tcode CRMD_TRACE_EVAL:

/wp-content/uploads/2014/04/clipboard2_423814.png

double click on the highlighted cell and it will lead to parameter detail screen:

/wp-content/uploads/2014/04/clipboard3_423857.png

it is also possible to see the callstack where the function module is called.

/wp-content/uploads/2014/04/clipboard4_423858.png

How is it implemented

1. There is an include CRM_TRACE_PART_ONE which does the following jobs:

  • evaluate the trace mode enablement
  • collect the timestamp, work process id, callstack information etc

The include looks strange for me( as an ABAP OO developer) at the first glance:

/wp-content/uploads/2014/04/clipboard5_423859.png

2. There is another include CRM_TRACE_PART_TWO which persists the collected trace information to table INDX.?

/wp-content/uploads/2014/04/clipboard6_423860.png

By using where used list on these includes, you can know what APIs could support the trace function.

You can also set user parameter “CRM_DEBUG_CODE” if you would not like to activate it explicitly. It will be evaluated by function module CRM_ORDER_DEBUG_CODE which is called by include CRM_TRACE_PART_TWO.

/wp-content/uploads/2014/04/clipboard7_423861.png

You can also explore the package CRM_TOOLS:

/wp-content/uploads/2014/04/clipboard10_423862.png

To report this post you need to login first.

11 Comments

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

    1. Jerry Wang Post author

      Hello Mr Grau,

      thanks for your comment. Yes I agree with you, I have added that into the blog.

      Best regards,

      Jerry

      (0) 
      1. Luís Pérez Grau

        You welcome, this kind of blogs are pretty usefull, there’s no KBA/OSS about it 🙁 . The VM Stack is also another source of pain, but I’m afraid there’s no nice tool to check the bottle necks (SAT or SE30), right?

        Cheers!

        Luis

        (0) 
          1. Luís Pérez Grau

            Sure, VM Stack is the IPC part to calculate pricing (Java) I found a bottlenecks here when I mass upload sales orders, well to be honest, one of your collegues via OSS found the bottleneck, but would be cool if you can trace it yourself.

            Cheers!

            Luis

            (0) 
            1. Jerry Wang Post author

              Hi Luis,

              when I am dealing with performance issue, I always prefer to check whether there are RFC calls or not, which I consider to be a common impact on performance. You can click Find button in SAT trace result,

              /wp-content/uploads/2014/04/clipboard1_424821.png

              and the RFC call to VMC along with its callstack will be automatically navigated.

              /wp-content/uploads/2014/04/clipboard2_424822.png

              Best regards,

              Jerry

              (0) 
  1. Bhushan Dharmik

    Hi Jerry,

    I activated this trace and I changed description of one of the orders using transaction CRMD_ORDER, it gave me proper trace log. However, when i did the same thing from Web UI it didn’t show me any trace log.

    Can you explain me why? And how to achieve this?

    Thanks in advance,

    Bhushan

    (0) 
    1. Jerry Wang Post author

      Hello Bhushan,

      As long as you activated the trace and function module CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE are called in your scenario, the trace would then be recorded, no matter whether you change the order in frontend or backend. I don’t know why it does not work for you in web ui, I will find sometime to test it by myself in web ui.

      Best regards,

      Jerry

      (0) 

Leave a Reply