on 03-07-2018 7:50 AM
I am new to SAP and am using the B1IF. I would like to create a scenario step that returns a list of Company Names and their DB sysids. That way I can create another scenario step that allows me to update the same table in any of our companies by accepting a sysid as a parameter. What is the best way to do this?
I read about an SRGC table in the SBO-COMMON database that returns a list of companies and respective database names, but no SysIds.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.