cancel
Showing results for 
Search instead for 
Did you mean: 

FCC in File Receiver Adapter

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (5)

Answers (5)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Chinna,

It is not good to copying the above suggestions and pasting as your suggestion .Please read forum rules and regulations first.

Regards

Venkat

Former Member
0 Kudos

Hi Venkat,

My answer is also same like that just I want to tell. by the way I know forum rules very well. Any way I don't want repeat again these.

Thanks,

Seshu.

Former Member
0 Kudos

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.

nabendu_sen
Active Contributor
0 Kudos

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

Ryan-Crosby
Active Contributor
0 Kudos

Hi Martin,

The following parameters in the FCC configuration would achieve that:

Regards,

Ryan Crosby

naveen_chichili
Active Contributor
0 Kudos

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

smavachee
Active Contributor
0 Kudos

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.

SAP Library - FCC

Hope it helps.!

Regards,

Sunil

gagandeep_batra
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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