Hi,
Use FM BAPI_PO_GETDETAIL1. Just pass the PO no. The table POHISTORY will contain the PO history.
Use the below PROCESS_ID value to get GR/IR data in POHISTORY table.
POHISTORY-PROCESS_ID = 1 for GR
POHISTORY-PROCESS_ID = 2 for IR data.
Regards
Abhishek