cancel
Showing results for 
Search instead for 
Did you mean: 

File receiver content conversion fields attributes

Former Member
0 Kudos

hi,

i am trying to use file adapter to write this xml to flat file but all attributes of the fields are not written to file ( only elements are written).

the xml file is:

<?xml version="1.0" encoding="utf-8"?>

<n0:MT_Mits_Claims xmlns:prx="urn:sap.com:proxy:DE1:/1SAI/TAS6EAA2B8AB4A5D2DA4145:700:2008/06/25" xmlns:n0="http://colmobil.com/wty/1162/claims_to_manufacturer/mits/">

<Header>

<File_ID>GDM001</File_ID>

<Dist_Code>KS</Dist_Code>

<Header_Code>H1</Header_Code>

<File_Descr>CLAIM RESULT DATA</File_Descr>

<Total_Records>0000008</Total_Records>

<Filler/>

<Filename>GDM0010812100016.DAT</Filename>

</Header>

<Details>

<Header_EA File_ID="GDM001" Dist_Code1="KS" Detail_Code="D1" Domestic_Export="E" Dist_Code2="KS" Dealer_Code="2110" Seq_No="0902" Sub_Seq_No="" Page_ID="01" Line_ID="EA" Claim_Type="P" Division="" RFC_Seq_No="" Filler=""/>

<Header_HA File_ID="GDM001" Dist_Code1="KS" Detail_Code="D1" Domestic_Export="E" Dist_Code2="KS" Dealer_Code="2110" Seq_No="0902" Page_ID="01" Line_ID="HA" VIN="VIN260" Faliure_Date="200810" Odometer_Reading=" 1204" Sold_Date="080820"/>

<Header_HB File_ID="GDM001" Dist_Code1="KS" Detail_Code="D1" Domestic_Export="E" Dist_Code2="KS" Dealer_Code="2110" Seq_No="0902" Sub_Seq_No="" Page_ID="01" Line_ID="HB" Position_Code="111221" A_Code="12" B_Code="03" C_Code="1" Ref_Code="" Manual_Control="" Comment_Code="" Ratio_Labor="" Ratio_Parts="" Manuf_Code="" Filler=""/>

<Details_LA_LE File_ID="GDM001" Dist_Code1="KS" Detail_Code="D1" Domestic_Export="E" Dist_Code2="KS" Dealer_Code="2110" Seq_No="0902" Sub_Seq_No="" Page_ID="01" Line_ID="LA" Labor_Pos_Code="" Work_Code="99" Qty="10" Amount="" Ratio="" Comment_Code="" Factory="" Filler=""/>

<Details_LA_LE File_ID="GDM001" Dist_Code1="KS" Detail_Code="D1" Domestic_Export="E" Dist_Code2="KS" Dealer_Code="2110" Seq_No="0902" Sub_Seq_No="" Page_ID="01" Line_ID="LA" Labor_Pos_Code="231110" Work_Code="10" Qty="01" Amount="" Ratio="" Comment_Code="" Factory="" Filler=""/>

<Details_PA_PK File_ID="GDM001" Dist_Code1="KS" Detail_Code="D1" Domestic_Export="E" Dist_Code2="KS" Dealer_Code="0211" Seq_No="0902" Sub_Seq_No="" Page_ID="01" Line_ID="PA" Parts_No="" Qty="01" Faliure_Origin="X" Price="0050000" Ratio="" Comment_Code="" Factory="" Filler=""/>

<Total_Claim_Lines>6</Total_Claim_Lines>

</Details>

<Trailer>

<File_ID>GEE</File_ID>

<Dist_Code>KS</Dist_Code>

<trailer_Code>E1</trailer_Code>

<End_Code>END</End_Code>

<Filler/>

</Trailer>

</n0:MT_Mits_Claims>

the content conversion paramters are:

Header.addHeaderLine 0

Header.fieldFixedLengths 6,4,2,30,7,31,0

Header.fixedLengthTooShortHandling Cut

Details.addHeaderLine 0

Details.fieldSeparator 'nl'

Trailer.addHeaderLine 0

Trailer.fieldFixedLengths 3,4,2,3,65

the output file that i get is:

GDM001KS H1CLAIM RESULT DATA 0000008

6

GEEKS E1END

What i need to do to get attributes in file?

Thanks

Tomer

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

attributes cannot be written out via content conversion.

You will require to have the values in the attributes as part of the fields (maybe you can create additional fields and use them instead of attributes)

Former Member
0 Kudos

Hi

Assuming the scenario you are trying to implement is XML file to Flat file. You need to map the input structure including attributes to the flat file structure. Then in your content conversion output the flat file structure.

Thanks

Damien