Enterprise Resource Planning Blog Posts by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Caetano
Product and Topic Expert
Product and Topic Expert
86,512

MRP is a very flexible tool with lots of customizing settings and master data settings, however, sometimes is not possible to achieve some business requirements using only standard customizing and master data settings.

For that reason, some BAdIs were introduced on the standard programs, to allow the customers to use a custom logic on the standard MRP.

If you are facing any problem with a BAdI implementation, take a look on note 2012620 where the frequent issues with BAdIs on MRP are described.

Below you will find a list of the most important and useful BAdIs on MRP:

  • MD_CHANGE_MRP_DATA: In my opinion, it is the most important BAdI on MRP. It allows you to change any MRP element during the MRP or on MD04 transaction. The most common use is to make an MRP element not relevant for MRP but it can be also used for another changes, such as changes in quantities, for example. You can find an example of implmenentation on the document Making an element not relevant to MRP using BAdI MD_CHANGE_MRP_DATA.
  • MD_SUBCONT_LOGIC: This BAdI is used to activate the old subcontracting logic which was used until release release 3.1I. All subcontracting stocks and requirements are managed in the net segment, which means that there are no separate subcontracting segments. See also note 1927160.
  • MD_ADD_ELEMENTS: With this BAdI is possible to include a new user-defined MRP element.
  • MD_DISPLAY_ELEMENT: Allows you to change the display of an MRP element.
  • MD_MRP_PARAMETERS: With this BAdI is possible to change the settings from material master, customizing or even quota arrangement for an specific material, before the MRP run or in MD04, for example.
  • MD_ADD_COL_EZPS: With this BAdI it's possible to include additional columns on the MRP evaluation transactions (MD04, for example).
  • MD_PURREQ_CHANGE and MD_PLDORD_CHANGE: Can be used for fill and change fields of purchase requisitions and planned orders created, changed or deleted during the MRP run.
  • MD_PURREQ_POST and MD_PLDORD_POST: Can be used for additional actions after the purchase requisition and planned order changes, such as saving information on a custom table, a workflow or implementing a change log. It should not be used for changing the order itself.
  • MD_MODIFY_SOURCE: This BAdi allows you to define your own logic for the source determination during the MRP run.
  • MD_MODIFY_PRODVERS: This BAdi allows you to define your own logic for the production version selection.
  • MD_PLDORD_SCHEDULING: With this BAdI you can change the scheduling parameters for planned orders before scheduling is called.
  • MD_STOCK_TRANSFER: This BAdI allows you to change the requirement dates of the requirements of stock transfer procurement proposal in the issuing plant.
  • MD_EXT_SUP: On the standard system, there is no determination of the issuing storage location for stock transfers, however, it is possible to create your own logic to select the issuing storage location for stock transfers using this BAdI. You can find more information about MD_EXT_SUP on note 1783556 and on wiki http://wiki.scn.sap.com/wiki/x/qgQbF
  • MD_CHANGE_CALENDAR: This BAdI can be used to use a different calendar for the safety time and the evaluations of the range of coverage data, instead of the factory calendar.
  • MD_EXCLUDE_MATERIAL: Can be used to show a tab with "Additional Selections" on the initial screen of transactions MD06 and MD07 where you can add your own fields to restrict the selection.
  • MD_LAST_LOT_EXACT: Allows you to use your own logic to calculat the last lot on a sales or project individual stocks.
  • MD_MRP_LIST: With this BAdI you can process data from the MRP list of a material during posting in the planning run. It allows you to evaluate the MRP data immediately after the planning run and trigger follow-up actions, however, you cannot change the MRP data.
  • MD_INTERACT_PLANNING: With this BAdI it's possible to control is users are allowed to change MRP elements in the results display of the planning transactions for a material (such as MD02).
  • MD_SET_TRAFFIC_LIGHTS_DS: With this BAdI you can define your own limit values for the range-of-coverage evaluation for certain materials. See note 1587375 for more details.
  • MD_PURREQ_REL_STRAT: This BAdI can be used to deactivate the release strategy for purchase requisitions generated by MRP.
  • MD_CREATE_GROUPING: You can use this BAdI to define a customer-specific grouping of materials for the current stock/requirements list.
  • MD_MRP_RUN_PARALLEL: Can be used to adjust the number of materials which are assigned to a process for each planning package when running parallel MRP. That way, it is possible to achieve a more uniform utilization of the tasks when there are extremely different runtime of the individual application servers or of the tasks.
  • MD_ADAPT_DISTRIBUTION: This BAdI was delivered to influence the start/end date and the factory calendar used for the distribution of quantities on the MRP transactions, when using a distribution key.

You must be very careful when implementing any of these BAdIs, since generally there is not check after the BAdI execution and it is possible to make deep changes on the MRP standard logic.

In order to find a complete list of the BAdIs available for MRP, just look for BAdIs starting with MD on transaction SE18.

It is possible to know if a BAdI is active by the indicator "BAdI Active" on transactions MD04 and MD05.

You can also find the complete list of available MRP BAdIs and more information about each BAdI on SPRO, on the following path:

- Production - Material Requirements Planning - Business Add-Ins for Requirements Planning

BR

Caetano

31 Comments
Jelena_Perfiljeva
Active Contributor
0 Kudos

Please add ABAP tag, so that it shows up in the ABAP space too. Thank you!

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Jelena

The BAdI tag was already included on the blog.

BR

Caetano

Jelena_Perfiljeva
Active Contributor
0 Kudos

