Hi Vishal,
BAPI 'BAPI_SALESORDER_CREATEFROMDAT2' will not fetch any details of the reference document we provide. If we providde the Contract no. as a reference document, we are able to see the document flow of that sales order. Simply, reference document concept in this BAPI is to achieve document flow.
Instead you try to fetch the contract details and pass them to sale order BAPI.
Regards
Suresh M