cancel
Showing results for 
Search instead for 
Did you mean: 

how to supress the extra comma's in the input file

former_member203631
Participant
0 Kudos

HI all,

I have file to idoc scenario where in flat file will contain

Header segment,

Body segment(s) and

Trailer segment.

In which Header segment will contain 4 fields seperated with 3 commas, but very often we are getting the file with extra comma in the Header segment. Which causing file content conversion error in communication channel.

Is there any method by which we can suppress this extra comma during file content conversion.

Regards,

SK

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi SK,

You can eliminate extra comma.Using Parameters for Recordset Structures in Content Conversion Parameter.

Header/Body/Footer.enclosureConversion = YES

Header/Body/Footer.enclosureSign= ,

This might solve your problem, on this problem blog posted in this site.

BestRegards,

Rajkumar P.

former_member203631
Participant
0 Kudos

Hi Raj,

Following are the parameters :

Header.processFieldNames fromConfiguration

Header.fieldSeparator ,

Header.fieldNames RecordType,DeliveryDestinationCode,DownloadDate,Remarks

Header.keyFieldValue 10

Header.enclosureConversion YES

Header.enclosureSign ,

Still Iam getting the same error in communication channel as :

Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Header':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

regards,

sk

former_member203631
Participant
0 Kudos

Hi,

Please any one help me in overcoming this situation.

regards,

sk

Answers (5)

Answers (5)

Former Member
0 Kudos

Header.fieldNames RecordType,DeliveryDestinationCode,DownloadDate,Remarks

Header.keyFieldValue 10

Header.fieldSeparator ,

Header.endSeparator 'nl'

Header.processFieldNames fromConfiguration

Same for Body/Footer ...,

Try this its may solve the your problem..,Check it once cursor space ,' .' may occure any where..,

Best Reagards,

Raj

Former Member
0 Kudos

Hi Siva,

Do you have begin seperator or end seperaor fields:

can you send me sample fine format.

below configuration looks correct, it should solve the problem.

Header.fieldNames RecordType,DeliveryDestinationCode,DownloadDate,Remarks

Header.keyFieldValue 10

Header.fieldSeparator ,

Header.endSeparator 'nl'

Header.enclosureConversion YES

Header.enclosureSign ,

Header.processFieldNames fromConfiguration

Try above settings.

Rajkumar

former_member203631
Participant
0 Kudos

We dont have begin or end seperators.

Sample correct file :

10,01207222,26/07/2007,PO

20,286063,26/07/2007,28/07/2007,01205616,08909111,25.00,24

20,286063,26/07/2007,28/07/2007,01205616,08909113,25.00,12

20,286063,26/07/2007,28/07/2007,01205616,08900971,40.40,24

30,15

Sample in-correct file :

10,01205592,25/07/2007,new item of, alookan branch

20,4500172307,25/07/2007,27/07/2007,01205592,08900113,0,72

20,4500172307,25/07/2007,27/07/2007,01205592,08900115,0,72

30,2

Problem here is with Header segment(starting with 10) containing unwanted extra comma which needs to be ignored.

regards,

sk

Former Member
0 Kudos

LOL CARZY

Former Member
0 Kudos

Hey,

Can you also provide the FCC paramters that you are using for Header Segement will be easy to pin point the error

<b>Cheers,

*RAJ*

former_member203631
Participant
0 Kudos

FCC Parameters for Header segement:-

Header.processFieldNames fromConfiguration

Header.fieldSeparator ,

Header.fieldNames RecordType,DeliveryDestinationCode,

DownloadDate,Remarks

Header.keyFieldValue 10

Former Member
0 Kudos

Jai has given the answer go through the blog else juz add one more parameter

Header.additionalLastFields = ignore

done...

Cheers

*RAJ*

Former Member
0 Kudos

>>>Is there any method by which we can suppress this extra comma during file content conversion.

Yes.:-) If you are in PI 7.0 SP12 using the parameter <b>additionalLastFields</b>

More about the same here

http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm

Regards,

Jai Shankar

former_member203631
Participant
0 Kudos

Hi Shankar,

Thanks for you quick response, we are using XI 3.0 and

Former Member
0 Kudos

>>>we are using XI 3.0 and

SP20

Also refer this blog

/people/sukumar.natarajan/blog/2007/06/12/content-conversion-in-sender-file-adapter--2-new-useful-parameters

Regards,

Jai Shankar

former_member203631
Participant
0 Kudos

Version

Service pack: 19

Release: 30_REL

Former Member
0 Kudos

>>Service pack: 19

Time for another upgrade

Regards,

Jai Shankar