cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to check BADI execution time in SAP BPC.

Former Member
0 Likes
426

Hi All,

Anyone can explain how to check step wise execution time in BADI.

In SAP BPC 7.5 NW, SP11

Which step is taking how much time,

Thanks you for help.

Regards,

Devi

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member185511
Active Participant
0 Likes

hi Devi,

you can use GET RUNTIME command in ABAP. Let assume you have a GET_DATA method in your BADI and you want to see how many seconds it takes.

method GET_DATA.

DATA: T1 TYPE I,

  T2 TYPE I,

  ELAPSED TYPE I,

  elapsed_s type string,

  msg type string.

* Write this code to the beggining of GET_DATA method

* Get the time and put in T1.

GET RUN TIME FIELD T1.

* YOUR GET_DATA LOGIC FLOW HERE......

* END OF YOUR GET_DATA METHOD.

* Get the time and put in T2.

GET RUN TIME FIELD T2.

* Calculate the different between T2 and T1.

ELAPSED = T2 - T1.   " In microseconds.

ELAPSED = ELAPSED / 1000000.  " In seconds.

* Display the runtime.

elapsed_s = elapsed.

concatenate 'Get_DATA method total runtime : ' elapsed_s ' seconds' into msg separated by space.

CL_UJK_LOGGER=>LOG( msg ).

endmethod.

former_member186338
Active Contributor
0 Likes

Hi Devi,

You can include simple code inside the badi that will write timestamps for some steps in the package log.

Vadim

P.S. And for sure you have to debug badi execution to ensure that the correct data scope is used on each step...