1

I am able to get folders of a particular universe by using REST API of SAP BO Universe semantic layer.

Now I need to get the main tables from underneath data source of the universe. I've found out that COM SDK of SAP should be used for this, however they say it is deprecated now.

Is there any possibility to fetch the above stuff from SAP BO to my Java application?

Thanks in Advance.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

1 Answers1

0

Did you try SAP BI Semantic Layer Java SDK API? It contains getTables() method which seems to do exactly what you need:

Returns the value of the 'Tables' containment reference list. The list contents are of type Table. It is bidirectional and its opposite is 'Data Foundation'. This represents the list of the table names of the data foundation.

Returns: the value of the 'Tables' containment reference list.

If you have Webi, you can get data provider info by the means of RESTful Webi API. Data provider is universe in your case.

  1. First of all you should get dataproviders and their IDs
  2. Then you get query plan of your universe by this API

    GET /documents/<documentID>/dataproviders/<dataProviderID>/queryplan
    

and receive all the SQL statements along with table names and columns that were used in this universe

<queryplan custom="false" editable="true">
    <union>
        <fullOuterJoin>
            <statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'),
                count(distinct SALES.inv_id) FROM SALES GROUP BY 'FY' ||
                to_char(SALES.invoice_date,'yy')</statement>
            <statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'),
                sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE,
                SERVICE WHERE (SALES.INV_ID=INVOICE_LINE.INV_ID) AND 
                (INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID) AND 
                (SERVICE.SL_ID=SERVICE_LINE.SL_ID) AND
                (SERVICE_LINE.service_line ='Accommodation') 
                GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
        </fullOuterJoin>
        <fullOuterJoin>
            <statement index="3">...</statement>
            <statement index="4">...</statement>
        </fullOuterJoin>
        <intersect>
            <fullOuterJoin>
                <statement index="5">...</statement>
                <statement index="6">...</statement>
            </fullOuterJoin>
            <fullOuterJoin>
                <statement index="7">...</statement>
                <statement index="8">...</statement>
            </fullOuterJoin>
            <minus>
                <fullOuterJoin>
                    <statement index="9">...</statement>
                    <statement index="10">...</statement>
                </fullOuterJoin>
                <fullOuterJoin>
                    <statement index="11">...</statement>
                    <statement index="12">...</statement>
                </fullOuterJoin>
            </minus>
        </intersect>
    </union>
</queryplan>

Here is also a Developer guide for RESTful API. For example, this can be done with PowerShell.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90