cancel
Showing results for 
Search instead for 
Did you mean: 

Details Only Macro Behaviour during execution at drill down

Former Member
0 Kudos

Dear Experts

I have this situation

KF 1 is copied to KF2 using Macro.. both interactive (save) and background

This macro is "supposed" to execute at lowest level of detail.. because that's what I defined in the macro (and also the level of agg. in the BG job)

Both Key figures have "zero allowed" not checked in the planning area. i.e. they are NOT making a distinction between null and initial values, per SAP help.com

Case1:

SDP94: I load a selection... some random data.

I drill down on some header char. So I have some char values listed

I NOW make changes to SOME details of KF1 in some bucket. Some are left blank.

I now execute the macro.

I see that BLANKS in KF1 are NOT copied to resp. rows of KF2. Only those with non zero Values in KF1 are copied to KF2 resp. rows. The existing values of KF2 for other drilled down details does NOT change.

Case2:

SDP94: I load the same random selection above

No drill up and drill downs.

I did NOT make a any change to KF1.. whose total value in the Bucket above in 100

I now execute the same macro

I see KF1 is now copied to KF2.. with blanks and values as expected in KF2 in correspond characteristic values. Existing values of KF2 are all gone.

I expected that case2 will happen irrespective of what level of drill down I am currently in, when I am executing the macro FROM SDP94

Questions :

1) Is this a bug?

if not

2) Does the macro that is supposed to execute at lowest level of detail, change its behavior depending on what drill down situation I am in ?

3) Does making Zero allowed for KF1 have kept results in case1 same as in  case2, current drill down notwithstanding ?

4) SHOULD I set the Macro to execute at "all Planning objects".I know its hard to visualize the business context but you can make suitable assumptions and add the conditions ?

Application: SCM7.0 Eph1

No cryptic developments of any kind.

Regards

Borat.

Accepted Solutions (1)

Accepted Solutions (1)

former_member187488
Active Contributor
0 Kudos

1) Currently hard to judge but I don't think it's a bug -- the logic behind such simply macro should already be cleared by SAP.

2) Yes, though in the macro you set it to be executed at the detailes level, it also depends on the drill down situation in the planning book. Here 'detail level' always means the most detail level in CURRENT planning book, instead of the real detail level to each CVCs. That's to say, the macro will run at aggregated level if you do not perform any drill down in the planning book (in scenario 2).

3) I don't think 'zero allowed' concerns here.After you make changes in scenario 1, try to perform a save and then run the macro. Does it make any difference?

4) It's really hard to imagine, because if you set 'all planning objects', macro will also be executed at each aggregated level in scenario 1, and then dirll down will happen according to the calculation type of the key figure.

Former Member
0 Kudos

Thank you Ada for the detailed response,

Here 'detail level' always means the most detail level in CURRENT planning book, instead of the REAL  detail level to each CVCs.

This is real surprise vis-à-vis what the help documentation says. I thought "Details only" means ALWAYS at the LOWEST/REAL level of detail no matter what the current drill down situation.is....

if  this is not the case (as you explain) then, wouldn't "All Planning Objects" make a better sense for this macro in question ?

Lets assume for simplicity sake for a while that this macro is manually executable and not assigned to any event (default, save, level change).

Let me check 3) again and update

Many Thanks

Borat

Former Member
0 Kudos

Hi Ada,

I re-construct this example in the mind

CVC GUIDs = PRODUCT X COUNTRY X CUSTOMER X CHANNEL

Understand them at face value.. they could be anything.

Calc Type of both KF1 and KF2 is S (pro rata)

Step1: Load Selection = Show PRODUCTS=all for COUNTRY=A

Step2: Drill down by CUSTOMER

Step3: Make a change to KF1 for SOME customers out of total of 10 Customers that is restricted by the selection above.

C1-10

C2-10

C3-10

C8-10

C4,5,6,7,9,10 - Blank

Initial Values in KF2 is

C2-20

C3-30

C8-10

C9-20

C7-10

C1, C4, C5, C6, C10- - blank

Step4: SAVE.

We are still at drill down by Customer

Step5: Execute the Copy KF1 to KF2 Macro that is set to Details only.

               What should be the result in KF2 ?

Step6: I say Customer = Total at header.

Step7: I execute the Macro again

               What should be result in KF2.?

Sorry I don't' have a access to original system yet.. so this is for meanwhile.

Thanks

Borat.

former_member187488
Active Contributor
0 Kudos

Hello Borat,

Yes, you're right, it is somehow confusing with the setting 'executed only on detailed level' in the macro

After step 5, I would expect KF2 has the same value as KF1 at drill down by customer level, for each customer.

After step 6, I don't think there will be any change on KF2. Because after step 5, the value of KF2 on total level will be auto adjsuted to be the same as KF1. So now if you copy KF1 to KF2, there will be no change on KF2, thus no disaggregation will be triggered.

Best Regards,

Ada

Former Member
0 Kudos

After step 5, I would expect KF2 has the same value as KF1 at drill down by customer level, for each customer.

Thanks Ada,

This is where it is confusing. Step5 does NOT copy every CVC (of the selection) of KF1 to KF2.

i.e.

When I am at drill down by customer and execute the macro, the KF2 is not same at KF1. Only the values that are Changed in KF1 are copied to KF2's corresponding CVC's (it is not ditto as my actual details level  in POS is more granular but that's fine and besides the point). What is not fine is existing Value of KF2 remains as it is. I expect all values in KF2 to change based on KF1 values. This is just a simple copy. Calc type for both is pro rata.

Am I missing to interpret something very basic here :-). I usually get confused on basics ?

At Step6.. if I make a change at Totals level (per product here just for simplicity) and then Save and then Drill down by customer, the KF2 values now change based on KF1.

Many Thanks 🙂 🙂 🙂

Borat.

former_member187488
Active Contributor
0 Kudos

Hello Borat, That's really strange ... how did you design your macro?

Former Member
0 Kudos

Thanks Ada for coming back.

This is the syntax,

IF  KF4=0,

     KF2 = KF1

ELSE

     KF2 = KF4

ENDIF

No Direct Execution

Executes at "Details Only"

Assigned to Save Event

All key figures disaggregated Pro Rata.

In the example above it is KF4 that is being copied to KF2.

Note that the results of macro I am talking of is in interactive mode only. This is not an issue in Background.

Thanks

Borat.

former_member187488
Active Contributor
0 Kudos

Hello Borat,

This becomes confusing because now there're 3 KFs involved. Can you please just test the most simple case, that copies KF1 to KF2 directly, and test whether it works as expected? By this way you can make sure the SAP internal logic works correctly, and then test your own macro logic.

If you want to understand more internal logic of the macro, going into the coding would be a good way.

Best Regards,

Ada

Former Member
0 Kudos

Thanks Ada,

Let me recreate and check in another system. No access to original system.

Answers (0)