Skip to Content
avatar image
Former Member

What is the best way to get a list of company database sysids?

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 07 at 02:59 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 08 at 05:22 AM

    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
    10|10000 characters needed characters exceeded