on 05-14-2009 6:53 AM
Hi All ,
Input file:
GRP|HD|7001|7001A00443|012|
GRP-LN|DTL|1|ZTAS|3|002|209782010|0001|EN
GRP-LN|TXT|Customer: KR Test, Case 3
GRP-LN|TXT|Power : -2.25
GRP-LN|DTL|2|ZTAS|4|002|209782035|0001|EN
GRP-LN|TXT|Customer: CL Test, Case 4
GRP-LN|TXT|Sphere Power : -2.25
T 7
I have 4 segments (Header,Detail,Text,Trailer) with "|" as the field separator and HD,DTL,TXT,T are the Keyfields
I need to get the xml structure like below heirarchy. Text segment has to come under Detail structure. Header,Detail and Trailer has to be in the same position.
Recordset
--Header
--Detail
-
Text
--Trailer
After completion of content conversion, I am getting the XML structure in the below format. All the segments are coming in the same hierarchy.
Recordset
-Header
-Detail
-Text
-Trailer
Text segment has to come under Detail segment. I used the below parameters for FCC.
Recordset Structure: Header,1,Detail,,Text,,Trailer,1
Recordset Sequence: Variable
Header.fieldSeparator
Header.keyFieldValue
Header.fieldNames
Detail.fieldSeparator
Detail.keyFieldValue
Detail.fieldNames
Text.fieldSeparator
Text.keyFieldValue
Text.fieldNames
Trailer.fieldSeparator
Trailer.keyFieldValue
Trailer.fieldNames
Kindly suggest me wat went wrong and how to solve it by content conversion.?
Thanks
Deepthi
What you are getting is how FCC works in XI. So your configuration is correct. FCC will always provide you a flat XML. It cannot create any kind of hierarchy. So in any development when you need to get a hierarchy you will ahve to read it flat via FCC and then use a java mapping to help create the heirarchy.
Else another option would be to write an adapter module (a complex solution) or use conversion agent (costly affair)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi Shabharish,
>
> >> then use a java mapping to help create the heirarchy.
>
> Then I need to use 2 mappings?
> one for converting the flatxml into nested structure and
> Second for doing Message mapping to target XML.
yes you are right.
Use a java mapping to create the hierarchy and then use a graphical mapping to map the XML to target.
Else another option is to do everything in one single mapping. The choice is yours
Hi Deepthi,
But as per your input there is no common field between detail and text.If you are going two mapping also how you segregate for each detail with text without common field.So you may go with java or xslt mapping is good choice.That time there is no need to create a two mapping.
Regards,
Prakasu.M
Edited by: prakasu on May 14, 2009 12:41 PM
hi Deepthi,
FCC wont supprt u r file structure, but take the file as it is coming now... and try do the modifications in the Map, as how u require the output.. hope this will work
Thank You,
Madhav
Note: Points If Useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thank you for your replies.
I thought of doing it in mapping . My map is like
DTL -
> E1EDP01
TXT----
> -
EIEDPT2
According to my scenario when ever DTL comes then E1EDP01 has to come and EIEDPT2 has to repeat untill next DTL comes.
Ex: 1DTL and 4TXT segments .So the output will be..
DTL -
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
DTL -
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
Right now I couldn't able to generate the above target XML. Everytime I am getting all the TXT segments under one DTL segment like below.
DTL -
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
TXT -
> -
EIEDPT2
Any suggestions how we can get rid of in mapping?
Thanks
Deepthi
Hi,
FCC will not support your requirement.you may go with module to convert your requirement.
Regards,
Prakasu.M
Edited by: prakasu on May 14, 2009 11:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.