cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion at sender side

sunilchandra007
Active Contributor
0 Kudos

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>

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

sunilchandra007
Active Contributor
0 Kudos

Thanks Prateek

The blog is really helpful...

Former Member
0 Kudos

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