on 04-26-2007 2:22 PM
Hi all,
I have a receiver setup to append a csv file on ftp server with new data. The problem is that customer asked me to have 2 header lines on top of that file. According to receiver conversion parameters I can setup a headerLine parameter for my adapter, but only with one line. Is there any workaround for this solution? I cant put this header lines in mapping because I am appending or at least I do not know how to setup receiver adapter to get it done. Any ideas?
br
Dawid
HI,
See the below from help
NameA.addHeaderLine :
Specify whether the text file will have a header line with column names. The following values are permitted:
· 0 No header line
· 1 Header line with column names from the XML document
· 2 As for 1, followed by a blank line
· 3 Header line is stored as NameA.headerLine in the configuration and is applied
· 4 As for 3, followed by a blank line
This specification is only permitted if exactly one structure is defined
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandra,
What I would like to achieve:
header line 1
header line 2
csv row 1
csv row 2
...
the problem is that I am getting this setup:
header line 1
header line 2
csv row 1
header line 1
header line 2
csv row 2
how can I get this fixed.
here is my receiver setup:
fileConstructionMode = append
record.addHeaderLine = 3
record.headerLine = "header line 1"
record.beginSeparator = "header line 2"
Here is XML for that message:
<?xml version="1.0" encoding="utf-8" ?>
<ns2:MaterialMsg xmlns:ns2="http://Workmanager/WorkmanagerPDM">
<record>
<Codice>"11020693"</Codice>
<Versione>"1"</Versione>
<Revisione>"-"</Revisione>
<Revlv>"-"</Revlv>
<Descizione>"SPRING 4.2X13X0.5X9.5"</Descizione>
<Nome_classe>"C_PARTICOLARI"</Nome_classe>
<GenItemCatGrou>"ZERL"</GenItemCatGrou>
</record>
</ns2:MaterialMsg>
By main structure u mean MaterialMsg or record?
br
Dawid
Hey
just change ur message structure to the following
<?xml version="1.0" encoding="utf-8" ?>
<ns2:MaterialMsg xmlns:ns2="http://Workmanager/WorkmanagerPDM">
<Recordset>
<record>
<Codice>"11020693"</Codice>
<Versione>"1"</Versione>
<Revisione>"-"</Revisione>
<Revlv>"-"</Revlv>
<Descizione>"SPRING 4.2X13X0.5X9.5"</Descizione>
<Nome_classe>"C_PARTICOLARI"</Nome_classe>
<GenItemCatGrou>"ZERL"</GenItemCatGrou>
</record>
</Recordset>
</ns2:MaterialMsg>
Note:Occurence of <Recordset> is 1-1
and give the same parameters using <Recordset> instead of <record>.
see if i m not wrong the occurence of <record> is 0-unbounded or 1-unbounded.
so it will disply the header each time for every new record.
when u encapsulate the <record> under <Recordset>,then occurence of <Recordset> will be 1-1 and it will be displayed only once
thanx
ahmad
I have used different approach, as none of proposed were 100% solutions.
br
Dawid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
u can insert the second line by using the .beginSeparator
for e.g.
recordset.beginSeparator = Second Header Line
but use this one only for the main structure
thanx
ahmad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.