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

DM Package Execution Time -- Calculations (Logic) and Overheads

Former Member
0 Likes
765

Hello,

I run a DM Package. This package triggers execution of a script logic program. The package runs for about 15 minutes (Package End Time minus Package Start Time).

Package log tells me that calculations (logic) runs for about 1 minute:

\CPMB\MODIFY: 0 sec

\CPMB\ALLOCATION_LOGIC: 70 sec

\CPMB\CLEAR: 0 sec

I'm trying to figure out what the rest of the time is spent for? 15 min - 1minute = 14 minutes of 'overheads'. How can I trace package execution and identify these 'overheads'?

Thank you in advance for any suggestions,

Best regards,

Valery

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

I've found an SM37 job log associated with the DM package run described above

The beast gets stuck someplace between BW process chain (message class RSPC) and database readinng (message class DBMAN). Spends these 14 minutes waiting for something, then goes on.

Maybe that can clarify something.

Best regards,

Valery

former_member186338
Active Contributor
0 Likes

Sorry, but have to ask once again: "Please show Formula log and the script text!"

former_member186338
Active Contributor
0 Likes

And also try to run some script doing nothing... Like:

*XDIM_MEMBERSET xxx=yyyy

Former Member
0 Likes

Vadim,

The issue in fact includes several different logics demonstrating the same behaviour.

When logic is run by only one user at at time, it works as expected.

When two or more users run the same logic (but on different data slices) at the same time -- these calculations look like being executed one after another.

Analysis of RSPC stuff shows the the task RUNLOGIC within \CPMB\ALLOCATION_LOGIC process chain can serve only one user at a time.

Not sure this has anything to do with any specific logic.

I'll be back with an example of logic and corresponding formula log.

Best regards,

Valery

former_member186338
Active Contributor
0 Likes

"but on different data slices" - data lock may happen!

"Analysis of RSPC stuff shows the the task RUNLOGIC within \CPMB\ALLOCATION_LOGIC process chain can serve only one user at a time." - script logic can run in parallel: How To Implement the RUNLOGIC_PH Keyword in SAP... | SCN

Former Member
0 Likes

Vadim,

Please find attached an example: logic and its formula log.

Thank you and best regards,

Valery

former_member186338
Active Contributor
0 Likes

Ups, very strange script:

1.

*XDIM_MEMBERSET COSTC=%BAS_HQ%

...

*WHEN COSTC

*IS %COSTC_SET%  // will be executed only when %COSTC_SET% is in %BAS_HQ%

2. Replace:

*WHEN ROWS

*IS JAN

*REC(EXPRESSION=(%VALUE%+[FLOW].[CNTR_PMT])*("$PERCENT1$"/100),FLOW=FLOW_NONE,TIME=$YEAR$.01)

*ENDWHEN

*WHEN ROWS

*IS FEB

*REC(EXPRESSION=(%VALUE%+[FLOW].[CNTR_PMT])*($PERCENT1$/100),FLOW=FLOW_NONE,TIME=$YEAR$.02)

*ENDWHEN

...

with:

*WHEN ROWS

*IS JAN

*REC(EXPRESSION=(%VALUE%+[FLOW].[CNTR_PMT])*("$PERCENT1$"/100),FLOW=FLOW_NONE,TIME=$YEAR$.01)

*IS FEB

*REC(EXPRESSION=(%VALUE%+[FLOW].[CNTR_PMT])*($PERCENT1$/100),FLOW=FLOW_NONE,TIME=$YEAR$.02)

...

3. What is the idea with $PERCENT1$, $PERCENT2$, $PERCENT3$ overwriting destination in slightly different way?

Vadim

former_member186338
Active Contributor
0 Likes

I can recommend to have:

*SELECT(%BAS_BRN%,[ID],COSTC,CCTYPE=F AND ID=%COSTC_SET%)

*SELECT(%BAS_HQ%,[ID],COSTC,CCTYPE=A AND ID=%COSTC_SET%)

Then you can remove:

*WHEN COSTC

*IS %COSTC_SET%

Also remove repeated XDIM_MEMBERSET's...

akos_beres
Contributor
0 Likes

Valery,

Vadim's recommendations should help speeding up script logic. One other item in addition that you might want to explore is parallelization. It seems you have good BW skills. Look at note 1792408 for details.

https://launchpad.support.sap.com/#/notes/1792408

Hope this helps!

Akos

Former Member
0 Likes

Hi Valery,

Have a look at this SAP note 2236636

we had an issue that only one process can execute at once, the others will be on hold, and SAP created this note to resolve our issue.

Andy

Former Member
0 Likes

Hi Valery,

Did you have another DMP running script logic at same time? If you did, can you verify that RUNLOGIC step started as soon as that other DMP completed?

If this is the case OSS Note that Andy suggested should help you.

Regards,

Gersh

Former Member
0 Likes

Hello Andy,

Applying the note solved our issue.

Thank you very much and best regards,

Valery

Former Member
0 Likes

Hello Akos,

We solved this issue by applying the note suggested by Andy (please see above).

I couldn't locate the parameter mentioned in the note 1792408 in IMG for Planning and Consolidation. Could you please advise where can I find this parameter?

Thank you,

Valery

former_member186338
Active Contributor
0 Likes

Anyway, I recommend you to review the script text to improve the speed....

Former Member
0 Likes

Thank you, Vadim,

The logic definitely has room for improvement. Scope management is first obvious thing to work on, as well as some other stuff.

Best regards,

Valery

Former Member
0 Likes

The script above is in fact a linear combination of three different allocations, $PERCENTx$ are weights of each allocation (100% in total).

Not sure about overwriting destination, these three allocations are added up.

Best regards,

Valery

akos_beres
Contributor
0 Likes

Valery,

You need to add the parameter.

Here is a step by step document for that

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0255ebe-8a1b-3110-de89-dd2b81b9c...

Akos

former_member186338
Active Contributor
0 Likes

Clear with %PERCENT%, but the rest has to be improved...

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

Please show Formula log and the script text!

Vadim