You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hallo togehter i have still a problem with an csv file.
The csv file includes about 40 Columns. The rows are qualified in the first column as header or position. I have to create an xml file from the csv file.
"KS","21100","Kreditor","6912","debitor",","","Vincenzstraße 29","","","","65719","Hofheim","D","EUR"
"PS","10","24030","38.00","kg","ST","1.0000","5.870","1","24.05.2012","07:00:00","14:00:00"
"PS","20","408002","3.00","ST","KT","30.0000","19.500","1","24.05.2012","07:00:00","14:00:00"
<rootTag>
<KundenNr>6912</KundenNr>
<Kundenname1>Vincenzstraße 29</Kundenname1>
<Bestellnummer>14</Bestellnummer>
<position>
<BestPos>10</BestPos>
<LieferantenArtNr>24030</LieferantenArtNr>
<Menge>1.0000</Menge>
<MengenEh>ST</MengenEh>
<LiDat>24.05.2012</LiDat> This is the problem !! i need the Information LiDate from the position row (in every position the same Date) one time in the header.
</position>
<position>
Offline

Hi
Hope I catch your point.
<rootTag>
<KundenNr>6912</KundenNr>
<Kundenname1>Vincenzstraße 29</Kundenname1>
<Bestellnummer>14</Bestellnummer>
<LiDat>24.05.2012</LiDat> //<------you want it here?
<position>
<BestPos>10</BestPos>
<LieferantenArtNr>24030</LieferantenArtNr>
<Menge>1.0000</Menge>
<MengenEh>ST</MengenEh>
</position>
<position>
Why don't you use tFileOutputMSXML and extract LiDat separately?
Or use tJavaRow to add a new column in KS row.
Regards,
Pedro
Offline

Yes i want it there.
But what do you mean
"Why don't you use tFileOutputMSXML and extract LiDat separately?"
Is there a differenz between tAdvancedfileoutputxml an tFileoutputMSXML ?
I made an output Schema complete with all possible columns and fill in needed fields with for example
Test.iff(row6.Column0, "KS", row6.Column1, "") for an information from the header column Like customer number
Test.iff(row6.Column0, "PS", row6.Column9, "") for an information from the position column Like LiDat
Offline

Here is my tMap and my xml output
So i defiened all available columns in the output schema and filled with csv fields depending on Header or positin qualifier.
In xmloutput for example LiDat is not filled for root segment.
My idea was to fill an variable while reading only the first positional row and catch the LiDat to read the variable while fill the xml file.
Last edited by wulf (2012-06-15 12:47:41)
Offline
Pages: 1