cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion and Empty file issue

Former Member
0 Kudos

Hello,

The issue is :

I have configured a file sender adapter with file Content Conversion. I have 2 kinds of records Header and Items.

i have defined the 'Key Field Name' based on the first character of each line of my flat file and the values associated :

Header.keyFieldValue = 1

Item.keyFieldValue = 2

Flat file example :

1;Headerfield1;Headerfield2

2;ItemField1;ItemField1;ItemField1;ItemField1;

2;ItemField1;ItemField1;ItemField1;ItemField1;

2;ItemField1;ItemField1;ItemField1;ItemField1;

and everything works fine !

But now imagine you receive a bad file like this :

xxxxx;ohhohoh;llllll

y;sdfsdfs;zezerz;zerzer

e;zerzerze;zezerzerzer

The result is : IS receive nothing and no alert is generated ?!!!???

What i have seen is that the adapter doesn't find any corresponding value for keyFieldValue so it consider that the flat file is empty and i do nothing, the file is archived and that's all no alert is generated ????

But i want to receive an alert for checking that the processed flat file was not correct !

If anybody has an idea, it will be great !

Regards,

Vincent

Accepted Solutions (0)

Answers (5)

Answers (5)

STALANKI
Active Contributor
0 Kudos

/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module

STALANKI
Active Contributor
0 Kudos

It will solve your empty file problem.adapter will pick up but the row tag may not be created as there is no data and you can check in the content based routing wether row tag doesnot exist it means an empty file.

It will definetly solve your problem.

use generic file adapter configuration in the blogs i have given previously.

STALANKI
Active Contributor
0 Kudos

Take a look at generic file adapter configuration which can pick up any file.

/people/sravya.talanki2/blog/2006/01/10/re-usable-frame-work-in-xi

Former Member
0 Kudos

Thanks for your response Sravya, i understand the concept but it doesn't resolve the case of receiving an empty file. In this case any message is send to IS by the file adapter.

Regards,

Vincent

Former Member
0 Kudos

Hi Vincent.

Sometimes it really #!@#%%#.. me off when customers excepts that XI will solve their whole organization interfacing problems (and the world hunger as well...:)...

even when it comes to the responsible systems that creates the file(sometimes with bugs and problems even before XI came to the org.).as in every developed application or out of the box one, the application has to take care of its outputs and deal with errors. when it cant deliver what other systems expects her to it has to inform some one...

When it comes to the Adapter frame work XI expects the system in its landscape to be responsible for the data they send (well formed and with the defined structure...IDocs,XML,flat files).

as mentioned in my colleagues previous postings you can take care of data verification during mapping and so..

I belive it is possible to monitor the incoming file before it is parsed to XML (not sure it is the right way to) and maybe we'll get a solution to that in the future (today we can monitor the comm. channel wether its configures well or not,maybe it will be possible in the future to alert when an incoming file is empty)

Regards.

Nimrod

Former Member
0 Kudos

Hi Nimrod,

I am so agree with you but in the reality everybody consider that the EAI platform is responsible of everything .... including validation of receiving file !

Regards,

Vincent

Former Member
0 Kudos

This is why we are XI consultants - to explain them what is the right way to implemented XI.

There are issues regarding buisness process as well and delivering data as part of a purchase order lets say (header,items etc) and not creating all the master data inside the r3 ceperatly using own written RFCs or PROXIS and not as a part of the PO buisness process...

Its a Black or white issue, if you'll agree to this as part of the XI responsible you'll have to "stand on your head" and do it...and after that you can join the development team of SAP.... :)..

STALANKI
Active Contributor
0 Kudos

That is the actual problem of file adapter using file CC.

you might see the actual error in default.trc and some times it may not even write the error.It is better to validate the file in a java mapping etc..than validating at the adapter level as we donot have much control over errors.

Go through the blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2994. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]

Former Member
0 Kudos

Hi Vincent,

I feel the key-field value approach should be used only when we are sure that the file structure is always going to contain the key-values specified.

In your case you can try by picking up the records as a string.i.e you the pick up the whole row and then do the validations for the structure and other things either in a Module or Mapping.

eg :

<Row>

|_<Record>

Regards,

Sulakshana

Former Member
0 Kudos

Thank you for your reply,

but this case should be detected by the adapter as an error no ? Because in this case nobody should use file content conversion because you never cannot be sure that the files that you receive are corrects !!!!

And what about the processing of an empty file ? Why IS receive nothing when the adapter detect an empty file ?

Regards,

Vincent