on 01-31-2013 11:12 AM
Hi,
I have xml structure as stated below and I want to parse it in FCC to be a flatfile.
I have tried to read some dokumentation, but no luck. First time with FCC 🙂
We have PI 7.0
We are talking Recordset and it's attributes...
<Root>
<Order>
<OrdId>10589</OrdId>
</Order>
<OrderDetail>
<matnr>223344</matnr>
</OrderDetail>
<OrderDetail>
<matnr>667788</matnr>
</OrderDetail>
</Root>
Output file should be like this: (One Raw, No Delimeter.)
File: 10589223344667788
Regards
Martin
Hi,
Thx all!
I found out after some playing around that the simplest way to solve this is:
Recordset: Root
Root.fieldSeparator = '0'
Root.endSeparator = '0'.
I only mapp those fields that are relevant for sender so everything should be sent.
//Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin Andersson,
you could have try like these,
Record Structure=Root.Order,1,Root.OrderDetail,*
Root.Order.fieldNames=Ordid
Root.Order.fieldSeparator=
Root.OrderDetai.fieldNames=matnr
Root.Order.fieldSeparator=
and
Create only field in target as below.
Body 1..1
Body 1..1
write one simple udf to concat all input values and pass it to target Body field.
Below sample code ;fine tune it written roughly
String temp = orderID;
for (int i =0;i<orderdetails.count;i++)
{temp = temp +orderdetails[i];
}
result.addValue(temp);
it is useful for you, try once.
Thanks & Regards,
Seshu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
Is it possible that you create target DT like this as you want both order id and material ids in same line?
<Root>
<Order>
<OrdId>10589</OrdId>
<matnr>223344</matnr>
<matnr>667788</matnr>
</Order>
</Root>
Then it will be very simple with FCC
Recordsetstructure: Order
Order.fieldseparator:'0' as suggested by Ryan
Order.endseparator:'nl'
Regards,
Beena.
Hi Chinna,
It is very much clear that you are copying other expert's comments and I have seen this activity in other Questions of PI space. I will try to catch attention of the Moderators so that they can take proper steps. Please again go through Forum Rules: Rules of Engagement
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
Please check the below link for content conversion for your receiver channel
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Thanks and Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Martin,
There are few blogs on it, have a look at Shabrish's blog..
You can follow SAP Help Portal as well for further details.
Hope it helps.!
Regards,
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Martin,
Check below link might help you:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
and try to give below like that:
Record Structure=Root.Order,1,Root.OrderDetail,*
Root.Order.fieldNames=Ordid
Root.Order.fieldSeparator=
Root.OrderDetai.fieldNames=matnr
Root.Order.fieldSeparator=
give blank value for fieldSeparator.
Regards
Gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Create only field in target as below.
Body 1..1
Body 1..1
write one simple udf to concat all input values and pass it to target Body field.
Below sample code ;fine tune it written roughly
String temp = orderID;
for (int i =0;i<orderdetails.count;i++)
{temp = temp +orderdetails[i];
}
result.addValue(temp);
Regards
Venkat
User | Count |
---|---|
93 | |
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.