cancel
Showing results for 
Search instead for 
Did you mean: 

Empty file handling in Receiver File adapter (FCC - Premature end of file)

GabrielSagaya
Active Contributor
0 Kudos

Hi

My interface is Flat file to Flat File interface with file content conversion which is working fine in SAP PI 7.1 EHP1.

If I want to process the empty file from sender system, PI should place the same empty file in the receiver FTP Location as per my requirement.

I am facing the below error message when PI tries to place the empty file.

Message processing failed. Cause: org.xml.sax.SAXParseException: Premature end of file.

But if I am not using FCC, I am able to get the empty file at the receiver end.

Please suggest on this, If I am using FCC in the receiver side.

Thanks

Gabriel

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Gabriel ,

at Interface Determination, you should be better configure condition, if filesize = 0 , don't set Operation Mapping.

if filesize > 0 , set Operation Mapping.

do you understand?

regards.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Gabriel,

You can write a simple script to copy a file from source folder to target in case the fiel size is ZERO bytes. The script will not copy the file if the filesize is more than zero bytes, This will be processed normally by PI server. You can call the script from sender communication channel parameter : "RUN OS command before message processing". Could you please specify the Operating System (OS) you are using in your PI server.

Regards

Anupam

GabrielSagaya
Active Contributor
0 Kudos

Any solution on my request?

prateek
Active Contributor
0 Kudos

What are you using for "Recordset per message"?

Regards,

Prateek Raj Srivastava

Former Member
0 Kudos

HI Gabriel,

In the Receiver file adapter, Under Processing tab - set the Empty-Message Handling option to Write empty file .

Now, try to run the scenario this should work.

prateek
Active Contributor
0 Kudos

By the way, have you tried setting recordset occurrence to *?

Regards,

Prateek Raj Srivastava

GabrielSagaya
Active Contributor
0 Kudos

I tried the recordset with 0..unbounded as well as 1..unbounded. No Luck

record---0-unbounded / 1-unbounded

|_F1

|_F2

In this case I dont have operation mapping in my ICO object.

prateek
Active Contributor
0 Kudos

Do you really need this empty file to be processed? You have option to skip such file.

Regards,

Prateek Raj Srivastava

GabrielSagaya
Active Contributor
0 Kudos

Hi Prateek,

My client wants to place the empty file in the target location for that case.

Please suggest on this

Thanks

Gabriel