Hi,
In this case, we have created custom BAPI like ZBAPI_SALESORDER_CREATEFROMDAT2 with copy of
BAPI_SALESORDER_CREATEFROMDAT2.
In source code, called two BAPI's BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_TRANSACTION_COMMIT.
It works fine for us.
Regards,
Arivazhagan S