Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SenderAppl wants to know invalid records identified by PI (in mapping)

Hi All,

I have a scenario.

 
SenderAppl-->FileAdapter-->PI-->RecieverAdapter-->ReceiverAppl.

the sender and receiver datatypes is similar.

the payload can contain any number of employee elements (records) under the root element EmployeesData

a sample payload is:

 
<EmployeesData>
   <employee>
      <empName>Edwin</empName>
      <empNumber>100</empNumber>
      <emailServer>mymail.com</emailServer>
   </employee>
   <employee>
      <empName>Peter</empName>
      <empNumber>200</empNumber>
      <emailServer>xyz</emailServer>
   </employee>
   <employee>
      <empName>Mark</empName>
      <empNumber>300</empNumber>
      <emailServer>mark.com</emailServer>
   </employee>
</EmployeesData>

In my context, a valid emailServer value is something that ends with .com

the requirement is:

1) PI should send all the employee records that contain valid emailServer values.

2) the employee records that contain invalid emailServer values should be sent back (or notified in someway) to the sender, so that senderAppl team gets to know what records are pending to be corrected and sent to receiver application.

first requirement i addressed using Message Mapping.

so the record Peter containing <emailServer>xyz</emailServer> doesn not end with .com, the mapping ignored it and the rest two records Edwin and Mark have been sent to Receiver Appl.

for the second requirement, how can i configure, such that senderAppl should get something like invalid.xml containing

 
<EmployeesData>
   <employee>
      <empName>Peter</empName>
      <empNumber>200</empNumber>
      <emailServer>xyz</emailServer>
   </employee>
</EmployeesData>

As this is asynch scenario, i think the invalid data is not sent back as part of response. but somehow, the SenderAppl would like to know the unsent records to the Receiver.

let us know a decent approach to do this.

Madhu_1980

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question