Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem using BAPI_PRODORD_CREATE

Former Member
0 Likes
7,418

We are having an issue in using this BAPI on mass creating of production orders BAPI_PRODORD_CREATE.

I'm getting this message:

E CO               027 Forward scheduling (enter start date)

I already place the date on BASIC_START_DATE but it keeps getting error.  Further debug it would seem this field is for GSTRP, and it is looking for GSTRS (schedule start date) instead.

the fields that I populated are

MATERIAL

PLANT

ORDER_TYPE

BASIC_START_DATE

QUANTITY

as I would normally do on tcode co01.  anyone has encountered and solved this kind of issue? if i choose BDC approach, i'm getting too much dynamic messages.

Thank you.

Best Regards,

Carlo.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,428

I've ended up with BDC and including this:

SET PARAMETER ID 'FLAG_DIALOG_STATUS' FIELD abap_true.


Setting this up prevents the log screen to show as if I was doing BAPI.

7 REPLIES 7
Read only

Kartik2
Contributor
0 Likes
4,428

Hi,

As you have debugged and found out, the field that is being expected by the BAPI to successfully create a production order, please provide the field from your driver program/input. In foreground execution of the transaction, certain fields are automatically filled based on the configurations but while using BAPIs this is not possible, so whatever fields are expected by BAPI, we have to provide it.

Regards,

Kartik

Read only

Former Member
0 Likes
4,428

Thanks.

unfortunately the bapi import parameters doesn't have schedule date field.  it only has the basic start date as field.

where should I input the schedule date?

Read only

former_member189779
Active Contributor
0 Likes
4,428

Have you checked the BAPI documentation?

The parameter ORDER_DATA transfers the data about the creation of an order.

The following fields in the structure must be filled as a minimum:

  • MATERIAL: Header material
  • PLANT: Production plant
  • ORDER_TYPE: Order type
  • QUANTITY: Quantity to be produced

  At least one of the following basic dates must be entered (unless you schedule from the current date): 

  • BASIC_START_DATE (possibly also the BASIC_START_TIME): Basic start date (Date and time)
  • BASIC_END_DATE (possibly also the BASIC_END_TIME): Basic end date (Date and time)
Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
4,428

Hi,

Hi,

BAPI_PRODORD_CREATE BAPI: Generate Production Order

pas the follwing  data to  BAPI_PRODORD_CREATE : in this,you have WBS_ELEMENT in the import structure ORDERDATA.

Order Number    

Material Number for Order         221

Plant                                               0001

Planning plant for the order       0001

Order Type                                     PP01

Basic start date                             27.12.2011

Basic start time    

Basic finish date                           29.12.2011

Basic finish (time)    

Total order quantity                      25

and also refer the link http://scn.sap.com/thread/940917

Regards,

Gurunath Kumar D

Read only

0 Likes
4,428

Hi All.

I appreciate trying to help me.

I'm looking for these fields on the bapi: (from tcode CO01)

yes I could (and I am) entering the basic start date but still it is looking for the schedule start date.

BDC is also a pain as to many checking flying around  that is stopping the transaction as messages and different screen is always popping up. 

Thanks for all the help, I am quite new with the PP transactions.

Read only

Former Member
0 Likes
4,430

I've ended up with BDC and including this:

SET PARAMETER ID 'FLAG_DIALOG_STATUS' FIELD abap_true.


Setting this up prevents the log screen to show as if I was doing BAPI.

Read only

Former Member
0 Likes
4,428

Hi,

if you use BAPI_PRODORD_SCHEDULE after BAPI_PRODORD_CREATE you can change the SCHED_TYPE. You have in the customizing (OPU3) a value for schedule type = Backwards.

Therefore you give in BAPI_PRODORD_CREATE any date in BASIC_END_DATE followed by  BAPI_PRODORD_SCHEDULE with the correct startdate and schedule type.

Greetings

Achim