Hi Ravindra,
if you are checking in some report then you can use the document type , which is different for contract and PO.
if you are checking it on output then get the document type printed on it or based on document type get the text PO or Contract printed.
Thanks
Kunal