cancel
Showing results for 
Search instead for 
Did you mean: 

Send success emails after file transfer

Former Member
0 Kudos

Guys,

I have a requirement to send success emails after transferring file from app server to SFTP. I used the below 2 methods

1. Created Comm channel to send E-mail, Added this in Integrated Configuration after the file transfer. It triggers no matter what the interface is success or failure.

2. I tried creating 2 Receiver Agreements, added them in both Receiver & Interface Determination. It still does not work. I am getting an error saying "Missing or Invalid Receiver Agreement".

      - Created 1 Receiver Agreement(RA) from file to SFTP and the other for file to Mail.

        In Interface Determination, Added source as File and Receiver as SFTP. Added SFTP and Mail in receiver interfaces.

Not sure where i am making the mistake. Any suggestions would be appreciated.

Thanks,

Kumar

Accepted Solutions (0)

Answers (7)

Answers (7)

PriyankaAnagani
Active Contributor
0 Kudos

Hi Kumar,

This requirement can be achieved in 2 ways.

Approach1: As suggested by other, create 2 separate scenarios. File to  SFTP with Archive/Ack file and then in the second scenario pick the file and send email.

Approach2: Design only one scenario File to two receivers with EOIO. I would suggest this approach and here are the steps you need to follow.

  • Create 2 Inbound Interfaces(one for SFTP and other for Mail)
  • Create 2 message and operation mapping.
  • In the configuration, use the same business component for both SFTP and Mail. i.e. in the Receiver Determination/ICO, enter the same business component name two times.
  • In the Interface Determination, enable "Maintain Order at Runtime".
  • Create 2 Receiver Agreements with respective SFTP and Mail channels.

---Priyanka

Former Member
0 Kudos

Thanks for the responses.

I followed the Approach 1. Archived the file after transferring to SFTP.

Created Integrated configuration to pick this file and send an email. But i am getting an error "java.io.IOException: no sender address specified".

Former Member
0 Kudos

Hi Kumar,

Please select  Message Protocol as XIALL instead of XIPAYLOAD  as shown below.

Regards,

Yeshwanth R

Former Member
0 Kudos

Thanks Yeshwanth. I changed it to XIALL, still having the same issue.

Do i need to check Adapter-specific Message Attributes/ Variable Transport Binding?? . I am not sure whether i need to add anything in Module Processing Sequence & Module Configuration.

All of you, Appreciate your help.

Former Member
0 Kudos

Hi Kumar,

As mentioned Nimrod it is not possible to send email after file is transfers to SFTP server as this steps happens as last step in PI and you cannot handle this at routing stage.

The alternative approach will be here to use archiving options on you local folder  of file sent to SFTP server . Whenever there is file in that folder trigger an interface to send email to concerned team or people.

As per understanding archiving happens only if file transfer is successful to SFTP server..

Regards,

Yeshwanth R

former_member187587
Contributor
0 Kudos

You can't archive file in the receiver channel.only in the sender.

Former Member
0 Kudos

Hi Nimrod,

Archiving is available in SFTP receiver channel  to keep copy of processed  file in local PI file server.

please refer to link below  Configuring the SFTP Receiver Channel - SAP NetWeaver Process Integration, secure connectivity add-o...

Regards,

Yeshwanth

former_member187587
Contributor
0 Kudos

You are right.

Very surprising feature for a receiver file channel.

thanks.

former_member187587
Contributor
0 Kudos

you cant carryout such process as the SFTP communication is the final step of the integration and if it fails and you are using receiver determination with additional end point ( in order to send the mail )you will be sending mail before the channel status is known to you...

The SAP monitoring concept is based on reporting errors only if they occure mostly aimed to the PI technical teams.

If a message success you wont get any alerts.

Former Member
0 Kudos

Hi Kumar,

Check "Maintain order at runtime" in interface determination. This will ensure that your second scenario executes only if the first one is successful.

Regards,

Vishal

Former Member
0 Kudos
Harish
Active Contributor
0 Kudos

hi Kumar,

The best way to ensure the email triggered after successfully delivery of file to SFTP is create a archive the file to file system. Then pick the archive file and trigger the email.

Archiving can be set as

regards,

Harish

PavanKumar
Active Contributor
0 Kudos

Hi Kumar,

Two separate scenarios you have to create.

1) Picking file and placing in SFTP.

2)File to Mail scenario.

Once files successfully placed in SFTP your file adapter will pick and send mail to respective email ids configured at mail adapter.

Regards

Pavan

Harish
Active Contributor
0 Kudos

Hi Kumar,

Can you provide the ICO configuration screenshot?

regards,

Harish