Arun,
Here's my take. Not a very elegant solution but you can try it out.
1) You can hijack one of the fields in the IDOC control record. In the generate IDOC section of your BODS job, you can use one of the unused fields in the EDIDC control record (E.g: SNDSAD - SADR sender) and populate it with your legacy sales order number.
2) Once you generate and execute your IDOCs, you can pull the EDIDC table which will give you the IDOC number and the Legacy Sales order number. All you need are the DOCNUM (Idoc Number Field) and SNDSAD - or whichever field you decide to use in the EDIDC table.
3) Using this, you should be able to link to the SAP Sales Order number. I hope you are populating the legacy sales order number in the reference field in VBAK.
-Chaitanya