cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a possibility to get status of File Adapter

Former Member
0 Kudos

Hi ,

I have a asynchronous file to file scenario where I need to send a email notification once the file has been successfully delivered to the target location.

Is there a way to know the status of the file transfer while using FTP adapter? The email notification should contain the receiver file name and status whether it was successful or failed.

I am on PI 7.4 dual stack system.

Thanks

Husain

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks Bhavesh/Navdeep.

But in the above two options the email will not trigger if there is a failure correct?

My ask is to report a Success or a Failure depending on the output of the File adapter in the same email.

Thanks

Snavi
Active Participant
0 Kudos

Hi Husain,

few options

  1. for failure in your file adapter you can configure local alerting for that interface , that triggers technical alerts for every technical failure
  2. use pre processing OS command as in the screenshot
    • before the start of processing, a failure message will be written to the temp file in OS location for every file transfer.

    • after processing the file will be updated with success message.
    • in case of file adapter failure, the success message OS command will never execute and your second interface will pick the file with failure message in it.
    • you may have to define modification check in the file sender channel in your second interface (say 5 minutes) to allow the file processing to complete for your first interface. to make sure your second interface does not pick failure message as well as success message.

    • if your file transfer volume is high, don't use the modification check, and rather use the local alerting mechanism
bhavesh_kantilal
Active Contributor
0 Kudos

I do have a "ugly" solution and this would be for errors where the file is not successfully created, use PI alerts to trigger the email!

Apart from these solutions that provide real time feedback anything else will be a external job. If that works, then the solutions listed previously by other users are also worth a look at!

Regards

Bhavesh

Snavi
Active Participant
0 Kudos

you can use file receiver adapter post processing commands to write a temp file in the operating system with the filename. the temp file will be written to operating system folder location only when the file/FTP adapter message processing is complete

now another interface pick this file and sends email confirmation for the success of file receiver processing

more information on the sap help

https://help.sap.com/saphelp_nw73/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm

bhavesh_kantilal
Active Contributor
0 Kudos

One another way to do this,

  • Have 2 Inbound Interfaces in your Interface determination / ICO.
  • 1st for the actual File, 2nd for the Email.
  • Ensure "Maintain Interface Order at runtime" is selected.
  • This will make sure until the File is not created in the target system, the 2nd Email Interface is not triggered.

Caution to this approach though - This make the QOS as EOIO and hence if a single message goes into error, all other messages will go into Holding Mode.

Regards

Bhavesh

Former Member
0 Kudos

The scenario which I want is something like this

File -> PI -> File -> Email.

The email content should say Success or Failure depending on the Adapter status.

Former Member
0 Kudos

Thanks Dimitri.

But how do I incorporate this ABAP code in my scenario? Is there a way to trigger the AbAP code once the file has been processed by the file adapter.

Dimitri
Active Contributor
0 Kudos

Hi,

Long time ago, I created this:

I guess that should do the trick because you're using a dual stack system.

Kind regards,

Dimitri