cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with SCPI - CSV to XML converter

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

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

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor

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

Former Member
0 Kudos

Hi Sriprasad,

Thank you for your prompt reply. My error has changed to "null object loaded from local variable 'asList' " so I am guessing it has passed the converter step.

I really appreciate quick turn around.

Cheers,

Pratibha

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Pratibha,

Good to know.You can check your MPL to know about in which step error occurred .Please close the thread if error related to Converter is resolved.

Regards,

Sriprasad Shivaram Bhat

Former Member
0 Kudos

Thank You Sriprasad.

I am closing the thread now.

Cheers,

Pratibha

Former Member
0 Kudos

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