cancel
Showing results for 
Search instead for 
Did you mean: 

Key field value changes: Field Content conversion: FCC

Former Member
0 Kudos

HI All,

I am in the File to IDOC scenario using FCC.

The first line of my csv file (HEADER), the value of the key field is 'SOURCE '. i.e 6 characters and 4 spaces.

So in my FCC parameters when I use the value

Header.keyFieldValue = 'SOURCE' OR 
Header.keyFieldValue = 'SOURCE    '.

It does not recognise and hence does not read the header line.

In the incoming file if I strictly use the word 'SOURCE' without any spaces then it works and picks the header field.

Is there a way I can use a wild card character like * or % to let FCC pick up the header record even if it comes with padded spaces.

Apprecitae your response on same.

Thanks

Shirin

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Try representing the SPACE using the ASCII code 0x20 in the FCC.

Thanks

SaNv...

Former Member
0 Kudos

Hi Santosh,

So since I have 4 spaces after the word SOURCE, I put it like

SOURCE0x200x200x200x20

Buts its still erroring?

Regards

Shirin

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi, try without ' ' --> -SOURCE - with spaces. if you want to use '0x20' you must use ' ' for the system recognize it as HEX char.

thanks

Rodrigo

Former Member
0 Kudos

Hi,

If I use the value with 4 spaces, it does work. So temporarily the problem is solved.

However this field has a max width of 10 char, so value can come as

'SOURCE ' with 4 spaces or 6 char word 'SOURCE' without spaces.

So is theer a fool prrof way where FCC can become smart enough to understand that SOURCE with spaces or without spaces means same.

Many thanks

Shirin

Edited by: Shirin K on Aug 5, 2008 3:54 PM

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Try out:

xml.fieldContentFormatting=trim|nothing

If you specify trim (the default setting), all blanks that proceed and follow a found value are removed.

If you specify nothing, the value remains unchanged.

A list of all parameters of the content conversion module, you find in the online documentation for Plain J2SE Adapter Engine -> Configuring Sender/Receiver File Adapter.

Thanks

Rodrigo

Former Member
0 Kudos

Thanks Rodrigo,

Shall try it out and update the forum with the outcome.

Many thanks

Shirin

Former Member
0 Kudos

Problem solved.

As pointed by Rodrigo, using the parameter trim in fieldcontentFormatting option solves the problem of spaces / no spaces around the field content.

Regards

Shirin

Answers (2)

Answers (2)

Former Member
0 Kudos

Header.fieldContentFormatting - nothing .. so that it will not ignore white spaces,

Header.keyFieldValue = SOURCE ... don't write spaces

Also make sure in Header.fieldFixedLengths, first length should be 10(6 char for source + 4 white spaces)..

Header.fieldFixedLengths = 10,....

former_member518917
Participant
0 Kudos

in content conversion try with:

Header.keyFieldValue = SOURCE // SOURCE with 4 space

Header.fieldContentFormatting = nothing

Regards...