cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with BAPI_SALESORDER_CREATEFROMDAT1

0 Kudos

Hi experts,

We are developing a BAPI program using BAPI_SALESORDER_CREATEFROMDAT1 to create sales orders.It is working fine if every data is maintained correctly like mandatory pricing condions etc.

When i creating sales order manually without BAPI program system will be showing me error or incompletion messages if i am not maintaing any mandatory field or pricing condition.

But this BAPI program is also creating sales order when we are not maintaining mandatory pricing condition or without PO number which is wrong.

I want to know that Is it possible to show the errors or incompletion messages if any at the time of creating sales order through BAPI and system will not allow to create sales order if any error in that?

thanks in advance

regards,

ravi

Accepted Solutions (1)

Accepted Solutions (1)

former_member303858
Contributor
0 Kudos

Hi Ravi,

You can use what we did in our project. I assume you are mentioning about B2C scenario.

You use the sales order simulate bapi. In our project we do the same.

Whenever there is a transaction via net, the system first check the data and tries to simulate a sales order in sap and send backs the data to net. And then after confirmation from the customer system creates a sales order.

Hope it helps you. Let us know if you need any more information on this.

Regards,

SB

Answers (1)

Answers (1)

ian_kehoe
Active Participant
0 Kudos

Dear Ravi,

Unfortunately this is the standard design of the system. This BAPI does not have an export parameter 'Order_Incomplete' like BAPI_SALESORDER_SIMULATE has. When you call it you should make sure that customising settings and input data do not produce incomplete documents. BAPIs are designed to create sales orders in the background. They cannot communicate with the user.

Incomplete SD documents can be selected with transaction V.02 . Here you can complete, cancel, or delete incomplete orders.

Please also review note 414058.

As a workaround you could perhaps call BAPI_SALESORDER_SIMULATE to check if the order is incomplete or not. If it is complete you can continue and create the sales order.

I hope this information has helped.

Best regards,

Ian Kehoe