cancel
Showing results for 
Search instead for 
Did you mean: 

FCC with header and Item text lines

former_member187447
Participant
0 Kudos

I have a scenario where in i have the Flat file structure which is having Header and detail comments. Can the following structure be achieved with just FCC?

Header

Header Comment1

Header comment2

...

...

Line Item1

Line Item1 Comment1

Line Item1 Comment2

....

..

Line Item2

Line Item2 Comment1

Line Item2 Comment2

....

....

Accepted Solutions (0)

Answers (2)

Answers (2)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

if you have deeply nested XML structure take a look to this blog By Michal

http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/02/28/simplest-way-to-convert-flat-file...

if not, you can solve your issue ussing the standard fucntionality, i sugguest you to search in SDN about other related thread and blogs,its a common scenario you have

Regards

Rodrigo

former_member187447
Participant
0 Kudos

Sorry i meant can this structure be read through just FCC.

ambrish_mishra
Active Contributor
0 Kudos

Hi Kalyan,

Can you share your sample file screenshot. I think it should be possible to read the file with FCC.

Ambrish

former_member187447
Participant
0 Kudos

HField1 Field2 Field3

HTText1

HTText2

DField1 Field2 Field3

DTText1

DTText2

DField1 Field2 Field3

DTText1

DTText2

DTText3

Please note its fixed field structure, H, HT, D, DT are Header, Header text, Detail, Detail Text respectively

ambrish_mishra
Active Contributor
0 Kudos

Hi Kalyan,

Try and read it as

Header,1 HeaderText,*,Detail,*,DetailText,*

Structure should be like

MT_xyz

Header

HeaderText --0.. unbounded

Detail         --0.. unbounded

     DetailItem   1

     DetailText   0.. unbounded

    

Hope it helps!

Ambrish

former_member187447
Participant
0 Kudos

Could you please elaborate on

Detail         --0.. unbounded

     DetailItem   1

     DetailText   0.. unbounded

do you think Detail,*,DetailText,* will do the trick, If we have Detail,*, dont you think it will error out if it doenst see another Detail succeeding it?

ambrish_mishra
Active Contributor
0 Kudos

Detail, * DetailText,* may work but how will you group related DetailItem and DetailText together.

You are right.

Detail         --0.. unbounded

     DetailItem   1

     DetailText   0.. unbounded

will not work since it will need one more nested level for DetailText

Try a prototype....and take it on from there.   🙂

Ambrish

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

see my previous post about how to handle deeply nedted xml structure

former_member187447
Participant
0 Kudos

Yes Rodrigo, the link you have provided is exactly meant for this solution. But i was looking for Simpler solution which it looks like there is not.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

if you need to handle nested deeply xml structure this is the only way, remenber that PI allow just one level nested.

Regards

former_member187447
Participant
0 Kudos

Just one last question, if we have only 2 levels of hierarchy like the following

Header

HC Comment1

HC comment2

IT Item1

IT Item2

IT Item3

IC Comments1

IC Comments2

IC COmments3

then can we achieve this by the following right?

Header,1, HC,*,IT,*,IC,*,

Also if this is true, can i have the record set like the one above repeating multiple times. I suppose that can be achieved by just changing the mapping to i to unbound in the message mapping signature, right?

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

yes, in this case you can solve your requirement by standard functionality of FCC

ambrish_mishra
Active Contributor
0 Kudos

that's true... however I am going to try your requirement on the system when I have time.

Cheers

Ambrish