Hi Ilya!
It seems that there is no possibility to refer to Contract Number during Downpayment posting. When you enter any value in the field "Purchas. document", system calls FM "ME_READ_DOCUMENT_FINANCE", that checks if your purchasing document is Purchase order or Scheduled agreement (document type 'F' or 'L'). This check is hardcoded, so there is no customizing table for it.
Best regards,
Anton.