order with referance to a contract using BAPI_SALESORDER_CREATEFROMDAT2
I tried to create an order with reference to a sales contract .
1) I passed the contract number to the field REF_DOC at header level , But I got the error message" Document 4000003639 doesn't have document " where 4000003639 was the contract number . am i missing anything ? Is there any other values that has to be passed ?Can anyone help me on this ?
2) I also tried passing the contract number at item level as suggested in earlier posts on this subject , but the sales order was created without any reference to the contract .
Please help me on this issue .
Thanks & Regards