on 05-17-2009 5:04 PM
Hi,
I need to convert a flat file to xml at sender side using FCC.
Input text file:
Sunil,Chandra,Mumbai,400709
Sachin,Tendulkar,Delhi,110066
XML Structure Occurrence
>Employees 1..1
> > Employee 0..N
> > > Fname 1..1
> > > Lname 1..1
>> > Address 1..1
> > > >City 1..1
>> > > Zip 1..1
xml should be like this:
><Employees>
>><Employee>
>>><Fname>Sunil</Fname>
>>><Lname>Chandra<Lname>
>>><Address>
>>>><City>Mumbai</City>
>>>><Pin>400709</Pin>
>>></Address>
>></Employee>
>><Employee>
>>><Fname>Sachin</Fname>
>>><Lname>Tendulkar<Lname>
>>><Address>
>>>><City>Delhi</City>
>>>><Pin>110066</Pin>
>>></Address>
>></Employee>
></Employees>
Such a nested structure cannot be created using FCC directly. You will have to either change the strcture or look for a workaround as mentioned here
/people/riyaz.sayyad/blog/2008/05/20/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Prateek
The blog is really helpful...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FCC does not support this level nesting...Ref
http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
But requirement can be achieved using extra mapping
you can create a source structure that looks like
MT_Source_New..
-
>Record ...unbounded
-
>line ....1
and read the input file line by line...this can be achieved by simple FCC...Refer above link
here you need extra mapping to map it to your required source structure Employees
MT_new ---Mapping1 --- Employees
Then map Employees to Actual target structure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.