Hi,
I recently had a requirement where I had to filter a set of records based on a condition. Lets take an example,
Input recrods:
InvoiceNumber SystmeID Supplier Amount
123 A1 SUPP1 100
1234 A1 SUPP2 200
1345 A1 SUPP3 300
1323 A2 SUPP3 500
1236 A2 SUPP1 400
From the above records(input message) I had to filter all records were Supplier is 'SUPP3' and that to where SystemID is 'A2'. So, the output of the mapping should be:
Output records:
InvoiceNumber SystmeID Supplier Amount
123 A1 SUPP1 100
1234 A1 SUPP2 200
1345 A1 SUPP3 300
1236 A2 SUPP1 400
Input and Output Message structure:
MT_INVOICE
row
InvoiceNumber
SystemID
Supplier
Amount
Solution:
This can be handled in PI message mapping using standard functions as given below.
Logic: Dont create the 'row' node if it satisfies given condition ( SystemID = 'A2' and Supplier = 'SUPP3')
Node Function to be used 'CreateIf'.
Note: Message Mapping screen shot attached.