on 2019 Jun 18 2:50 PM
We are using L-code related Shelf life Key figures from SAPIBP1 planning area for our supply planning.
After modeling it based on our business requirement we need Batch Remaining shelf life key figure to be maintained (Day/Product/batch level) in descending order to calculate wastage quantities after a batch expires. Currently we are doing this manually, but how we can achieve this in IBP to be automatically calculated?
We have Batch-Product master data consisting of Expiry Date maintained which we are getting from S/4H system.
Can we achieve this calculation in IBP directly?
Example: Expiry Date 22nd Jan 2019 for Product P1 and Batch B1 maintained in batch-Product master data table
Populate the below values for the Batch remaining shelf life KF as given below
Current Day Current Day+1 Current Day +2 Current Day +3
Batch Remaining shelf life P1 B1 3 2 1 0
Request clarification before answering.
This is achieved with the help from SAP:
Mark the inputs CONSENSUSDEMANDQTY and REMSHELFLIFE for pending for deletion.
Then search for KF: LSLCONSENSUSDEMANDQTY@WKPRODLOCCUSTBATCH and mark as input.
Update the second calculation as follows:
IF( ( "PERIODID5" >= "$$PERIODID5CU$$" ) AND ( "INITLRMNSHLFLIFE" + "$$PERIODID5CU$$" - "PERIODID5" ) >= 0 , ( "INITLRMNSHLFLIFE" + "$$PERIODID5CU$$" - "PERIODID5" ) , NULL )
Make sure both CONSENSSUSDEMANDQTY and REMSHELFLIFE are marked for deletion in the Input Key Figures dialog. Save and activate.
You can tweak the logic based on the planning level you are using in your planning area.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Expiry Date should be Integer type attribute in order to compare with Period ID
Or you can have Expiry date as Decimal and attribute as KF and use that KF in calculation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Mayank,
For Attributes you should use Two Single Quotes instead of usual Double quotes.''EXPIRYDAT'' - "$$PERIODID0CU$$"
Still the issue persist , then use a dummy value instead of "EXPIRYDATE" to test if the logic works. If it works then you need to just ensure that Attribute is maintained in proper format.
Thanks,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manish,
You can achive this by writing below formula
Batch Remaining Shelf Life = IF("PERIODID0" < "PERIODID0$$", NULL, "Batch Expiry Date - PERIODID0$$) - ("PERIODID0" - "PERIODID0$$")
Please format the Syntax, But I suppose you got the Zest of the logic.
Basically you have to ensure that Master Data attribute to have Expiry date you maintained is part of the Planning Level if Batch Remaining Shelf Life. And have to maintain it in particular format do that Attribute subtraction is possible in the formula.
So For Example: Expiry Date is three days from now. Then
Batch Remaining Shelf Life (Current date) = 3 - 0 = 3
BAtch Remaining Shefl Life (Tomorrow Date) = 3 - 1 = 2
and so on.
Thanks,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj
I had already tried writing the logic similar to what you are suggesting:
IF(0 = 1, "REMSHELFLIFE @DAYPRODBATCH" , (( "EXPIRYDATE" - "$$PERIODID0CU$$" ) - ( "PERIODID0" - "$$PERIODID0CU$$" )))
But it throws an error while loading the KF: SQL execution error Error with sub-query task 0000 KNDLINT __BASELINE Issue in 'IBP Backend Services' SCM-IBP-XLS-SRV, contact your admin and mention log handle
Is there anything missing or you can suggest on this?
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 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.