i am using BAPI_PO_CREATE.
when i try to pass values to field material and Pur_mat in PO_ITEM then it is created but when i dont pass any value to PUR_MAT then po doesnt create. how can i create PO with passing only material and not PUR_MAT?
Is PUR_MAT a mandatory field?
Yes you need to pass this value to pur_mat as well.
For this BAPI_PO_CREATE, do a where used list.
SAP will show you all places where this BAPI is used.
You will find this field populated in the standard transactions. Have a look.