I'm attempting to create a sales order with a position that has a configurable material. Via the BAPI function bapi_salesorder_createfromdat2
I can create the order and supply it with the values for the characteristics.
ABAP Code: http://pastebin.com/hM61c3Fq
When creating an order via VA01 and entering the configuration the order receives new positions from a bill of materials. However when created via the BAPI function the explosion doesn't happen unless I view the order via va02
and look at the configuration.
The customizing via transaction vov7
shows the position type to configure and explode. Is it possible to have bapi_salesorder_createfromdat2
also do this explosion to position lines or is there another function avaliable that can provide this functionality?
It would seem, despite the overwheling amount of documentation that says it should work, I haven't been able to find a solution via the BAPI function. However, we eventually stumbled upon an SAP note 562124. After creating the function with
bapi_salesorder_createfromdat2
BAPI functionBAPI_SALESORDER_CHANGE
can be called. Afterwards the structure is exploded.