cancel
Showing results for 
Search instead for 
Did you mean: 

Mass Planned Order creation with BAPI or Function module

08-11-2014 11:36 PM
5971 views 8 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Dear collegues,

We will use the function module MD_PLANNED_ORDER_CREATE for creating planned orders.

However the performance of the F.M. doesn't meet our expectation.

(It takes about 7 hours to create 100,000 planned orders.)

We've already recognised the standard BAPI "BAPI_PLANNEDORDER_CREATE"

But the bapi can't handle to create planned orders on the working day of workcenter.

So we have to choose this F.M.

Please give us some advice for this issue.

Improvement about the performance of this F.M MD_PLANNED_ORDER_CREATE

Improvement about the performance of BAPI BAPI_PLANNEDORDER_CREATE

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

MarianoCabalen
Active Contributor
0 Likes

Hello,

What do you mean when you said that BAPI_PLANNEDORDER_CREATE can not be used to create a planned order on the working day of workcenter?

Can you clarify this comment?

I have made a program to upload planned orders massivelly using this BAPI and it works ok. I don't know how would be the performance for 100,000 orders, since we never load such number of orders.

Kind Regards,

Mariano

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Mariano-san,

I've attached the addtional infomation,

(Business Requirement)
We would like to make the planned order on the non-working day at Factory Calendar
In the other word,
We would like to make the planned order on the working day at work center capacity level (non-working day at the factory level)

When we use the standard BAPI, we can't receive the desireable result,

(Situation)
In the Tr-cd MF50 , SAP ERP uses the F.M (MD_PLANNED_ORDER_CREATE)

Best Regards,

Yoshitomo

Caetano
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Yoshitomo

Function module MD_PLANNED_ORDER_CREATE has the status 'not released', which means that it was desined to be used internally on SAP standard programs and transactions. You can check the function module status on the tab attributes of transaction SE37.

Also, planned orders created by the standard SAP transactions and BAPIs should always have a basic finish and start date on a working day, according to the plant factory calendar.

The work center factory calendar is only used to calculate the operation and production dates and it is a major design pre-requisite to have the planned order basic dates on a working day, according to the plant factory calendar. Even on transaction MF50, you may input the production dates, but the basic finish date will be calculated according to the plant factory calendar.

BR

Caetano

MarianoCabalen
Active Contributor
0 Likes

Hello Yoshitomo,

I will load a document with the custom program that I have in my IDES using the BAPI. As was mentioned by Caetano, the FM is not available to be used.

Now regarding the problem that you have with the dates, take a look of the following note:

https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F6465...

I will add the linked to the program in a couple of hours.

Kind Regards,

Mariano

Caetano
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello

In addition, if you are using the BAPI to create the orders, please take a look on the following note:

https://service.sap.com/sap/support/notes/484823

This note mentions the flag USECOLL_UPD, which can be used to postpone the update of the planning file. The planning file is updated collectively when the last order is created and that should help you to improve the performance.


See the relevant information extracted from the note below:


The new functions of a collected update of the planning file entries per LUW can be activated by setting optional parameter HEADERDATA-USE_COLL_UPD. However, the user must make sure that optional parameter HEADERDATA-LAST_ORDER is set for the last call of one of the two BAPI methods CREATE or CHANGE. Only then all planning file entries are transferred to database table MDVM or DBVM!


Example:

BAPI method CREATE (function module BAPI_PLANNEDORDER_CREATE) is called in form of a loop for the creation of several planned orders. In this case, you must generally set parameter HEADERDATA-USE_COLL_UPD. Parameter HEADERDATA-LAST_ORDER is only set for the last loop pass and thereby triggers the update of the planning file entries collected before.

BR

Caetano

MarianoCabalen
Active Contributor
0 Likes

HI Yoshitomo,

Here you can find the program to upload planner orders:

Regarding the use of non working days I would ask why you calendar has non working days when your plant has production. Anyway, the SAP note mentioned above explains how SAP manage the date in the planned orders.

Kind Regards,

Mariano

Former Member
0 Likes

Hi Mariano-san,

Thank you for your program,

About handling the non-working day, it has complex reasons,

So we try to improve our custom programs,and discuss the non-working needs addtionally.

Best Regards,

Yoshitomo

Former Member
0 Likes

Hi Mariano-san,

Thank you for your quick reply.

About the working day of workcenter, this is a little complex.

I'll attach some documents about this issue to this discussion.

In our project, we are going to use repetitve prodution, and we will use BAPI to make planned orders.

Best Regards,

Yoshitomo