BOM is not exploded when called via BAPI_SALESORDER_CREATEFROMDAT2

2.5k views Asked by At

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.

Opening order in VA02, viewing configuration, BOM explosion as result

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?

1

There are 1 answers

1
user7199471 On

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 function BAPI_SALESORDER_CHANGE can be called. Afterwards the structure is exploded.