2011 Jun 16 11:36 AM
Hi Experts,
While creating sales order manually I got error msgs and incompletion log bcoz of config setting(Like :if i marked pricing condition as mandatory then it is giving error msg 'Mandatory pricing condition XXXX missing)
But while using BAPI_SALESORDER_CREATEFROMDAT1 it doesn't give any error msgs and sales order created successfully but in my case it shouldn't.That means the mandatory pricing condition check fails in case of BAPI.
In case of BDC also sales order created with warning and success msg.
so my question was, is there any option to stop creating sales order in that situation?
Thanks in advance.....
Regards,
Ravi....
Hi Experts,
While creating sales order manually I got error msgs and incompletion log bcoz of config setting(Like :if i marked pricing condition as mandatory then it is giving error msg 'Mandatory pricing condition XXXX missing)
But while using BAPI_SALESORDER_CREATEFROMDAT1 it doesn't give any error msgs and sales order created successfully but in my case it shouldn't.That means the mandatory pricing condition check fails in case of BAPI.
In case of BDC also sales order created with warning and success msg.
so my question was, is there any option to stop creating sales order in that situation?
Thanks in advance.....
Regards,
Ravi....
2011 Jun 16 1:00 PM
Hai...
While your are saving from VA01, it is showing this message,
'Mandatory pricing condition XXXX missing'
means in the pricing procedure XXXX condition type is ticked as mandatory condition type, that u have not maintained, even when you try to save the document it flash the message
Document Incomplete
Would you like to save or edit the incomplete document?
but it will allow you to save the document, this is the case that is happening with that BAPI. But this document cannot be used further processing.
Cheers
KHS
2011 Jun 16 1:51 PM
Hi,
First note: BAPI_SALESORDER_CREATEFROMDAT1 is obsolete as of Release 46C! So you might want to use BAPI_SALESORDER_CREATEFROMDAT2.
You can run BAPI_SALESORDER_CREATEFROMDAT1 without commit (see the parameter in Import Tab).
After the FM has executed, read the return structure and see if you have any warnings there. If you have warnings then just Rollback work (FM BAPI_TRANSACTION_ROLLBACK) . If no errors/warnings have encountered, call function BAPI_TRANSACTION_COMMIT.
Or you could set in Customizing not to save Sales Orders if they are incomplete (but this will also affect standard VA01/02)
Regards,
Andrei