Issue in fields transfer ERP to PI TPM table
I have a below scenario.
SAP ERP ==> SAP PI TPM table
One IDOC triggers from ERP and there are two fields which would be transfer to PI via SOAP. I have created a table of 2 columns in B2B TPM table.
One table is input and other one is output.I have already the WSDL file and related services for INSERT, UPDATE and DELETE.
1) when ERP send the fields , need to check whether it already exists in TPM table or not. If not then INSERT
2) When ERP send the fields. Need to check in PI, if values are wrong or not matching with PI TPM table then use DELETE
3) When ERP send the fields. If update is required then update the fields in PI TPM table using UPDATE.
How to proceed with the above scenario. Please help me out