We are using the BAPI_SALESORDER_CREATEFROMDAT2 in order to create a sale order with schdule type subcontracting.
The BAPI create a new sales order with the BOM explosion fine.
But when we see the purchase requisition (type L) created in Sales Order schedule, we coiuldn't see the material list exploted.
It's seems like when the Purchase Requisition, the BOM is missing.
Could you please help us with that issue?
If you do the same thing from gui and if everything works fine, that means you are missing some data in bapi. And to understand what is wrong, it is best to put a break point in bapi and save data as test case for bapi. Once you do that you can open bapi in se37 and load saved test data to try different combinations.
Hope that helps.