on 04-27-2009 7:49 AM
Hi all.
Trying to configure a file adapter according to the following link.
http://help.sap.com/erp2005_ehp_04/helpdata/EN/d2/bab440c97f3716e10000000a155106/frameset.htm
What i want it to do is the following.
I have the following incoming message:
<header>
<h_field1></h_field1>
<h_field2></h_field2>
</header>
<data>
<d_field1></d_field1>
<d_field2></d_field2>
<infotext>
<i_field1></i_field1>
<i_field2></i_field2>
</infotext>
</data>
I want this to become a flat file that looks as follow.
h_field1¤h_field2
d_filed1¤d_field2
i_field1¤i_filed2
Every field in each segment should be concatenated with the ¤ char as separator.
I've done the following:
Content Conversions Parameters
Record Structure: header,data,infotext
header.fieldSeparator ¤
data.fieldSeparator ¤
infotext.fieldSeparator ¤
The adapter just gets into wait mode.
Does anybody know why?
BR
Kalle
Hi,
your msg structure cannot be converted to flat file using File Content Conversion ........because infotext node is inside data node............if your infotext node was outside data node, means infotext node was at the same level of header and data node, then you can use FCC to convert this XML file to flat file...............
Regards,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this, I'm sure it works
But your structure should like this:
>>
Record Structure: header,1,data,1,infotext,1
header.fieldSeparator ¤
header.endSeparator :'nl'
data.fieldSeparator ¤
data.endSeparator :'nl'
infotext.fieldSeparator ¤
infotext.endSeparator :'nl'
Sameer
Edited by: sameer Khanna on Apr 27, 2009 10:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But I still have one problem.
I can get a structure according to the message bellow.
<header>
<h_field1/>
<h_field2/>
</header>
<data>
<d_field1/>
<d_field2/>
</data>
<infotext>
<i_field1/>
<i_field2/>
< /infotext>
<infotext>
<i_field1/>
<i_field2/>
< /infotext>
infortext can come more the one time for each data segment and the data segment can come more then one time for the header segment. The header segment can only come one time for each message. How do I solve that?
BR
Kalle.
Hi,
in FCC, you can have in RecordSet structure: header,1, data,, infotext,
specify asterisk after data and infotext in above..........
also specify the column names and thier lengths also......
then your XML file will be converted to flat file.
Regards,
Rajeev Gupta
Edited by: RAJEEV GUPTA on Apr 27, 2009 1:10 PM
I have the following configuration.
header,1, data,, infotext,
The message lokks as the one bellow when I reciev it.
<header>
<data1>HD01</data1>
<data2>CheckHeader</data2>
</header>
<data>
<data1>AC01</data1>
<data2>CheckData</data2>
</accountdata>
<infotext>
<data1>ACT01</data1>
<data2>CheckInfoText</data2>
</infotext>
<infotext>
<data1>ACT01</data1>
<data2>CheckTInfoext2</data2>
</infotext>
<data>
<data1>AC01</data1>
<data2>CheckData2</data2>
</data>
<infotext>
<data1>ACT01</data1>
<data2>CheckInfoText</data2>
</infotext>
<infotext>
<data1>ACT01</data1>
<data2>CheckInfoText2</data2>
</infotext>
Get the following result.
HD01¤CheckHeader
AC01¤CheckData
ACT01¤CheckInfoText
Do not understand why?
BR
Kalle
Hello kalle,
As per your source structure, if you perform FCC on it you should have 2 level hierarchie, Your RecordSet will be your root node.
and the RecordSetStructure is : header,1,data,1,
Since the node infotext is in the data, you can not refer this node and is not appropriate.
<header>
<h_field1/>
<h_field2/>
</header>
<data>
<d_field1/>
<d_field2/>
<infotext>
<i_field1/>
<i_field2/>
< /infotext>
</data>
Change The above strucutre to like this
<header>
<h_field1/>
<h_field2/>
</header>
<data>
<d_field1/>
<d_field2/>
</data>
<infotext>
<i_field1/>
<i_field2/>
< /infotext>
Your RecordSet will be your root node.
and the RecordSetStructure is : header,1,data,1,infotext,1
This resolves your issue..
Regards,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Record Structure: header,data,infotext
header.fieldSeparator ¤
data.fieldSeparator ¤
infotext.fieldSeparator ¤
change to this
Record Structure: header,data,infotext
header.fieldSeparator ¤
header.endSeparator :'nl'
data.fieldSeparator ¤
data.endSeparator :'nl'
infotext.fieldSeparator ¤
infotext.endSeparator :'nl'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<header>
> <h_field1/>
> <h_field2/>
> </header>
> <data>
> <d_field1/>
> <d_field2/>
> <infotext>
> <i_field1/>
> <i_field2/>
> </infotext>
> </data>
Modify the structure of infotext heirachcy move the elements to data node level
<data>
> <d_field1/>
> <d_field2/>
</data>
> <infotext>
> <i_field1/>
> <i_field2/>
> </infotext>
>
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.