Synchronization Editor: SAP-Sync-Project - Creating virtual Script Property for the target System side

I want to create a virtual Script Property for the right side of a SAP-Mapping:

Left side: SAPUSerinSAPRole

Right side: UserInRole

Is there any documentation what objects i can use and how to query data objects on target system side?

I cannot make queries like

"Session.Source.TrygetSingleValue(...)", because this does not seem to exist for the target system side.

But what is it that i can use?

Thanks for help!

Regards,

Alexander

  • I tried [1] in the read script - Tab of my virtual attribute. 

    If i inspect a userinrole - record in target system browser, i get the error message in [2].

    Does that mean that it is impossible to query objects and joined objects in SAP-Target-System?

    [1]

    Imports VI.Projector.Connection

    Dim whereClause As String = String.Format("USERNAME = '{0}'", $UNAME$)

    Dim UserObj As ISystemObject = SystemObject.Connection.QueryObject(SystemQuery.From("USER").SelectAll().Filter(whereClause)).Result.FirstOrDefault

     If Not UserObj Is Nothing Then

                Dim bapilogond_class As String = UserObj.GetValue("BAPILOGOND~CLASS").AsString

                Return String.Format("{0}", bapilogond_class)       

    End If

    [2]

    [1777160] Property (vrt_xyz@UserInRole) could not read the value from system object (K211987 - XE_SHK-IP_ANALYST_BAUSP).

    [1777208] Error running (vrt_xyz@UserInRole)'s 'Get' script for (K211987 - XE_SHK-IP_ANALYST_BAUSP).

    Exception has been thrown by the target of an invocation.

    [1777009] Error loading system objects of class USER (all) (USER_Master).

    [1777351] The target system and/or the connector does not support system filters. The following filters were passed but cannot be applied.

     

    USERNAME = 'K211987'

  • You cannot use the QueryObject as there is no system filter support. Correct.