‎2007 Mar 20 4:22 AM
Hi All,
I am using BAPI_SALESORDER_CREATEFROMDAT2 to create sales order.
It is working fine till now.
But I found that whenever there is a material whose condition price is maintained and doesnot match with the valuation type, the Sales order does not get created, neither it gives any error msg.
For e.g For Valuation type Consign , condition type ZPCS is valid and similarly for Turnkey , condition type ZPTK is valid.
if a material has valuation type consign and condition type ZPTK.. The SAP system ofcourse will not allow to create a SO unless we delete the ZPTK entry from the SO and create ZPCS...
BAPI also doesnot create the SO but doesnot return the error messge too.
I try to put the ZPCS value to BAPI thru BAPICOND..but still not working?
How do i handle such case?
Points will be awarded to useful ans
‎2007 Mar 20 9:15 AM
Hi,
If you are saying that you cannot create a sales order with the Valuation type and Condition type mismatch even through VA01 manually, then there is nothing much you can do in BAPI also.
2nd Case is you say that that BAPI RETURN table is not getting populated and it is empty in this issue which is not letting you know that Sales order is not Created.
The one work around for this issue is you can check the exporting parameter SALESDOCUMENT if it has the Sales Order number or not. if the RETURN table is empty and the SALESDOCUMENT field has SO Number, then SO is created and if RETURN table is Initial and SALESDOCUMENT is also Initial, then it is the issue that you are facing.
Also try posting a Query in OSS.
regards,
Mahesh
‎2007 Mar 20 5:46 AM
Any help?
More explanation..
If a material has more than one pricing condition maintained, then I am not able to create the Sales order using BAPI. How do I handle this case?
‎2007 Mar 20 8:38 AM
‎2007 Mar 20 9:15 AM
Hi,
If you are saying that you cannot create a sales order with the Valuation type and Condition type mismatch even through VA01 manually, then there is nothing much you can do in BAPI also.
2nd Case is you say that that BAPI RETURN table is not getting populated and it is empty in this issue which is not letting you know that Sales order is not Created.
The one work around for this issue is you can check the exporting parameter SALESDOCUMENT if it has the Sales Order number or not. if the RETURN table is empty and the SALESDOCUMENT field has SO Number, then SO is created and if RETURN table is Initial and SALESDOCUMENT is also Initial, then it is the issue that you are facing.
Also try posting a Query in OSS.
regards,
Mahesh
‎2007 Mar 20 9:41 AM
‎2007 Mar 20 9:42 AM
‎2007 Mar 20 10:10 AM
Hi,
Dont you think you can work with SALESDOCUMENT field ?.
regards,
Mahesh
‎2007 Mar 20 10:16 AM
I Am already performing that check..
At first place salesdocument is blank.
and the return tables has messages but success messages only no error.
Isnt it strange?
‎2007 Mar 20 10:25 AM
Hi!
You might try to enter a user exit for checking the condtions within the program MV45AFZZ. before the saving.
If the conditions are wrong, you just perform a command MESSAGE with type E, and the BAPI will return the given message also.
Regards
Tamá