Hi Mahesh
I'm not an ABAP developer I have used a user exit or BAdI to populate PO partner functions in the past.
I would guess your problem it the configuration in SPRO. Each PO document type is linked to a partner schema which determines which partners can be assigned. Check Materials Management --> Purchasing --> Partner Determination --> Partner Settings in Purchasing Documents in the SPRO transaction.
Regards
Robyn