on 04-26-2011 1:28 PM
Hi,
I am working in a Idoc to File(FCC) scenario. I have a requirement where the target file should be generated in such a way that my target csv file should be generated like
header1-item1
header1-item2
header1-item3
header2-item1
header2-item2
header3-item3 and so on...
how can this requirement be achieved?? should it be done in mapping or FCC??
Regards,
Deepika
Hello Deepika,
I think you have to use both mapping and FCC to achieve this.
First of all, you should have a structure to comply your requirement. For Example: if your header is having 2 fields and your item is having 3 fields then you can use following sample structure as target structure:
<Data> Occurence 0..Unbounded
<HeaderField1>xyz</HeaderField1> Occurence 0..1(as u want)
<HeaderField2>xyz</HeaderField2> Occurence 0..1(as u want)
<ItemField1>abc</ItemField1> Occurence 0..1(as u want)
<ItemField2>abc</ItemField2> Occurence 0..1(as u want)
<ItemField3>abc</ItemField3> Occurence 0..1(as u want)
</Data>
In mapping, you can map the Data node with the Item node in source message. So there will be as many Data node as of your Item node in ur source message. U can map the item fields under item node to ItemFields in Data node.
For HeaderFields in Data node, you have to validate that which Header field belongs to which Item Field. Based on this validation pass the values to HeaderFields in target.
In receiver file adapter, you can use FCC to create the a CSV line for each occurence of Data node.
Regards,
Sami.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My source Idoc is desadv.delvry03 and target structure is like this
<MT_DI>
<Record>
<Header>
field1
field2
<Item>
<Field1>
the header and item are in the same level. should I be changing the target structure? if so, kindly tell me how should it be and how I can achive my requirment
Regards,
Deepika
Hi,
U can do modification in ur target structure.
Root - 0-Unbounded
Detail - 0-1
U can concate header field with each item and then map it to target detail node which will be treated as single record which will have both header as well as item detail
in this case ur FCC will become simple of single field.
chirag
It should be handled in mapping.
What is the Idoc type you are using? Do you receive multiple header segments in same Idoc? Then there should be field at item level to identify the corresponsing header segment.
If this is not the case, then you can copy header (copy value) for each item record and use the append mode in target file adapter to create the file as you mentioned (Assumption here is each Idoc contains 1 header and multiple lien items).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I tried a similar approch. I changed my target structure and put item node inside the header node segment. Now my requirment is satisfied. but I am getting the field values of item and header in the same level. how do I put header values and item field values in 2 different lines
Regards,
Deepika
chk this:
/people/shabarish.vijayakumar/blog/2010/01/14/file-conversion-using-nodeception
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.