cancel
Showing results for 
Search instead for 
Did you mean: 

Processing of Empty File in PI 7.0

Former Member
0 Kudos

Hi All,

We are using PI 7.0 and there is a requirement for us to process empty file. The scenario is file to proxy and the source file is a flat file.

I have selected the Process Empty File for Empty-File Handling but we are still encountering an error in mapping side. Below is the error:

Parsing an empty source. Root element expected!

I would like to ask if it is possible to process empty file successfully in PI 7.0.

Can you please help me?

Thanks,

Arlene


Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kalyan,

Thanks for the reply. I have gone thru the links but unable to find additional info that may help me with our requirement. I have already selected process empty file but is still encountering an error in mapping because the file is indeed empty. Even if the 0 byte flat file passed thru the FCC successfully, in sxmb_moni it is showing a blank message so we are encountering the error. Do you have an idea how can I configure the interface to convert a 0 byte flat file to have the ff XML tag inside the converted file?

<?xml version="1.0" encoding="UTF-8"?>

<ns0:I00223_COLLAB_V01_MovePlan_Vendor_OutB xmlns:ns0="namespace">
</ns0:I00223_COLLAB_V01_MovePlan_Vendor_OutB>

Thanks in advance.

Former Member
0 Kudos

Hi Arlene,

In addition to the "Process Empty File" try to create your Target Node Ocuurence "0 .. Unbounded".

Also, Please go through the below link if it helps you -

http://wiki.scn.sap.com/wiki/display/NWTech/Empty-Message+Handling+-+Receiver+File+Adapter

Regards,

Kalyan

Former Member
0 Kudos

Hello,

>>Do you have an idea how can I configure the interface to convert a 0 byte flat file to have the ff XML tag inside the converted file?

I think u can use java mapping where u can check the file size (Using DC) and if the size is 0 bytes then u can create mentioned above structure inside ur JM and if the file size is greater than 0 then pass converted XML string (from FCC) as it is to second mapping i.e. actual message mapping which will do tansformation.

So ur OM will have 2 mappings - first JM (which will check the file size and depending upon the size, output XML structure) + Message mapping

Thanks

Amit Srivastava

Former Member
0 Kudos

my target node is 0..1 and my scenario is file to proxy

Former Member
0 Kudos

Hi Amit,

Thanks! We are also considering creating JM but since we do not have enough skills in Java, we are trying to create the interface without JM

How about module transformation? Is it possible? Do you have an idea? I am currently reading references but I am kinda lost..

former_member192343
Active Contributor
0 Kudos

What is expecting on proxy side for empty file processing?

You can use "exists" node function to check if node of file exist and generate node for proxy side to avoid mapping errror.

Former Member
0 Kudos

Hi Mikhail,

I am still encountering an error because the source payload is just blank. I even tried to use MapWithDeafult before the exists node but it is still looking for the root element.

Thanks.

Former Member
0 Kudos

Hi Arlene,

Please go through the below link where same discussion is covered -

Empty File Handling in&amp;nbsp; SAP XI------Urgent | SCN

Regards,

Kalyan