avatar image
Former Member

Issue with SCPI - CSV to XML converter

Hi Experts,

My scenario is SFTP->Odata APIs (in SuccessFactors) via SCPI. I have a csv file with header so using "CSV to XML converter" to get required XSD structure and map it to Odata structure.

My CSV input is as below :

EmpID,first name, last name, date of birth, marital status

V001,Jane,Auston,22/01/1976,M

V002,Amy,Toogood,01/11/1960,M

Desired Output :

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

<Personal_MT>

<Personal>

<EmpID>V001</EmpID>

<first name>Jane</firstname>

<last name>Auston</last name>

<date of birth>22/01/1976</date of birth>

<marital status>M</marital status>

</Personal>

<Personal>

<EmpID>V002</EmpID>

<first name>Amy</firstname>

<last name>Toogood</last name>

<date of birth>01/11/1960</date of birth>

<marital status>M</marital status>

</Personal>

</Personal_MT>

I have been following blog https://archive.sap.com/discussions/thread/3958677

but I am still getting error "

java.lang.IllegalStateException: Element name [] not found in provided XML schema file"

I have script in my iflow and have tried all the combinations of Xpath in the scenario. Can you please help me here?

Cheers,

Pratibha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 28, 2017 at 05:18 AM

    Hello Prathiba.

    I have tried the above scenario its working without any issues.

    Input Data:

    Field1,Field2.Field3,Field4,Field5
    V001,Jane,Auston,22/01/1976,M
    V002,Amy,Toogood,01/11/1960,M
    

    Integration Process Configuration:

    Schema Used:

    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="Personal_MT">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Personal" maxOccurs="unbounded" minOccurs="0">
              <xs:complexType>
                <xs:sequence>
                  <xs:element type="xs:string" name="EmpID"/>
                  <xs:element type="xs:string" name="firstname"/>
                  <xs:element type="xs:string" name="lastname"/>
                  <xs:element type="xs:string" name="dateofbirth"/>
                  <xs:element type="xs:string" name="maritalstatus"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    

    Output Data:

    Hope it helps you.

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sriprasad,

      Thank you very much for looking into this for me. Error that I was seeing was from Odata services and after maintaining proper sequence of upsert I managed to successfully create employee in SuccessFactors but your response was a gerat help.

      I am closing the thread now.

      Thanks again !

      Cheers,

      Pratibha

  • Jun 27, 2017 at 09:05 AM

    Hello Pratibha,

    It is not required have script to remove the header.

    Use below configuration it should work for your requirement.

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sriprasad Shivaram Bhat

      Hi Sriprasad,

      I had to reopen the link as in MPL, it shows "converter" step is not successful yet. I am attaching log for your reference and screen shot of my step as well.

      Could you please let me know what could be the problem?

      Cheers,

      Pratibha

      log.txt

      log.txt (3.1 kB)
      capture.jpg (52.1 kB)
Skip to Content