SAP for Mill Products Discussions
Explore conversations about production optimization, resource utilization, and quality control using SAP in the mill products industry. Join in or start your own!
cancel
Showing results for 
Search instead for 
Did you mean: 

Merge production orders in background "MILL_OC_ORDER_MERGE"

0 Kudos

Hello

I need to merge several production orders in background and the only bapi that i have found is the "MILL_OC_ORDER_MERGE" fm.

It has a parameter for background processing but still it brings the warning/error/info messages in foreground and also asks for user input in some cases.

I need a function module for background processing, that gives me the error/warnings as a log and there should be no user interaction required.

can anybody help?

Thank you

Sebastian

7 REPLIES 7

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sebastian

This thread was moved to the space SAP for Mill Products & Mining where the experts in this industry solution will help you.

BR

Caetano

0 Kudos

Hello Sebastian,

I have taken a brief look at the module, and in general it does what you would expect it to.

The parameter I_DARK first of all only works if you combine all operations. So internally it switches to "order combination" instead of "operation combination".

It checks various preconditions, for example whether order contain co-products. In these prechecks I found at least one instance where it throws and error message.

Did you try to catch the error message by adding the implicit exception "error_message = 99" to your function module call?

I am not aware of other BAPIs, except the much "stronger" trim optimization BAPI in APO that is sometimes used for similar purposes.

Regards,

Stefan

0 Kudos

Hello!

I'm using FM MILL_OC_ORDER_MERGE in class method IF_NAVIGATION_PROFILE. By buisiness task, in COOIS should select several orders and create combine order.

Because we are using other order type for combining order, FM send message MILL_OC+122 with warning type. But Class method increase message level to Error and merge orders not possible.

How i can decide this issue on using MILL_OC_ORDER_MERGE in class method IF_NAVIGATION_PROFILE~USER_COMMAND?

0 Kudos

Hello Stefan

Thank you for the answer and sorry for my delayed comment.

I have used the i_dark parameter.My problem is that the user wants to process thousands of entries and wants to receive a list of all the processed orders/ errors at the end.

At the moment, if there is a problem in the bapi, it opens the CO02 transaction and requires user input.

For example, if the "Endtermin/Enddate"(Tab General) is in the past, the user has to change it manually.

Another example, if we get an error, the bapi opens the CO02 Transaction and displays the error, waiting for the user to take an action.

Since there are going to be several thousand of orders, i would prefer to receive an error message and display it in an alv at the end of the report.

Thank you

Sebastian

0 Kudos

Hello Sebastian,

I had a discussion with a developer. This function module works fine in the order combination dialogue transaction MILL_OC. The module is not released externally, and also not for other usage than dialogue, even if the interface parameters may look like it. Background or BAPI is not supported by this module.

There may be partner solutions who have modified this or enabled otherwise. But I do not the details of such solutions.

Sorry, this is not really a positive answer, but at least more clarity.

Regards, Stefan

0 Kudos

Hello Stefan

Thank you for the answer.

My problem is that in case of an error message, the transaction is brought up in dialog.After pressing any button, it exits automatically in the Sap menu without going back to my report(i cannot always do the correction in the order) and all of my other proceesed information will be lost.

Since there is no other solution, the customer will have to settle with this functionality.

Sebastian

0 Kudos

Hello Sebastian,

either as you said, or you would need to create a modification/code copy to change the system behaviour.

We have heard that some customers/partners have done this.

Stefan