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

Extending SAP Connector to read data from HRP1000 and HRP1001

Hi all

I'm currently trying to extend the schema of the SAP connector using a customer specific XML-file in order to retriebe data from HRP1000 (business partners and positions) and HRP1001 (assignments to objects from HRP1000).

This is what my xml looks like:

<?xml version="1.0" encoding="utf-8" ?>
<SAP>
            <Tables>
                        <TABLE Definition = "HRP1000" TableName="HRP1000" Key="OBJID,OTYPE,MANDT" X500="CN,OU,OU" SQL="MANDT EQ sy-mandt and LANGU EQ 'D'" LOAD="">
                        </TABLE>
                        <TABLE Definition = "HRP1001" TableName="HRP1001" Key="OBJID,SOBJID,MANDT" X500="CN,OU,OU" SQL="MANDT EQ sy-mandt and SCLAS EQ 'US'" LOAD="">
                        </TABLE>
            </Tables>
            <SAPExtendedSchematypes>
                        <SAPExtendedSchematype Bem = "HRP1000" Name = "HRP1000" DisplayPattern = "%OBJID%" ListObjectsDefinition = "HRP1000" ReadObjectDefinition = "HRP1000" InsertObjectDefinition = "" WriteObjectDefinition = "" DeleteObjectDefinition = "" ParentType = "SAPMANDANT" />
                        <SAPExtendedSchematype Bem = "HRP1001" Name = "HRP1001" DisplayPattern = "%OBJID% %SOBJID%" ListObjectsDefinition = "HRP1001" ReadObjectDefinition = "HRP1001" InsertObjectDefinition = "" WriteObjectDefinition = "" DeleteObjectDefinition = "" ParentType = "SAPMANDANT" />
            </SAPExtendedSchematypes>
</SAP>

I'm trying to narrow it down to only valid entries (BEGDA less than current date and ENDDA greater than current date) and tried to integrate that into the SQL-part of the table definition by extending it to:

SQL="MANDT EQ sy-mandt and LANGU EQ 'D' and BEGDA LT $DATE$ and ENDDA GR $DATE$" as well as SQL="MANDT EQ sy-mandt and LANGU EQ 'D' and BEGDA LT sy-datum and ENDDA GR sy-datum"

In both cases the same effect happend: instead of getting a list of a couple of hundreds of entries the list remained empty after integrating my XML with the system connection to the SAP mandant.

What am i missing here?

Thanks for any hints
Carsten

  • I think YOu need to change it to:

    begda le sy-datum. and endda ge sy-datum

    LE and GE should work ;-)
  • Hi mekindad

    I've been trying your syntax and extended my table Definition:
    <TABLE Definition = "HRP1000" TableName="HRP1000" Key="OBJID,OTYPE,MANDT" X500="CN,OU,OU" SQL="MANDT EQ sy-mandt and LANGU EQ 'D' and BEGDA le sy-datum and ENDDA ge sy-datum" LOAD="">
    </TABLE>

    Using this Syntax i'm getting the following error while browsing the HRP1000 table using the target System browser of the synchronization Editor:

    [1777009] Error loading system objects of class HRP1000 (all) (HRP1000_Master).
    at VI.Projector.UI.Controls.ObjectBrowserControl._TreeListTypesNodeActivateHandler(Object sender, TreeListEventArgs e)
    at VI.Projector.UI.Controls.ObjectBrowserControl._LoadResult(ISchemaClass schemaClass)
    at VI.Projector.Connection.SystemConnection.QueryObjectInternal(ISchemaClass schemaClass, QueryByFilterOptions query, Boolean withScope)
    Beim Parsen einer dynamischen Angabe trat ein Fehler auf.
    at VI.Projector.Connection.SystemConnection.QueryObjectInternal(ISchemaClass schemaClass, QueryByFilterOptions query, Boolean withScope)
    at VI.Projector.Connection.Connectors.ThreadSafeConnector.OnQueryObject(QueryObjectsRequest request)
    at VI.Projector.Connection.SystemConnector.QueryObject(QueryObjectsRequest request)
    at VI.Projector.SAP.ProjectorSAPConnector.OnQueryObjectsByFilter(QueryObjectsByFilterRequest request)
    at VI.Projector.ProjectorBaseConnector.HandleException(ObjectRequest request, Exception Ex)

    Seems like this is not the key to the kingdom... :-(
  • Hi Zeresenay

    Long time no read :-)
    Your link did help me out. The table Definition now Looks like this:
    <TABLE Definition = "HRP1000" TableName="HRP1000" Key="OBJID,OTYPE,MANDT" X500="CN,OU,OU" SQL="MANDT EQ sy-mandt and LANGU EQ 'D' and BEGDA &lt;= sy-datum AND ENDDA >= sy-datum" LOAD="">
    </TABLE>

    And it works like a charm. :-)

    Greatly appreciated
    Carsten