Skip to Content
author's profile photo Former Member
Former Member

How to Add Column header in a CSV ?

Hi,

I am trying to develope a scenario to convert an XML file into CSV file, the scenario is populating values of all fields in the CSV file properly, but i am not getting the column header for any field in my CSV file.

Source xml structure : <item>

<name>

</name>

<roll>

</roll>

<age>

</age>

</item>

I have configured FCC in the receiver communication as follows :

Recordset Structure : item

item.addHeaderLine : 1

item.headerLine : name,roll,age

item.fieldseparator : ,

item.endseparator :

item.fieldnames : name,roll,age

Can anyone suggest , what should i add or modify in the scenario to get column header for all the fields in the CSV ??

Edited by: Sambaran Pradhan on Jun 19, 2008 10:43 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 08:47 AM

    Hi,

    Your FCC parameter item.headerLine : name,roll,age will work if the item.addHeaderLine == 3 or 4

    Else for value 1 it will take the names from XML document.

    For item.addHeaderLine

    Specify whether the text file will have a header line with column names. The following values are permitted:

    · 0 u2013 No header line

    · 1 u2013 Header line with column names from the XML document

    · 2 u2013 As for 1, followed by a blank line

    · 3 u2013 Header line is stored as NameA.headerLine in the configuration and is applied

    · 4 u2013 As for 3, followed by a blank line

    Refer

    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 09:13 AM

    Hi,

    Thanks for ur suggestion, but it is still not working, i have tried all the options.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Do you this single structure on target side or multiple structures as

      <Item1>

      -


      <A>

      -


      <B>

      </Item1>

      <Item2>

      -


      -


      </Item2>

      If this the caes then it will not be possible to use the addHeaderLine. It will not work.

      Thanks

      sWarup

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 10:02 AM

    No, i am using a single structure, what i had mentioned earlier .

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.