This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Extend SAP Schema with additional SAP table and filter only the current records

Hi all

I have extended the schema with an additional table. Because the table contains multiple records for the same personnel number. 

I would like to filter the records. I could not find a way to do this in the XML. So I tried using Scope|Object Filters to display only the current record for the number. The object filter I tried was PERNR='01000031' and ENDDA='9999.12.31'

When checking this in the Object Browser I can still see both records:

Why? Anybody can answer this or how would you correctly filter a SAP table ?

  • I have found a way of doing this in the SAP schema extension XML file rather then using the Scope Object Filter within Synch Editor. I have copied the XML file below. Maybe someone else finds this useful. The section which allows me to only read current records and not all records which are in the past or have not started yet (planned futire action in SAP) is highlighted in yellow:

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

    <SAP>
     <Functions>
     </Functions>
     
     <Tables>
     
      <!-- Start Example 1 - Extend schema with SAP default table PA0315 -->
      <!-- Step 1: define how to retrieve the object list and details -->
      <TABLE Definition = "CCC_HR_PA0315_ActivityNumber" TableName="PA0315" Key="PERNR,BEGDA,ENDDA,LSTAR" X500="CN,OU,OU,OU"
      SQL="MANDT = sy-mandt AND BEGDA &lt;= sy-datum AND ENDDA >= sy-datum" Load=""
      />
      
      <!-- Start Example 2 - Extend schema with SAP default table T5D4Q -->
      <!-- Step 1: define how to retrieve the object list and details -->
      <TABLE Definition = "CCC_HR_T5D4Q_Personengruppenschlüssel" TableName="T5D4Q" Key="PERSGR,SPRSL" X500="CN,OU"
      />
     </Tables>
     
     <SAPExtendedSchematypes>
      <!-- Example 1 - Step 2: Extended schema type definition -->
      <SAPExtendedSchematype Bem = "HR, PA0315" Name = "CCC_HR_PA0315_ActivityNumber" DisplayPattern="%PERNR%" ListObjectsDefinition=
      "CCC_HR_PA0315_ActivityNumber" ReadObjectDefinition="CCC_HR_PA0315_ActivityNumber" InsertObjectDefinition = ""
      WriteObjectDefinition = "" DeleteObjectDefinition = ""
      />
      <!-- Example 2 - Step 2: Extended schema type definition -->
      <SAPExtendedSchematype Bem = "HR, T5D4Q" Name = "CCC_HR_T5D4Q_Personengruppenschlüssel" DisplayPattern="%PERSGR% - %SPRSL%" ListObjectsDefinition=
      "CCC_HR_T5D4Q_Personengruppenschlüssel" ReadObjectDefinition="CCC_HR_T5D4Q_Personengruppenschlüssel" InsertObjectDefinition = ""
      WriteObjectDefinition = "" DeleteObjectDefinition = ""
      /> 
     </SAPExtendedSchematypes>
    </SAP>