cancel
Showing results for 
Search instead for 
Did you mean: 

User exit in planned Orders

Former Member
0 Kudos

Hello all.

I have been search for a user exit in planned orders that allow me to define some code in it to triger some changes. this user exit should be at time of planned order is saved.

I have already search in this forum and I found out how to find the user exits by transaction. I have tried for transaction MD12 but did not found any suitable user exit.

Does any one know any user exit that could make my life easiser

thanks

Manuel Antonio

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi Ram,

Yes you have reason is sy-uname.

I have changed both methods and active after.

But when I run /nMD12 and did all the steps. Not stop at my methods.

Any idea.

Thanks.

Ana Moreira

Former Member
0 Kudos

Hi Ram,

In my bussiness, we also need the same.

I have try to implement your soluction, but probably I forgot some step.

I have using BADI: MD_PLDORD_POST.

Implementation name: Z_MD_PLDORD_POST.

Methods: POST_AFTER_SAVE_MRP and POST_AFTER_SAVE_MAN.

Behind the methods, I just put this code:

method IF_EX_MD_PLDORD_POST~POST_AFTER_SAVE_MRP.

if sy-subrc = 'XXX'. " XXX is the name of user

break-point.

endif.

endmethod

method IF_EX_MD_PLDORD_POST~POST_AFTER_SAVE_MAN.

if sy-subrc = 'XXX'.

break-point.

endif.

endmethod.

Both methods are active and also implementation.

After I go to MD12, planned order 14356 Enter. Clear Start and Plnd Open fields, change data in Or. Finish, press Enter, and the date in Start and Plnd Open fields are also changed. Press Schedule planned Order button, and after SAVE data.

The Planned Order is saved but not stop at my methods.

Can you help me, what do I have miss in this??

Thanks ina advance.

Ana Moreira

Former Member
0 Kudos

Ana,

You need to code as sy-uname = 'XXX' and not sy-subrc = 'XXX'.

regards

Ram

Former Member
0 Kudos

Hello Ram.

Thanks for your very good input.

I have been talked with some friends from ABAP that will help make this change be possible and we have a few more questionf for you if you don't mind.

1- We were able to make the reschedule of planned order using the BAPI BAPI_PLANNEDORDER_CHANGE, where We have changed the following fields:

ORDER_FIN_DATE,

PLAN_OPEN_DATE,

DET_SCHEDULE,

planned order number in this field BAPI_PLDORD-PLDORD_NUM.

2- Based on your experience and using the badi MD_PLDORD_POSTand using the method (POST_AFTER_SAVE_MAN) or (POST_AFTER_SAVE_MRP) is possible for the programmer isert some specific code, like select* from PLAF.

Thanks in advance for your input.

Best regards

Manuel Antonio

Former Member
0 Kudos

Yes you can use select queries in this. But have to be careful and judicious in using them as this would affect the total runtime of the MRP.

Regards

Ram

Former Member
0 Kudos

Hello All.

Thanks for your input.

I just would like to give you some more information that could be relevant to solve the issue.

The changes in the planned order can be done thru MD12 or when user is using CM25 and dispatch the order for a date or for a new date.

This will also make changes in the planned order.

Is the badi called in both situations?

It is possible to reschedule the planned order of the component from the badi that is called when the header material planned order is changed?

If yes what Function module, or badi can I use to schedule the component order and then save the result.

Best Regards

Manuel Antonio

Former Member
0 Kudos

Manuel,

Yes it is possible. If you look into the documentation given SAP which I have pasted below you should be able to do what ever you say.

Quote

all applications that explicitly or implicitly create or change

planned orders, for example the planning table of repetitive

manufacturing, repetitive manufacturing confirmation, capacity

planning, assembly order processing and so on.

UnQuote

Siva, please check the BAdi definitions in SE18. These are available.

Regards

Ram

former_member335796
Active Contributor
0 Kudos

Hi,

The User Exits are:

LMDR2001 - User exits restr. profiles of opt. pur.ord.-based load bldg

LMDZU001 - User exits in additional planning

Regards,

Siva

Former Member
0 Kudos

You can try the following BAdIs:

You can use the Business Add-In (BAdI) MD_PLDORD_CHANGE to change, before posting, data from planned orders, which have been created, changed, or deleted as a result of planning a material or manual processing.

The Business Add-In allows you to fill and change fields from planned orders in the PLAF table. It also supports filling of customer-specific fields in the customer include CI_PLAFDB.

You can execute the Business Add-In in the planning run in the following areas:

Material requirements planning

Master production planning

Long-term planning

You can also carry out the Business Add-In in all applications, which execute manual planned order changes. Examples of this kind of application are:

