Application Development 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: 

bapi BAPI_PRODORD_CREATE error number 630 id CO

mark_fryu
Participant
0 Kudos
868

the bapi BAPI_PRODORD_CREATE gives me the error number 630 id CO settlement rule could not be created automatically how can i solve?

8 REPLIES 8

SimoneMilesi
Active Contributor
444

Did you look in the forums? There are plently of threads on topic "SAP ERROR CO630" with different solutions based on different issues/scenarios.

DominikTylczyn
Active Contributor
444

Hello mark.fryu

Look at the long text of CO630 message:

Short Text

Distribution rule could not be created automatically

Diagnosis

The distribution rule could not be created automatically. When a production order is created the system tries to create a distribution rule automatically. If this is not possible there may be several explanations, for example:

  • the settlement profile for your order type does not permit the recipient for whom a distribution rule is to be automatically created
  • several recipients are entered as compulsory recipients for the settlement profile
  • the material that is producted is not valuated.

Therefore the system cannot generate a distribution rule with the recipient material.

Procedure

You should check which of the above reasons is true and change the settlement profile if necessary. If an order is to be created for a material without evaluation then the distribution rule must be maintained manually.

Won't that help?

Are you able to create the production order online with CO01?

Also check out question 4 of note 1929029 - FAQ: Settlement rules in production order

Best regards

Dominik Tylczynski

444

I can create the order manually, practically using these type of material when I create the order from CO01 the following screen appears which in my opinion is the problem that the bapi cannot manage but manually it works fine:

DominikTylczyn
Active Contributor
0 Kudos
444

Hello mark.fryu

Indeed that's the root cause of your problem - the settlement rule can't be created automatically. It shows in CO01 when you get the "maintain settlement rule" screen empty. BAPI_PRODORD_CREATE doesn't support manual maintenance of settlement rule; it needs to be created automatically.

Again question 4 of note 1929029 - FAQ: Settlement rules in production order gives some hints:

  • Check whether the settlement profile permits settlement to the required recipient.
  • There must only be one mandatory recipient in the settlement profile.
  • Check the material type of the header material. The system can only create a settlement rule automatically if the material is managed with values (see Customizing transaction OMS2).

The settlement profile is assigned to the production order type - config. transaction OPJH:

The profile itself is defined in SPRO Controlling -> Product Cost Controlling -> Cost Object Controlling -> Product Cost by Order -> Period-End Closing -> Settlement -> Create Settlement Profile

I'm not CO specialists so I'm afraid I'm not able to help you much with settlement profiles.

Best regards

Dominik Tylczynski

444

also I see correctly the field filled with "PP01", in your opinion if that window does not appear, the bapi should not give errors?

DominikTylczyn
Active Contributor
0 Kudos
444

Hello mark.fryu

In my opinion if the settlement rule is created automatically when you create a production order in CO01, i.e. CO01 doesn't give you the "settlement rule" screen, then the settlement rule will also be created automatically when calling BAPI_PRODORD_CREATE and you won't get CO630 error.

Best regards

Dominik Tylczynski

DominikTylczyn
Active Contributor
0 Kudos
444

Hello mark.fryu

One more piece of advice - go to your production controlling people and ask them to make the settlement rule automatic in CO01. It should be like that. Once it's automatic, your problems with BAPI will go away.

Best regards

Dominik Tylczynski

0 Kudos
444

Hi Dominik.

I have the same problem with the BAPI

Using the CO01 work perfect and create the settlement rule automatic but with the BAPI is not working any suggestion