cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion with complex structure.

Former Member
0 Kudos

Hi friends,

  I'm trying to convert csv file to xml file following is my source XML structure. Pls help me with its content conversion part.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_Emp_FCC7_Src xmlns:ns0="">

   <Employee> (1...1)

      <Basic> (1..1)

         <key>B</Key> (1..1)

         <Name></Name> (1..1)

         <Mobile></Mobile> (1..1)

         <Address></Address> (1..1)

         <City></City> (1..1)

      </Basic>

      <Qualification>  (1..1)

         <Key>Q</Key>     (1..1)

         <Education>     (1..u)

            <Key>D</Key>     (1..1)

            <Degree></Degree>     (1..1)

            <Result></Result>     (1..1)

         </Education>

         <Experience>     (1..u)

            <Key>X</Key>     (1..1)

            <Company></Company>     (1..1)

            <Years></Years>     (1..1)

         </Experience>

      </Qualification>

   </Employee>

</ns0:MT_Emp_FCC7_Src>

i want to know its recordset structure, recordset and values of fieldnames...

Pls. help ASAP.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

It is not possible to generate such a complex structure with FCC. It cannot generate the structure with substructures. Instead, you can modify the structure a little bit, for instance to the following:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_Emp_FCC7_Src xmlns:ns0="">

   <Employee> (1...1)

      <Basic> (1..1)

         <key>B</Key> (1..1)

         <Name></Name> (1..1)

         <Mobile></Mobile> (1..1)

         <Address></Address> (1..1)

         <City></City> (1..1)

      </Basic>

      <Education>     (1..u)

         <Key1>Q</Key1>     (1..1)

         <Key2>D</Key2>     (1..1)

         <Degree></Degree>     (1..1)

         <Result></Result>     (1..1)

      </Education>

      <Experience>     (1..u)

         <Key1>Q</Key1>     (1..1)

         <Key2>X</Key2>     (1..1)

         <Company></Company>     (1..1)

         <Years></Years>     (1..1)

      </Experience>

   </Employee>

</ns0:MT_Emp_FCC7_Src>

Later, you just map the nodes accordingly.

Hope this helps,

Greg

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Since you use hierarchy structure, you might not able to handle directly using fcc parameter. Other possible approach is to use conversion agent tool or java mapping.

You might want to glance this link http://scn.sap.com/people/shabarish.vijayakumar/blog/2007/03/21/conversion-agent--silence-of-the-rep....

santosh_k3
Active Participant
0 Kudos

Hi Amit,

As said by  Grz FCC cannot be maintained for  nested complex structure

you need to modify your source structure according to the requirement.

you can only have at max three structure as

1) <documentName>...

2) <recordset>

3) <NameA>

     <field-nameA1>field-value</field-nameA1>

     <field-nameA2>field-value</field-nameA2>

     <field-nameA3>field-value</field-nameA3>

     </NameA>

3) <NameB>

     <field-nameB1>column-value</field-nameB1>

     <field-nameB2>column-value</field-nameB2>

     <field-nameB3>column-value</field-nameB3>

     </NameB>

</recordset>   ...

</documentName>

Thanks

Sai