The dialog transactions for creating and changing planned orders (MD11, MD12, MS11, MS12)

The Business Application Programming Interfaces (BAPI) for creating and changing planned orders

all applications that explicitly or implicitly create or change planned orders, for example the planning table of repetitive manufacturing, repetitive manufacturing confirmation, capacity planning, assembly order processing and so on.

Requirements

When planning a material or manually processing a planned order, you must change individual fields in the planned order or provide entries for customer-specific enhancements of the planned order structure.

Standard settings

The Business Add-In is not active in the standard.

The Business Add-In cannot be used multiple times.

The Business Add-In is not filter dependent.

Activities

To activate the Business Add-In, you must create an active implementation. To do this, choose the following path in the SAP Menu: Tools -> ABAP Workbench -> Utilities -> Business Add-Ins -> Implementation

For more information about this procedure, see the SAP Library under

Basis Components -> ABAP Workbench -> Changing the SAP Standard -> Business Add-Ins -> Implementing Business Add-Ins.

Further notes

Documentation on the BAdI method CHANGE_BEFORE_SAVE_MRP

Documentation on the BAdI method CHANGE_BEFORE_SAVE_MAN

You can also call the documentation on the BAdI method via the menu, by carrying out the following steps:

1. Choose the tab page Interface.

2. Double-click on the relevant method.

3. Click on the right mouse button and choose Component documentation.

Update Planned Orders (MD_PLDORD_POST)

Use

Application components: PP-MRP, PP-MP-MPS, PP-MP-LTP, PP-REM

Function group: M61P, M61U

You can use the Business Add-In (BAdI) MD_PLDORD_POST to further process data from planned orders, which have been created, changed or deleted through the planning of a material or as a result of manual processing.

The Business Add-In allows you to publish the created and changed data from planned orders and can be used to update customer-specific tables or to connect to information systems and workflows.

You cannot use the methods of the Business Add-In to change the planned orders themselves. The planned orders are always posted in the communicated form.

You can execute the Business Add-In in the planning run of the following areas:

Material requirements planning (PP-MRP)

Master production planning (PP-MP-MPS)

Long-term planning (PP-MP-LTP)

You can also execute the Business Add-In in all applications, which carry out manual planned order changes, for example:

The dialog transactions for creating and changing planned orders (MD11, MD12, MS11, MS12)

The Business Application Programming Interfaces (BAPI) for creating and changing planned orders ( PlannedOrder Create, PlannedOrder Change)

All applications that explicitly or implicitly create and change planned orders, for example the planning table of repetitive manufacturing, repetitive manufacturing confirmation, capacity planning, assembly order processing, and so on.

Standard settings

The Business Add-In is not active in the standard.

The Business Add-In can be used multiple times.

The Business Add-In is not filter dependent.

Activities

To activate the Business Add-In, you must create an active implementation. To do this, choose the following path in the SAP Menu: Tools -> ABAP Workbench -> Utilities -> Business Add-Ins -> Implementation

For more information about this procedure, see the SAP Library under

Basis Components -> ABAP Workbench -> Changing the SAP Standard -> Business Add-Ins -> Implementing Business Add-Ins.

Note that the Business Add-In can be used multiple times and therefore all active implementations are called and run through.

Example

The following is a possible use for the methods of this Business Add-In:

When planning a material or manually processing planned orders, you want to log the changes made to the planned orders or the triggered subsequent functions.

The subsequent processing of certain planned orders or individual data from the planned orders occurs in an external planning system. In this case, you can log the corresponding changes to these planned orders in a user-defined table during planning. Using a separate report, you can select the data from the log table and process it further.

Further notes

Methods

Update Planned Orders: Requirements Planning - POST_AFTER_SAVE_MRP

Update Planned Orders: Manual Processing - POST_AFTER_SAVE_MAN

You can also call the documentation on the BAdI method via the menu, by carrying out the following steps:

1. Choose the tab page Interface.

2. Double-click on the relevant method.

3. Click on the right mouse button and choose Component documentation.

Regards

Ram

Former Member
0 Kudos

Dear,

where can i find this BAdi? I checked in SE81...not available

Former Member
0 Kudos

Hi.

The idea is that when planned order is saved, means that any change has happend, then I should check if there are any planned order for a component with the same sales order of the changed planned order and update in the planned order of the component the new start date, schedule it and then save.

My idea was to make it all iin the user exit of planned order at time it is saved.

Thanks for your feedback.

Manuel Antonio

Former Member
0 Kudos

I think there is no user exit for planned order as i am aware, but what actually you are looking for in planned order?