cancel
Showing results for 
Search instead for 
Did you mean: 

CSV file receiver (Remove the last field value)

Former Member
0 Kudos

Hi All,

I'm working on a CSV file receiver in the below format.

Srinivas,123,xyx,K

Gawshan,123,xyx,R

Himaval,123,xyx,Q

I want to strip off the field value on the end K, R and Q while writng the file in CSV, using some file adapter setting.

Any suggestions would be hightly appretiated.

Thanks

AJ

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

> I want to strip off the field value on the end K, R and Q while writng the file in CSV, using some file adapter setting.

Lets say the field name is FIELD1 in which K comes, so add below parameters in your FCC..

FIELD1.fieldFixedLengths = 0
FIELD1.fixedLengthTooShortHandling = Cut

Similarly you can do it for R & Q fields.

Former Member
0 Kudos

Hi All,

Thanks for the reply.

But the file type that I'm talking about is Comma separated.

And I cannot use dynamic configuration because that doesn't seems to work all the time, because of the high throughput.

Thanks,

AJ

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Whats that is seems not to work all the time??

it works if you configure it properly use this blog as reference

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

Former Member
0 Kudos

As I said, file adapter picks up the wrong value from the memory, incase of a large data load. For example If case of 1000 messages, around 10 -15 entries would be picking the wrong value from the memory varialble.

Thanks,

Ajay

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi,

one possible solution is create a separete segment for those values that you have to use in variable substitution.

so, when create the FCC you can define

<row>.fieldName = XX

<row>.fieldFixedLengths = 0

<row>.NameA.fixedLengthTooShortHandling = Cut

so you can handle the conversion of this segment separatly

Former Member
0 Kudos

Rodrigo,

The file type we are handling is Comma separated. So how do we avail these paramters for fixed length files?

Thanks,

Ajay

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

if you separate the segment as i sugguested you before,you can use CSV for the file structure and FixedLength for the segment that contain the values for Variable Susbtitution.

I mean

<Root>

<FileData>

-


<field>

-


<field>

-


<field>

-


<field>

-


<field>

<VariableSubstitutionSegment>

-


<fieldXX>

-


<fieldXX>

So for segment FileData you can use <row>.fieldSeparator and for segment VariableSubstitutionSegment you can use <row>.fixedFieldLength

its clear my point??

Rgds

Edited by: Rodrigo Alejandro Pertierra on Sep 14, 2010 12:43 PM

Former Member
0 Kudos

Hi.

if you use a mapping don't map this value else you can use the parameter fieldFixedLengths however this parameters works if the length of fields are known and the last field put 0.

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

if you dont want to send this data to the target file, why you mapp it?

Former Member
0 Kudos

The field value is used in the variable name substitution. Hence the value has to be populated in the payload.

Thanks

AJ

Shabarish_Nair
Active Contributor
0 Kudos

use ASMA and dynamic conf - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

you can use Dinamyc Configuration in the mapping to avoid mapping this field.

how do you see this option?