Skip to Content
avatar image
Former Member

File layout issue

Hi PI experts,

I have an IDoc to file scenario, with a nested structure.

Header

HF1

HF2

Item

IF1

IF2

Item1

IXF1

IXF2

Trailer

TF1

TF2

In the output file the data should come as

HF1 HF2

IF1 IF2 IXF1 IXF2

TF1 TF2

Item and Item1 should come in the same line.Item will have only 1 occurance and Item1 will have 14 occurances all of which should come continuous and new line should come only after the end of each line(1025), like a continuous paragraph.Wen a new Item record comes it has to begin in a new line.Please give me suggestions on how to do it.

I tried gving new line in Item1.endSeparator, but it was giving new line after each Item1 record, which should not happen.

But, when I dont give new line(nl) in Item1.endSeparator, new Item records are coming in the same line as previous Item1 record, which also should not happen.

Since it is a nested structure, is there any different parameters in FCC?

Thanks so much in advance.

Regards,

Anjana.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 21, 2011 at 07:41 AM

    Hello,

    Maybe this blog will help you understand how to achieve your requirement:

    /people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

    Hope this helps,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Mark.

      I checked the blog, it says about comma(,) separated file.I have a fixed length file.

      To be specific on the issue, I would like to give a condition (if possible) to give new line in Item1 only when it is the 14th occurance of it.

      Is there any way to do it?

      Thanks,

      Anjana.

  • Jun 21, 2011 at 07:49 AM

    Hi,

    Create one Item segment only under which you would have the fields for Item and Item1. use thid structure in your receiver fcc.

    You would need to alter your mapping accordingly for the new receiver structure.

    Regards

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Shiladitya.

      Item comes only once for every record whereas Item1 comes 14 times.So like you said I had tried creating a structure like this.

      Record

      Item

      IF1

      IF2

      Item1

      IXF1

      IXF2

      and in FCC I gave new line only for Record, and not for Item and Item1.But that did not give new line for a new Record.

      Did you mean the same?

      Thanks,

      Anjana.