cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Header elements in File Adapter

Former Member
0 Kudos

Proxy to File (CSV)

I donot have a header in my target structure.

I want these elements in Header

ResourceID FirstName LastName Email

Values should be under them correspondingly.

I have used the foloowing for testing it is not working

1)

Records.addHeaderLine 1

Records.addHeaderLineElements ResourceID,FirstName,LastName,Email

Records.headerLineElementsSeparator ,

Records.headerLineElementsEndSeperator 'nl'

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

check this:

http://help.sap.com/saphelp_nw70/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

NameA.addHeaderLine = 3

NameA.headerLine = <specify the header as static text here>

Thanks,

Beena.

Former Member
0 Kudos

Thnaks for quick responses.

I have used

Records.addHeaderLine = 3

Records.headerLine = ResourceId,FirstName,LastName,Email.

Records.headerLineElementsSeparator = ,

Records.headerLineElementsEndSeparator = 'nl'

This is not working.

Former Member
0 Kudos

Try

Records.addHeaderLine = 3

Records.headerLine = ResourceId FirstName LastName Email.

This text will be inserted as it is in the file.

Or if these are the xml columns use

Records.addHeaderLine = 1

Thanks,

Beena.

Former Member
0 Kudos

No both are not working

So is it not possible to display Header(if not present in the structure) using Configuration?

Former Member
0 Kudos

I have configured header in this way in one the scenario and it is working fine.

Can you check communication channel monitoring and tell what is the error?

Thanks,

Beena.

Former Member
0 Kudos

There is no error in Communication channel,

what I can see is, Header, not present when file is getting created.

This is what I exactly have in my Configuration

Line.fieldNames TotalRecords,Insertedrec,FailedRec

Line.fieldSeparator ,

Line.endSeprator 'nl'

Records.addHeaderLine 1

Records.headerLine ResourceId FirstName LastName Email

Records.fieldNames ResourceId,FirstName,LastName,Email

Records.fieldSeperator ,

Records.endSeperator 'nl'

DO I need delete these

Records.fieldNames ResourceId,FirstName,LastName,Email

Records.fieldSeperator ,

Records.endSeperator 'nl'

Former Member
0 Kudos

Line.fieldNames TotalRecords,Insertedrec,FailedRec

Line.fieldSeparator ,

Line.endSeprator 'nl'

Records.addHeaderLine 1

Records.headerLine ResourceId FirstName LastName Email

Records.fieldNames ResourceId,FirstName,LastName,Email

Records.fieldSeperator ,

Records.endSeperator 'nl'

You can have addHeaderLine for only one structure.

This specification is only permitted if exactly one structure is defined.

There are two structures in your configuration: Line,Records

You can add third structure in your target structure say header and map constant values in mapping.

Thanks,

Beena.

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

note that

.addHeaderLine 1 will take the values of the column names from the xml.