cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CPI - How to create one summary log file and send it to business owner

mark_st
Explorer
0 Likes
1,431

Hi,

I would like to know how to approach following requirement.

Input csv file is read. Each record is validated and processed and written in one big output csv file (splitter/gather).

The validation result of each record needs to be written in one summary log file and mailed to the business owner.

How can I achieve this ? Thanks for any help or advice !

mark_st_0-1708251509951.png

 

Accepted Solutions (0)

Answers (1)

Answers (1)

karthikarjun
Active Contributor
0 Likes

Hi Mark - Well, you can use the mail adapter in the SAP Integration Suite to send the report via email. 

Refer: https://community.sap.com/t5/technology-blogs-by-members/sap-cloud-integration-custom-email-notifica...

Moreover, you can use the Groovy script to validate the records. 

Regards,

Karthik A

mark_st
Explorer
0 Likes
Hi Karthik, the part that is unclear to me is how to build the email message containing the validation errors of all the invalid records. Each record will be validated using a groovy script between split and gather process. At the end of the complete process one summary mail needs to be send. I am new to CPI and Groovy. If I program such a logic in another tool, I write during validation process for each record the validation result in an array. At the end of the process, after processing all the record, I build the mail body based upon the array and send it out. How should I do this in CPI/Groovy ?
NasirH
Newcomer
0 Likes

Hello Karthik, I would advise you to write log to data store.  Then you can create a separate flow to read logs from data store and email them to business owner. Data store will allow you to keep your logs even in the case if email delivery fails. You can trigger it or manually download the log from data store at a later time.