cancel
Showing results for 
Search instead for 
Did you mean: 

Exclude requirements calculations and planned orders using BADI MD_ADD_ELEMENTS

Hannyi
Explorer
0 Kudos

Dear Experts,

We realized MD_CHANGE_MRP_DATA in the ECC system.
If planned orders(PLAF Table) have already been created for a sales order,
requirements are not calculated and no change Planned orders.
MD_CHANGE_MRP_DATA will no longer be called in S4 HANA, MD_ADD_ELEMENTS will be called instead.
We would like to achieve the same thing with my S4 HANA system.
MD_ADD_ELEMENTS does not have a parameter for CH_EXIT,
so if delete an element for which requirements are not calculated in the CH_COPY_MDPSX internal table, the planned order will be deleted.

Is there a way to exclude requirements calculations and no change planned orders using MD_ADD_ELEMENTS on S4 HANA system same as ECC system?

Accepted Solutions (0)

Answers (3)

Answers (3)

Caetano
Product and Topic Expert
Product and Topic Expert

Hello

I'm not sure if I understood exactly what you want to do. 

This BAdI is called after classic MRP or MD04 read the planning elements from the database, but before the actual MRP net requirements calculation. Therefore, if you delete a requirement from MDPSX using this BAdI, MRP will delete the respective planned order during net requirements calculation, because there is no requirement for the respective planned order.

Perhaps you can set the firmining indicator for the planned orders using the BAdI, so that MRP does not change the planned order (this change will not be saved into the database). 

Best regards,
Caetano 

Hannyi
Explorer
0 Kudos
Hello Caetano, Thank you for your support.
Hannyi
Explorer
0 Kudos
Hello Caetano, Thank you for your support. The Badi's parameters seem to have no firmining indicator field for the planned orders. I tried setting MDPS-VSTAT to 「N」, but the result was that PLAF was re-registered. Could you please tell me which field the firmining indicator refers to? Currently, we are calling the RMMPS000 program to perform MPS processing. We noticed that before calling badi MD_ADD_ELEMENTS, the existing plaf deletion data is retrieved and set in an internal table(※). ※CL_PPH_MDPSX_POSTPROCESSING⇒FINALIZE_MDPSX_CDS →CL_PPH_MDPSX_POSTPROCESSING⇒SEPARATE_OLD_PROC_PROPOSALS Is it possible to edit the MRP ELEMENT (CH_COPY_MDPSX) using BADI MD_ADD_ELEMENTS and leave the existing PLAF intact and avoid deletion and re-registration? Best regards, Hannyi
Hannyi
Explorer
0 Kudos

Hello 

Thank you for your support.

The ECC system has implemented the following customer requirements.
If a plan order linked to a sales order is registered,
The registered plan order will not be changed even if the quantity of the sales order changes.

ECC system requirements implementation image
1.Create Sales Order
-----------------------------------
Create Sales Order
Sales Order:200000001
Material :MA01
Quantity :10

Execute RMMPS000
MD_CHANGE_MRP_DATA-CHANGE_MDPSX_PLAF etc.
※Customer requirements implementation
Parameters「CH_EXIT」Not set.

Execution result(Plan Order Created)
Plan Order :150001
Sales Order:200000001
Quantity :10
-----------------------------------
2.Change Sales Order
-----------------------------------
Change Sales Order Quantity
Sales Order:200000001
Material :MA01
QTY :20

Execute RMMPS000
MD_CHANGE_MRP_DATA-CHANGE_MDPSX_PLAF etc.
※Customer requirements implementation
Parameters「CH_EXIT」= 'X'.

Execution result(Point:The planned order number and quantity are the same as before running RMMPS000 and remain unchanged.)
Plan Order :150001
Sales Order:200000001
Quantity :10
-----------------------------------

We are currently converting from ECC to S4 HANA.
In S4 HANA, we would like to achieve the same requirements as ECC.
but the problem is that when we change the quantity of Sales Order and run RMMPS000,
the planned order and quantity has changed as blow(re-registration).

1.Create Sales Order
-----------------------------------
Create Sales Order
Sales Order:200000001
Material :MA01
Quantity :10

Execute RMMPS000
MD_ADD_ELEMENTS-ADD_CHANGE_ELEMENTS.
※Customer requirements implementation
Do not change Parameters 「CH_COPY_MDPSX」

Execution result(Plan Order Created)
Plan Order :150001
Sales Order:200000001
Quantity :10
-----------------------------------
2.Change Sales Order
-----------------------------------
Change Sales Order Quantity
Sales Order:200000001
Material :MA01
QTY :20

Execute RMMPS000
MD_ADD_ELEMENTS-ADD_CHANGE_ELEMENTS.
※Customer requirements implementation
How can we edit Parameters "CH_COPY_MDPSX" to achieve ECC requirements?

Execution result(Point:The planned order number and quantity has changed.)
Plan Order :150002
Sales Order:200000001
Quantity :20
-----------------------------------

Best regards,
Hannyi

Hannyi
Explorer
0 Kudos

Hello Caetano,

Thank you for your support.

The Badi's parameters seem to have no firmining indicator field for the planned orders.
I tried setting MDPS-VSTAT to 「N」, but the result was that PLAF was re-registered.
Could you please tell me which field the firmining indicator refers to?
Currently, we are calling the RMMPS000 program or T-code:MD40 to perform MPS processing.
We noticed that before calling badi MD_ADD_ELEMENTS, the existing plaf deletion data is retrieved and set in an internal table(※).
※CL_PPH_MDPSX_POSTPROCESSING⇒FINALIZE_MDPSX_CDS
→CL_PPH_MDPSX_POSTPROCESSING⇒SEPARATE_OLD_PROC_PROPOSALS.

Is it possible to edit the MRP ELEMENT (CH_COPY_MDPSX) using BADI MD_ADD_ELEMENTS and leave the existing PLAF intact and avoid deletion and re-registration?

Best regards,
Hannyi

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello, 

I don't know exactly what do you mean by re-registration, but I can confirm that this BAdI will not save any changes into table PLAF. 

Regards,
Caetano