Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata


To default Storage location in Planned orders which are generated during MRP, BAdI- MD_PLDORD_CHANGE (Method - CHANGE_BEFORE_SAVE_MRP) can be used.

BadI Implementation steps:

* Specify BAdI Implementation Name in Transaction code SE19

* Specify BAdI Definition - MD_PLDORD_CHANGE

* Double click on Method - CHANGE_BEFORE_SAVE_MRP

* Specify required code to default storage location

* Activate BAdI.

Important considerations:

Consider following points while specifying the coding logic to avoid adverse impact on performance of MRP.

* Identify and consider maximum possible restrictions applicable . For example, if default storage location to be assigned only to planned orders pertaining to particular plant, MRP controller, Production scheduler, Low level code, etc; specify all the conditions.

* Following structures will have values, which can be used for restrictions.

Material Master MRP - IM_MT61D( MT61D )

MRP Control Indicator -Material Level- IM_CM61M (CM61M)

Item in MRP document - IM_MDPS (MDPS)

Existing planned order - IM_PLAF_OLD(PLAF)

* Required values to be changed in structure CH_PLAF and CH_CHANGED to be assigned to X.

* Limit number of calls to database

Sample requirement and corresponding coding:

In Material master of all Materials will have Default Production storage location as PP01.

Planned orders which are created automatically will have storage location defaulted from material master as PP01.

Requirement is to change storage location in Planned order to PP02 based on following conditions.

* Plant = 1000 and Production schedulers in (A13, A14, A15)

* Low level code = '000'


IF ( IM_MT61D-WERKS = '1000' AND IM_MT61D-FEVOR = 'A13' AND

IM_MT61D-DISST <> '000') OR


<> '000') OR


<> '000').





Business Example:

In many manufacturing plants it is common practice to consider the same material as both Finished product and Semifinished product. Finished product is directly supplied to customer whereas semifinished product is used in production of another finished product.

This can be explained with an example of Valve manufacturing. One particular Valve can act as Main valve itself or can be functioned as Bypass valve in another Main valve. Though process of manufacturing remains same, valves has to be stored in different storage locations.

Valves (Main Valve) which are manufactured to supply against sales order to be stored in Storage location PP01. Valves (Bypass valve) which are manufactured to issue against another Main valve production order to be stored in Storage location PP02.

It is very important to identify whether Planned order created is for Main valve production or for Bypass valve production. This can be accomplished by defaulting storage location at the time of Planned order creation by MRP with the help of BadI- MD_PLDORD_CHANGE