BAPI_SALESORDER_CREATEFROMDAT2 line item assignment
Is there a way to use BAPI_SALESORDER_CREATEFROMDAT2 without having to predict internally assigned line item numbers by SAP?
E.g. creating an order with 2 line items, the 1st line item explodes into a sales BOM, so in order to tie sales order text or schedule line data in for a 2nd line item I need to know the line item number of the 2nd item in tables ORDER_TEXT or ORDER_SCHEDULES_IN.
External systems usually don't know how SAP will explode into items, so I can't believe there is no way to do this with the standard BAPI. Or is everyone out there just using a custom wrapper function that reads the sales BOMs and calculates SAP line item numbers?