3 Replies Latest reply: Apr 23, 2012 8:30 PM by Baskar Gopalakrishnan RSS

File content conversion with complex structure.

Amit Shinde
Currently Being Moderated

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.

  • Re: File content conversion with complex structure.
    Grzegorz Glowacki
    Currently Being Moderated

    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

  • Re: File content conversion with complex structure.
    Sai D
    Currently Being Moderated

    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

  • Re: File content conversion with complex structure.
    Baskar Gopalakrishnan
    Currently Being Moderated

    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-repeatinggroup-part-1.

Actions