03-28-2007 9:47 PM
Hi, I'm creating sales orders with BAPI_SALESORDER_CREATEFROMDAT2 in background, I have some materials that have substitutes, but when I use the bapi, the material is does not change. When I create the sales order manually in the VA01, the material is replaced.
thanks.
03-28-2007 11:56 PM
It should behave exactly the same. Usually when you run something online, there are certain fields that get defaulted and you will not notice. But when you call the BAPI, you have to pass those default values as well so that you will see the same result. You will have try it out in a couple of different ways and also debug the code where it decides whether or not substitution allowed and you can trace it back to the value that is missing.
04-13-2007 5:32 PM
It was solved changing the sales order, after it's created, a review is performed to check any substitutions, if they exist, the conditions are added via bapi_sales_order_change