Skip to main content

Connect to SAP SuccessFactors using TimeXtender OData data source


fwagner
Employee
Forum|alt.badge.img+4

SAP SuccessFactors uses an OData interface to extract data.

Adding the TimeXtender OData data source

  1. Create a new TimeXtender OData data source connection
  2. Add the Base URL. For more information please see SAP’s OData documentation. Some examples of what the Base URL should look like are provided below:
    https://api10preview.sapsf.com/odata/v2/
    https://api10preview.sapsf.com/odatav4/ 
  3. Choose an authentication method and enter the credentials. It is possible to use Basic authentication with the user formatted as <username>@<SF_tenant/company_code> as documented in SAP Basic authentication documentation. Alternatively, select OAuth2 as the authentication method, and enter the Client ID and Client Secret as documented in SAP’s OAuth2 documentation.
  4. On each endpoint add Table flattening
  5. Paste the below XSLT into the transformation section
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0"
                    xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
                    xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
                    xmlns:tx_tns_1="http://www.w3.org/2005/Atom"
                    xmlns="http://www.w3.org/2005/Atom"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
      <xsl:output method="xml" indent="yes" />
    
      <xsl:template match="/">
        <tx_root>
          <xsl:element name="{//tx_tns_1:title}">
            <xsl:apply-templates select="/tx_tns_1:feed/tx_tns_1:entry/tx_tns_1:content/m:properties" mode="rows"/>
          </xsl:element>
        </tx_root>
      </xsl:template>
      <xsl:template match="/tx_tns_1:feed/tx_tns_1:entry/tx_tns_1:content/m:properties" mode="rows">
        <xsl:element name="{//tx_tns_1:title}">
          <xsl:for-each select="../../*[not(self::tx_tns_1:content or self::tx_tns_1:link)]">
            <xsl:element name="entry_{name()}">
              <!-- <xsl:copy-of select="@*"/> -->
              <xsl:value-of select="."/>
            </xsl:element>
          </xsl:for-each>
    
          <!-- copy all elements -->
          <xsl:for-each select="*">
            <xsl:element name="{local-name()}">
              <!-- <xsl:copy-of select="@*"/> -->
              <xsl:value-of select="."/>
            </xsl:element>
    
          </xsl:for-each>
    
          <!-- <xsl:for-each select="../../tx_tns_1:link">
               <xsl:element name="{local-name()}">
               <xsl:copy-of select="@*"/>
               <xsl:value-of select="."/>
               </xsl:element>
               </xsl:for-each> -->
           </xsl:element>
      </xsl:template>
    </xsl:stylesheet>
  6. Give the flattened table the same name that the non-transformed endpoint has
  7. Enable the setting Show flattened tables only
Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings