cancel
Showing results for 
Search instead for 
Did you mean: 

Last Period AggregationQuestion: Keyfigure HINVENTORYTARGET SAP2

Former Member

Hi,  in SAP model SAP2,  there is the following key figure set up with last period aggregation:

HINVENTORYTARGET@PERPRODLOC

It has two Inputs:

       1.  INVENTORYTARGET@PERPRODLOC

       2.  HKFPER@PER1

However there is no HKFPER@PER1?  Only HKFPER@PER and HKFPER@PER@PERPRODLOC

Where did HKFPER@PER1 come from? 

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

satish_waghmare3
Active Contributor

Hi JT T,

I find Last Period Aggregation as very tricky in IBP.

Regarding your question on HKPER @ PER1 - I suggest you to check the helper keyfigure - HINVENTORYTARGET.  This has calculation defined at PERPRODLOC level. If you check Input Keyfigure in the calculation, you will see HKPER @ PER1 is being used. However it is not defined as an separate keyfigure calculation anywhere. There is attribute transformation for PeriodID at level PER1 and it has calculation like - PERIODID @ PER1 = "HKFPER @ PER".  This brings values of HKPER back into PERIODID but only with last month of respective quarters.

Regarding HINVENTORYTARGET @ PERPRODLOC = "INVENTORYTARGET @ PERPRODLOC"    calculation which has HKPER @ PER1 as input :

This is required as to get result at the last month for the respective quarters. As I read from some help documents it helps force the join between original dataset and numbers at last period. Hence effectively having those records with last months of respective quarters.

Hope this will help.

Thank you

Satish Waghmare

Former Member

Hi,

In the LPA, in general there are two parts of calculation. First part is to determine last period for the periods of time level requested by user (i.e. time at Request level). As a part of this calculation, following attribute transformation is used:

PERIODID@PER1="HKFPER@PER"

Becuase of the above calculation HKFPER is also available at PER1.

In fact this calculation can be reused in all LPA calculation.

Hope it helps.

Regards

rinju

Former Member
0 Kudos

Thanks Satish and Rinju!   Yes,  LPA is tricky,

Trying to replicate the steps from SAP2.  Does this seem like right steps and right order?

1Create PER Planning Level (lowest level selected as root,  ie month)
2Create PER1 (periodid as root)
3Create Helper KF HKFPER at PERPRODLOC(HKFPER@PERPRODLOC = periodid)
add calculation at PER(HKFPER@PER = Max(HKFPER@PERPRODLOC)
4Periodid attr transform:Periodid@PER1 = "HKFPER@PER)
5Create new helper keyfigure  HINVENTORYTARGET @ PERPRODLOC
     two inputs:  input =INVENTORYTARGET@PERPRODLOC
input = HKFPER@PER1
6Create calculationHINVENTORYTARGET@REQUEST = sum (HINVENTORYTARGET@PERPRODLOC)
8add calculation for inventorytarget@requestINVENTORYTARGET@REQUEST=HINVENTORYTARGET@REQUEST
Thanks/Regards
satish_waghmare3
Active Contributor

Hello JT T

You absolutely nailed it.  I did verify this in SAP2 model  Yes, these are exact steps in their order.

As you can see, LPA requires understanding of Attribute Transformation, Helper Keyfigure, how Planning Levels are defined PER and PER1, Input keyfigure selection for calculation and so on.  The reason it is a bit tricky to get it.

Thank you

Satish Waghmare

0 Kudos

Dear experts,

thank you for your input! I applied this logic to our SAP4 calculated key figure INVENTORYTARGET (we use week as lowest time profile level):

The logic works just fine, as I receive the value of the last week in the monthly planning view.

However, if I look at the key Figure in the weekly planning view, the key Figure shows a blank value. It calculates correctly from the input key figures but is simply invisible in the weekly view.

Key Figure INVENTORYTARGET looks as follows:

INVENTORYTARGET@REQUEST = "HINVENTORYTARGET@REQUEST"

INVENTORYTARGET@PERPRODLOC = "TARGETSAFETYSTOCK@PERPRODLOC" + "INVENTORYTARGETADD@PERPRODLOC"

Any help how to make the key figure visible again at weekly level, but keep the working last period aggregation when I switch to monthly level?