Not BADI - ABAP. If you tag it with ABAP, it will also appear in the ABAP space on SCN.

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

ABAP tag added. Thaks for the tip.

Former Member
0 Kudos

Thanks for sharing

svs_sap
Active Contributor
0 Kudos

Good blog, this list really helps. Thank you.

Ritz
Active Contributor
0 Kudos

caetano.almeida,

Good Blog, Thanks for sharing.

Ritesh

Former Member
0 Kudos

Hi Almeda,

It will be great if you can provide two three simple business examples on each of the BADi

May be youcan write another blog with examples elaborating the same.

Thanks for sharing this too.

Regards,
Mandar.

raphael_dasilva
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Caetano,

Thanks for summarizing this important information!

Best regards,
Raphael

Former Member
0 Kudos

Very good summazization,

thank you

former_member184595
Active Participant
0 Kudos

Hello Caetano,

Great compilation of MRP Related BADIs. Thanks for sharing the same to all. :smile:

Former Member
0 Kudos

Hello Caetano,

Helpful !!!!

Thanks and Regards

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you all for the feedback!

MarianoCabalen
Active Contributor
0 Kudos

Hi Caetano,

Very Helpful document!!

Thanks a lot.

UmeshMali4994
Active Contributor
0 Kudos

Its very helpful document ,,
Please keep sharing your knowledge

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Umesh and Mariano

Thank you both for the feedback!

BR

Caetano

Former Member
0 Kudos

Hi,

I am getting different screen of MD04 / MD05, could you help me to get the same screen as informed above.

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Vijay

Please open a new thread with your questions.

BR
Caetano

Former Member
0 Kudos

Caetano,

Is it possible to EXCLUDE the available quantity (available stock for MRP) for a given material, however - at the same time - not to exclude the material from planning in MF50?

I mention this, as this result is not possible by using MMSC, in my opinion.

Regards,

Andras

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

I have never tested on MF50, but on MD04 I know that it is possible. Try to make the same changed proposed on Making an element not relevant to MRP or MD04 using BAdI MD_CHANGE_MRP_DATA.

BR
Caetano

0 Kudos
Nice & very useful document!!! Thanks
VitaliT
Explorer
0 Kudos
Hi Caeton,

Is there any possibility to control "individual and coll. reqmts flag" (MARC-SBDKZ) by one of the user exits mentioned by you.
We cannot change this flag from "2" to "0", but we need "0-functionality" for some business scenarios.

best regards
Vitali
Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello

Did you try MD_MRP_PARAMETERS?

Regards,

Caetano
0 Kudos
Hi Caetano,

Thanks a lot for sharing shuch valuable information.

We are a construction company, we assign material components to project activities in CJ20N (Stock Items "Category L" that trigers procurement type: "Resevation for WBS element".

I'm going to implement BADI_MAT_CUST_SCR of enhancement spot: ES_BADI_MAT_CUST_SCR_PS) to create customer-specific fields for the material component on a separate tab page. These fields will be :



    1. Purchasing Organization

    2. Contract Number

    3. Estimated Material Price




My question is: Is there any BADI to fetch these data from the customer-specific fields (along with the Storage Location from the Proc.Param. tab page) into the automatically generated MRP PR?

 

Regards,

Amr
csaba_timar
Explorer
0 Kudos
Hello All!

Is it possible that standard follow-up material logic is failing when follow-up material added in the BOM items?

 

Is it possbile to change the follow up logic with these BADIs?
Hi Experts,

Any BADI could approach that MRP run to create PRs with specific difference  storage location without active MRP area function?
Hi Almeida,

Really grateful for your sharing, even though it's already 9 years ago. It's never too late to express the appreciation.

It is so beneficial for me.

Thanks.
former_member856033
Discoverer
0 Kudos
Hi,

 

We are using the new Badi PPH_MRP_RUN_BADI to implement chang log of planned order.

 

Do you have some way to save log of planned order on MRP Live S4?

 

 

 
0 Kudos

Hello ALL,

First of all thanks for your blogs @Caetano they provides more information about  flexibility of MRP.

Recently we have a requirement for considering the customer consignment stock as available stock in MRP planning .

I know that the special stock is not considered in MRP assuming that it is a existing element therefore tried to use BADI-MD_CHANGE_MRP_DATA method CONSIDER_CUSTCONSIGNMENT to Influence that MRP considers the CCS as available stock i have done below changes.

  METHOD if_ex_md_change_mrp_data~consider_custconsignment.
    ch_no_exit abap_true.
    ch_changed abap_true.
  ENDMETHOD.
  

While running the MD02 and MD04 the BADI itself it is not triggering, i don't what mistake i have done here .

I also tried with BADI -  MD_ADD_ELEMENTS method ADD_CHANGE_ELEMENTS the with changing parameters CH_COPY_MDPSX,CH_CHANGED to X in this case the Badi got triggered but no value changed in MD04 .

In this Badi we want to add the DELKZ  = KK for customer consignment stock but the while checking in CH_COPY_MDPSX there is no entry for KK,is it there any option to consider the KK in this method 

Notes referred - 2012620,301681,

Can someone throw some light on this topic it would be really helpful, thanks 

Br,

Charan

 

 

Caetano
Product and Topic Expert
Product and Topic Expert

Hi Charan

This is a technical question on a very specific scenario. Can you please post this question on a separate thread? Otherwise we might have endless discussions on blog posts and it will be difficult for other users with the same issue to find the solution. 

Regards,
Caetano 

0 Kudos

Yea,sure it make sense to have a separate thread ,may be it will be useful for others