on 10-18-2012 9:38 AM
Hello Experts,
i am in the beginning of getting an SAP APO DP/SNP-Consultant and really thankfull for your support.
actually i have a problem in writing the first macros..
my problem is the following one:
"Key Figure 2_accumulation" shoult accumulate the Key Figure 1 data for every month FROM THE PAST and ACTUAL CELL
Do i have to write a macro for every cell for accumulation?! there should be a better way of doing so..
Hope i could make out my problem.
Thanks in advance,
Holger
Hi,
use the STEP item to construct a loop and define the time range. Drag a ROW inside the step: it behaves like a CELL, but it iterates through the time range (in the screen, it will show only the first time period, but during execution it will do the iteration from first to last).
regards,
J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James, Thank you for your answer... but i didnt get it..
what do i have to configure? maybe screenshots can help out:
1.Step: ("Accumulation")
2. Item) Row: (Result-level - whole time period )
(do i have to mark Processing Direction:In Past?!)
3.-Item: Raw:
following steps?!
I really appreciate your support! Thanks!
Hi Holger,
There is an easy method to meet your requirement. Pl check the following screenshots for details.
1. Macro
2. Macro implementation - Just 2 lines, but ensure that your settings of 'SUM function' are same as highlighted in the following screenshot.
Macro Function
3. Results.
(Don't give importance to the key figure headings - I have just used the existing ones to demonstrate the macro)
Thanks,
Rajesh
Hi Rajesh,
wow.. this is fantastic! it works perfectly.. thank you for your effort!!!
--
But according to this there is another upcoming problem: if there are no entries for future periods (empty cell) i dont want this macro to add the last number again and again.. (in my case: data for "Absatzplanmenge kumuliert" and "W 02.2012" (and so on)) should be empty...
Thank`s a lot!!!
Best Regards,
Holger
Hello APO-Experts!
according to the macro above, the customer does wish to start the accumulation of my key figure for every year new.
So on January each year it has to start at "0".
What is the best way to do so? Do i have to limit the SUM-Macro for every year? JAN201X - DEC201X) or is there a more "elegant" way to fullfill these requirements?
Thank You.
Holger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Holger,
The easiest way, I could think of using another time series key figure (say TS1) that can hold values of "IST-Auftragsmenge kumuliert" only for the give year. You can define another macro that can copy the values from IST-Auftragsmenge kumuliert to this TS1 key figure on Jan 01 of 201X. Please check the macro template below.
Step 1: All columns //Zero out the values
TS1[i] = 0
Step 2: Copy only the current year values
(all columns)
IF( DATE(YEAR_BDATE(TODAY)) = TODAY ) // condition to ensure one time execution
for ( i = 1; i < no. of columns ; ++i ) //this simple notation is to represent the step iterations..
IF( DATE(YEAR_EDATE(TODAY)) <> DATE(col. attr of any key fig/column) )
TS[i] = IST-Auftragsmenge kumuliert[i]
ENDIF
ENDIF
Test this macro and replace the key figure IST-Auftragsmenge kumuliert in your cumulative sum macro with TS1. Finally, setup a background job to execute this macro once in a year.
Thanks,
Rajesh
Hi Rajesh,
I am sorry, but i dont understand the "body" of this macro at all..
would be very thankful if you coul rebuild this macro (Name of the KF are irrelevant)
i am not working with the macro builder every day so it takes a while (and your help) to geht the macro to work.
maybe this is asking too much, but i would really appreciate it.
Thank You,
Holger
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.