cancel
Showing results for 
Search instead for 
Did you mean: 

How to use timeprofile attribute DAYWEIGHT in KF Calculation within IBP?

0 Kudos

SAP IBP1902:

As per Business requirement I need to display DAYWEIGHT attribute maintained in our time profile against a KeyFigure in Demand planning book. I have written the below calcualtion. This KF is calculated and stored and KF1 is marked as an input.

KF1@DAYPRODLOC = IF ( (''"DAYWEIGHT"'' = ''1''), 1, "KF1@DAYPRODLOC")

Planning area get activated but it is not able to read the attribute value and always populating as NULL.

Any idea how we can use DAYWEIGHT attrbute in the KF calcualtion or any other way to achieve the requirement.

Note: DAYWEIGHT is maintained as 0 or 1 in our time profile based on working days and uploaded against the timeprofile assigned to the planning area.

Accepted Solutions (1)

Accepted Solutions (1)

piyush_parekh
Active Contributor
0 Kudos

Hi Mayank,

Create a stored key figure and add calculation as below:

KF@DAYPRODLOC = IF(0=1, "KF@DAYPRODLOC" ,"DAYWEIGHT")

Mark KF@DAYPRODLOC as stored input in this calculation and put double quote around DAYWEIGHT attribute. This should work.

Regards,

Piyush

Thank You Piyush for the logic, It is working as expected!

Answers (4)

Answers (4)

ankpatel
Contributor
0 Kudos

Mayank, did you try that to do the above calculation? The reason I'm suggesting it because I have used this approach many times successfully. And this will help you to identify the root cause of the issue. If your output of the above calculation is NULL instead of DAYWEIGHT value form the time profile, then that is the issue.

0 Kudos

Hi Ankur

I tried the logic you suggested but it doesn't work as I cannot validate the logic based on the approach you are recommending.

ankpatel
Contributor
0 Kudos

What you mean by you cannot validate the logic? Can you share screenshots? This is the only way to identify the root cause.

ankpatel
Contributor
0 Kudos

KF@DAYPRODLOC = "DAYWEIGHT" (Pass on one of the stored KF @PRODLOC)

Here DAYWEIGHT is the attribute like other's how you use in KF calculation.

0 Kudos

Nope, It doesn't work by just defining KF = ''Attrbute'' or any other mathematical expression used because attribute is not defined as a KF.

ankpatel
Contributor
0 Kudos

Hi Mayank,

Are you using two double quotes (''"DAYWEIGHT"'')? It should be as below for your reference -

KF1@DAYPRODLOC = IF ("DAYWEIGHT" = ''1'', 1, "KF1@DAYPRODLOC")

Also, if above calculation is not working, you create a KF = "DAYWEIGHT" and see what values you are getting.

Regards

Ankur

0 Kudos

1] There is no double quote as when you define a attribute within two single quote and save it is captured that way. The logic is same with what you suggested but no luck.

2] Also, if above calculation is not working, you create a KF = "DAYWEIGHT" and see what values you are getting.

--> For the above calculation to work you have to define DAYWEIGHT attribute as a KF. It is not possible as it has datatype of Integer. Is there any other way you are suggesting to write this calculation? Can you please elaborate.

manoj_gaikwad
Participant
0 Kudos

Have you used two single quotes instead of double quoated before and after ''1'' ?

0 Kudos

Hi Manoj

Yes, there is no issue with syntax as I am using two single quotes before and after 1.