cancel
Showing results for 
Search instead for 
Did you mean: 

FileContentConversion Problem

Former Member
0 Kudos

Hi Experts,

Iam doing FileContentConversion for my sample file,if there are more than 3 consecutive spaces in my file i am getting an error saying

"Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'EDI_DC40':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this"

I have tried setting the parameter 'lastFieldsOptional' ,But even though i am getting the same error.

Kindly help me to resolve the issue.

Regards,

Gunasree.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Did you used , UDF?

Please trim the data then you will get output..

FCC links.for you ref.

http://help.sap.com/saphelp_nw04/helpdata/en/ee/c9f0b4925af54cb17c454788d8e466/frameset.htm

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp

/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter

Regards

Chilla..

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I have given these parameters in the file content conversion.

Header.fieldNames

Header.fieldFixedLengths

Header.endSeparator

Header.keyFieldValue

Header.lastFieldsOptional = YES

I have tried all the options as replied in the above thread.

Regards,

Gunasree.

Former Member
0 Kudos

Hi Gunasree,

Since it is specifying fields missing error, check the exact number of fields in input file with no. of fields specified in sender communication channel ( attribute 'fieldNames').

also, check the values of fieldFixedLengths. since there is no fieldSeparator this field 'fieldFixedLengths' is the only specification to identify the individual columns in a row.

By default attribute fieldContentFormatting will be set to 'trim' - all blanks that proceed and follow a found value are removed. So i think there wont be problem with spaces in ur case.

Regards,

Uma

Former Member
0 Kudos

Hi,

could you give a few more information about the parameters you were setting? Otherwise it is difficult to see what is happening there.

Cheers

Cornelius

Former Member
0 Kudos

Could you please post the file content conversion parameters that you have maintained..

Since the is EDI_DC40 used, i am assuming this is an IDOC in flat file format...

If that is the case the fixedfield lengths need to be used.

Further more more if it is an IDOc and you want to convert it to an IDCO-XMl, there is an easier way than using file content conversion...there is a "How-to" guide on converting IDOC 'to and from' flat file and IDoc formats.

Thanks.

Former Member
0 Kudos

Hi,

I think it says some inconsistency while reading the file. I feel you would have missed something in your file sender comm. channel. Also please specify your content conversion parameters, sample file etc so that we can know more about your issue.

---Satish