cancel
Showing results for 
Search instead for 
Did you mean: 

BADI takes longer time to run

Former Member
0 Kudos

Hi Experts,

For one of my requirement, I have implemented a BADI using UJ_CUSTOM_LOGIC method. The BADI logic is to copy records from one version to another version using ct_data.

During testing we are encountering strange performance behaviour from BADI. If  we test the BADI for around 3000 records, it is taking around "6 mins" to run the BADI whereas if I test the BADI for around 1000 records it takes only few seconds to run. We are unable to trace the problem for this.

My script logic to run the BADI is:

*XDIM_MEMBERSET ACCOUNT= ACCT002,ACCT005,ACCT003

*XDIM_MEMBERSET TIME =%TIME_SET%

*XDIM_ADDMEMBERSET TIME = TMVL(1,%TIME_SET%),TMVL(2,%TIME_SET%),TMVL(3,%TIME_SET%),TMVL(4,%TIME_SET%),TMVL(5,%TIME_SET%),TMVL(6,%TIME_SET%),TMVL(7,%TIME_SET%),TMVL(8,%TIME_SET%)

*START_BADI ZCOPY

WRITE = ON

QUERY = ON

CATEGORY = %CATEGORY_SET%

TIME= %TIME_SET%

*END_BADI

Also my ABAPer tested putting time stamp before and after the code and debugged. We found out that the logic takes only fewer time to run, whereas it takes more time for writing back the records to the cube.

We are working on SAP BPC 10 SP 04, BW 7.3

Please help on this.........Are we missing anything from this?

Thanks & Regards,

Priyanka

View Entire Topic
former_member191765
Active Participant
0 Kudos

Avoid select statements inside loop .. write select statements using for all entries if they table(/b28/pwqd06xj & /b28/pwqd0xzm ) are big .. if they are not big get full table and sort the entries using /b28/s_wqd06xj /b28/s_wqd0xzm ...then read using binary search inside the loop.