cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed length & semi colon both at a file

Former Member
0 Kudos

Hi Master,

I am working on Proxy to flat-file, Its working file....

Right now flat-file structure is semi colon, its working file,

Bur now client need : Fixed length & semi colon both at a file. Is it possiable,

Please give me suggestion.. Its very urgent....

Thanks for your help,

SR

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

You simply specify both in the receiver file adapter. so you configure it with fieldFixedLengths and fieldSeparator

it is as simple as that

Former Member
0 Kudos

Alex,

I done like this, but its not work, Can any body please give me any idea....

In Content Conversion Parameters

Recordset Structure : Details

Details.fieldFixedlenghts :10,40,40,40,10,40,32,10,40,2,2,10,10,10,36,2,2,10,15,30,30,15,40,10,12,15,40,15,40,15,40,2,8,12,8,2,10,10

Details.fieldSeparator ;

Thanks.

regrads,

SR

Former Member
0 Kudos

yes you can have both it is no issue what so ever.

You simply specify both in you file adapter and all will be well.

Just to clarify.. I have done this personally so I know for a fact that this will work.

Edited by: Alex on Jul 21, 2008 5:56 PM

Former Member
0 Kudos

Alex,

If its work, Please tell me How?

Thanks for your help,

SR

Former Member
0 Kudos

Hi,

Check this link.

[http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm]

NameA.fieldSeparator

If you make an entry here, the system expects that the structure contains the specified character string (one or more characters) as a separator between the individual columns.

If you have not made an entry for fieldFixedLengths, this is the only specification to identify the individual columns in a row.

If you made a specification for fieldFixedLengths, the extra length of the separator is taken into account, but no further consistency checks are performed.

Thanks,

Beena.

Former Member
0 Kudos

I am using Received Comunication

Former Member
0 Kudos

Hi,

Not the fixedLenth and fieldSeperator are mandatory.

any one is mandatory.so you can use ';' as fieldSeperator.

Thanks,

Madhu

Former Member
0 Kudos

I don't know if both the parameters endseparator & field fixed length will work together in receiver adapter.

What you can do is you handle the semi colon in your proxy or in mapping and then use fieldFixedLength in your adapter. Remember in this case you need to give your length one char more in FCC because of semi colon.

As said by Riyaz to only use the semi colon if it is variable or fixed length will not work in case when the incoming file have field length of less char. For Example.

right result if length is proper

If fixed field length is 2,4,3

aa;bbbb;ccc

wrong result if length is of less char

fixed field length is 2,4,3

aa;b;ccc

it should be like this..

fixed field length is 2,4,3

aa;b____;ccc (where underscore represents 4 spaces)

Former Member
0 Kudos

Hi,

If your fields are separated by semi-colons, it doesn't really matter if your fields are of fixed or variable lengths.

So you can directly go for field separators. i.e. specify semicolon as fieldSeparator parameter. Note that either of fieldSeparator or fieldFixedLengths parameters is mandatory.

Edit: If you want to make sure that the target fields do not exceed a specified length, you can trim the fields in your message mapping.

Regards,

Riyaz

Edited by: Riyaz Sayyad on Jul 18, 2008 9:42 AM

Former Member
0 Kudos

I done like this, but its not work, Can any body please give me any idea....

In Content Conversion Parameters

Recordset Structure : Details

Details.fieldFixedlenghts :10,40,40,40,10,40,32,10,40,2,2,10,10,10,36,2,2,10,15,30,30,15,40,10,12,15,40,15,40,15,40,2,8,12,8,2,10,10

Details.fieldSeparator ;

Thanks & Regards,

SR

Former Member
0 Kudos

Hi,

Either fieldFixedlengths or fieldSeparator is mandatory.You can give Details.fieldSeparator ; and it will work.

Check for the spelling of fieldFixedlengths in your content conversion parameters.

Thanks and Regards,

Induja

Former Member
0 Kudos

Hi Induja,

I need both fixed length and semi-colon, at a file...

Thanks

SR

GabrielSagaya
Active Contributor
0 Kudos

Hi

Use any one othese

Recordset Structure : Details

Details.fieldFixedlengths :10,40,40,40,10,40,32,10,40,2,2,10,10,10,36,2,2,10,15,30,30,15,40,10,12,15,40,15,40,15,40,2,8,12,8,2,10,10

or

Recordset Structure : Details

Details.fieldSeparator ;

because You cannot use both .fieldSeparator and fieldFixedlengths together.

please check spelling mistake too.

former_member181962
Active Contributor
0 Kudos

HI,

As far as i know, you cannot have a fixed length and semicolon sperated option at the same time.

In the mapping, you should ensure that you get the required output in exactly the same number of characters that you need.

For that you may need to pad the field output with leading ZEROES or spaces.

Then just use the fieldSeparator option as ";"

Do not use both at a time, it will not work.

Regards,

Ravi