cancel
Showing results for 
Search instead for 
Did you mean: 

Flexible Forecast consumption BADI not working

Bhanu_Chandar
Explorer
0 Kudos

Hello, 

I'm hoping someone can help me with my urgent query on flexible forecast consumption BADI. 

We have implemented MD_PIR_FLEX_CONS to consume PIR based on requirement plan. We have 3 different types of forecast for example OEM, Spares and Repair for a material.  

We are loading these 3 forecast type in MD61 as different requirement plan and consumption indicator '4' 

Our logic is to consume relevant forecast based on the distribution channel and schedule line category of a sales order line item. i.e if sales order is for distribution channel 10, then OEM forecast should consume and for 30 spares so on....

When we look at MD04 and or MD73 we can see forecast is getting consumed from correct bucket but when we run MRP, BADI is been called but MRP is create duplicate planned orders without consumption. for example if we have Independent req of 100 and sales order of 50 for OEM, in MD04 we can see PIR after consumption equal = 50 and Sales order = 50. But MRP is created planned orders for 150 qty.

During debugging the implemented BADI we have found that for MRP transactions like MD02/MD03 internal table IM_MDPS (method - GET_REQ_CONS_CHARACTERISTIC) is blank (missing value for field - DELNR) for MRP element 'VC' (sales order) but it has details for all other MRP elements. Whereas for transaction like MD04, same internal table IM_MDPS inside the BADI would have 'VC' sales order details.

Since for MRP run transaction IM_MDPS table has no sales order details consumption is not happening and MRP would create duplicate planned orders.

While doing some research I have noticed, for MRP on HANA there is a similar issue with MD05 -MRP list where Sales order and dependent req MRP element would display blank. Very similar behavior as our issue. 

I have also looked at table MDTB for the material, same issue, missing 'DELNR' field for 'VC' MRP element type. 

Would you be kind enough, what am I missing here. Why IM_MDPS is blank for VC elements for MRP transaction.

We are on S/4 HANA 2021 on premise using classic MRP

View Entire Topic
Caetano
Product and Topic Expert
Product and Topic Expert

Hello

In S/4HANA sales orders are aggregated when read by MRP, in order to improve the MRP performance. 
You can turn the aggregation off by implementing modification note 2879808.

Regards,
Caetano 

Bhanu_Chandar
Explorer
0 Kudos
Hello, Thanks a lot it worked. But I have a follow up on this. As per SAP Note, this modification would only work for classic MRP. In future we would like to use MRP live. How can we turn off requirements aggregation for MRP live. If we can’t is there another way that Flexible consumption BADI would still get non aggregated data. Or there is any BADI we can use to for forecast consumption that would work with MRP live.