cancel
Showing results for 
Search instead for 
Did you mean: 

Empty File Handling for Receiver Adapter in SAP PI

Former Member
0 Kudos

Hello All,

  My scenario is Proxy --> XI --> FTP

Whenever we are getting 0 byte file, that file need to be send to the Receiver Mail Adapter. Instead of sending it to FTP. I mean an alert to be raised to the team that 0 Byte file has been arrived.

Receiver FTP with File Content Conversion is used.

Does it is possible using  the Interface Determination or Receiver Determination ? If yes please provide the steps to achieve it.

If there are any other solution, kindly suggest.

I know we have an option at the Receiver File Adapter to Ignore the file using Empty File Handling. But my scenario is that we need to raise an alert whenever 0 byte file is arriving.

Let me know if you need further information.

Rewarded with points.

Thanks & Regards

Raja Ravivarma V

+91-8056129900

Accepted Solutions (0)

Answers (4)

Answers (4)

ambrish_mishra
Active Contributor
0 Kudos

Hi Raja,

You can use the context object File size in RD . In RD, if File Size is <> 0 then send to target system else send to Mail receiver.

Empty File handling and raise alert. | SCN

hope it helps!

Ambrish

PavanKumar
Active Contributor
0 Kudos

Hello Ravi,

Adding one more option

You can also configure alert configuration so that when empty file generated.Alert will trigger to configured mail id. Refer below

Regards

Pavan D

manoj_khavatkopp
Active Contributor
0 Kudos

Raja,

In receiver Determination you can use XPATH functions like exist, count etc  and check for the some 

Xpath Condition in Receiver Determination - Process Integration - SCN Wiki

then you can route it to mail/FTP.

Br,

Manoj

Former Member
0 Kudos

Hello Manoj,

  Could you please provide me the XPath to find the file size from the Payload.

former_member186851
Active Contributor
0 Kudos

Hello Raja,

You wish to fail and trigger alert or just mail?

manoj_khavatkopp
Active Contributor
0 Kudos

Raja,

Their is no such XPATH function to check size of message .

What i mean't is you can apply XPATH function in any of the source structure (like root node) which appears only when actual data is their.

Can you put the screenshot of the source payload for empty message payload and the actual source proxy structure.

Br,

Mano

former_member186851
Active Contributor
0 Kudos

Manoj what I suggested should work right?

manoj_khavatkopp
Active Contributor
0 Kudos

Off course Raghu, we just have different approaches that's it

former_member186851
Active Contributor
0 Kudos

Hello Raja,

You can handle it in the mapping.

If empty file is created,that means proxy data should be empty.

so make the Target nodes mandatory,So that mapping will fail if proxy is empty and configure alerts to trigger mail for the same issue.