Hi Matthijs,
welcome to B1i - the following gives you the required list
<B1List>
<xsl:for-each select="document('/com.sap.b1i.system.sld.directory/RoutingTree.xml/RoutingTree')/sim:RoutingTree/sim:ParticipantNode/sim:ParticipantNode"> <xsl:variable name="sysid" select="./@SysId"/> <xsl:variable name="sdoc" select="document(concat('/com.sap.b1i.system.sld.directory/SysId.xml/',$sysid,'(Id)'))"/> <xsl:if test="starts-with($sdoc/sim:SysId/@SysTypeId,'B1')"> <b1system sysid="{$sysid}" company="{$sdoc/sim:SysId/sim:ConnectivityList/sim:Connectivity[./@ConnectivityTypeId='B1DI']/sim:Parameter[./@Key='company']/@Value}"/> </xsl:if> </xsl:for-each>
</B1List>
best - Heinz
Thanks Heinz! That works great.
Yesterday I also found a way to do it with a sqlCall atom using SBO-COMMON tables I saw referenced in other articles/questions. This is the SQL I came up with:
#SELECT SRGC."cmpName" AS "CmpName", SRGC."dbName" AS "DbName", SLSPP."ParamValue" AS "SysId" FROM SRGC INNER JOIN SLSP ON SRGC."dbName" = SLSP."CompIdent" INNER JOIN SLSPP ON SLSP."CompID" = SLSPP."CompID" WHERE SLSPP."ParamKey" = 'identifier'
The XSLT approach probably performs better than a select with 2 joins though.
Add comment