Upload
sundharv
View
232
Download
0
Embed Size (px)
Citation preview
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
1/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
Getting Started Newsletters Store
Products Services & Support About SCN Downloads
Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Log On Join UsHi, Guest Search the Community
Activity Communications Actions
Browse
0 Tweet
created by Manikandan Elumalai on Jun 17, 2013 10:49 AM, last modified by Manikandan Elumalai on Aug 29, 2015 5:32 AM
Introducĕon
Query Builder is one of the essenĕal and interesĕng tools in BusinessObjects. Using Query builder
one can easily query the BusinessObjects repository and get the required informaĕon which
cannot be found even in CMC.
To explain more in detail, BusinessObjects repository made up of set of tables to hold the
informaĕon about the BI content such as Universes, reports, Users, schedules, etc. These tables
are encrypted in such a way that the informaĕon stored in these tables cannot be readable using
convenĕonal SQL query tools. This is the place where Query Builder comes in to picture where in
which this is the one and only door step through which we can query the metadata stored in the
repository.
Querying repository
The repository informaĕon is stored in the form of InfoObject and the CMS reads the
InfoObjects from the virtual tables. Below are the BusinessObjects metadata virtual tables and
their associated objects.
Virtual table Table description Table Objects
CI_SYSTEMOBJECTS Contains InfoObjects that the BI
Platform uses
User, User Group, Server, Server Group,Folder,
Connection, Calendar,Event
CI _APPOBJECTS Holds InfoObjects that are used by
documents
Universe
CI_INFOOBJECTS Contains InfoObjects that are
consumed by the end user
WebI, Crystal Report, FullClient, PowerPoint, Pdf,
Excel, Word, Rtf, Txt,Program, Shortcut
Accessing Query Builder
Query Builder can be found at the below URL hĥp://MyServer:Port/AdminTools
BusinessObjects Query builder - Basics
Share 5 2Like
Version 5
http://scn.sap.com/servlet/JiveServlet/showImage/102-42952-5-232171/11.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-42952-5-232171/11.jpghttp://myserverport/https://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-42952&ref_src=twsrc%5Etfw&text=BusinessObjects%20Query%20builder%20-%20Basics&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-42952&via=SAPCommNethttp://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/community/uachttp://scn.sap.com/contenthttp://scn.sap.com/community/developer-centerhttp://scn.sap.com/activityhttp://scn.sap.com/communicationshttp://scn.sap.com/actionshttp://scn.sap.com/activityhttp://scn.sap.com/communicationshttp://scn.sap.com/welcomehttp://scn.sap.com/servlet/JiveServlet/showImage/102-42952-5-232171/11.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/102-42952-5-232171/11.jpghttp://myserverport/http://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/manikandan.elumalai2https://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-42952&ref_src=twsrc%5Etfw&text=BusinessObjects%20Query%20builder%20-%20Basics&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-42952&via=SAPCommNethttp://scn.sap.com/contenthttp://scn.sap.com/actionshttp://scn.sap.com/communicationshttp://scn.sap.com/activityhttp://scn.sap.com/login.jspahttp://scn.sap.com/docs/login.jspahttp://scn.sap.com/community/uachttp://scn.sap.com/community/developer-centerhttp://scn.sap.com/community/downloadshttp://scn.sap.com/welcomehttps://www.sapstore.com/?url_id=banner-US-2015-SCN-HeadLinkhttp://scn.sap.com/community/newslettershttp://scn.sap.com/community/getting-started
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
2/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
Average User Rating
(17 ratings)
0 Tweet
Make sure you are using a user credenĕals that is part of Administrator user group in order to gain
access to all the repository objects. Please note using Query Builder we can only query the
informaĕon stored in the CMS database not from the File repository files.
Simple queries to use against the repository
To list all the Users
SELECT * FROM CI_SYSTEMOBJECTS WHERE SI_KIND='USER'
To list all the Universes
SELECT * FROM CI_APPOBJECTS WHERE SI_KIND='UNIVERSE'
To list all the WebI reports
SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND='WEBI'
Query Builder Blog series
Basics
BusinessObjects Query builder ‐ Basics
BusinessObjects Query builder – Best pracĕces & Usability
Sample Queries
BusinessObjects Query builder queries
BusinessObjects Query builder queries ‐ Part II
BusinessObjects Query builder queries ‐ Part III
BusinessObjects Query builder queries ‐ Part IV
BusinessObjects Query builder – Exploring Visualizaĕon Objects
BusinessObjects Query builder – Exploring Monitoring Objects
BusinessObjects Query builder ‐ Exploring Lumira & Design studio Objects
Use cases
BusinessObjects Environment assessment using Query builder
BusinessObjects Environment Cleanup using Query builder
BusinessObjects Query builder – What's New in BI 4.0
110563 Views Tags: bo_querybuilder
Share 5 2Like
1 2 3 … 5
114 Comments
http://scn.sap.com/community/bi-platform/tags#/?tags=bo_querybuilderhttp://scn.sap.com/community/bi-platform/blog/2013/07/26/businessobjects-query-builder-whats-new-in-bi-40http://scn.sap.com/docs/DOC-43081http://scn.sap.com/docs/DOC-42953http://scn.sap.com/community/bi-platform/blog/2015/08/25/businessobjects-query-builder-queries-for-lumira-design-studio-objectshttp://scn.sap.com/community/bi-platform/blog/2013/10/24/monitoringhttp://scn.sap.com/community/bi-platform/blog/2013/07/30/businessobjects-query-builder-exploring-visualization-objectshttp://scn.sap.com/community/bi-platform/blog/2013/06/10/businessobjects-query-builder-queries--part-ivhttp://scn.sap.com/community/bi-platform/blog/2013/04/17/businessobjects-query-builder-queries--part-iiihttp://scn.sap.com/community/bi-platform/blog/2013/02/14/businessobjects-query-builder-queries--part-iihttp://scn.sap.com/community/bi-platform/blog/2012/10/11/businessobjects-query-builder-querieshttp://scn.sap.com/community/bi-platform/blog/2013/06/12/businessobjects-query-builder-best-practices-usabilityhttp://scn.sap.com/docs/DOC-42952http://scn.sap.com/servlet/JiveServlet/showImage/102-42952-5-232190/22.jpghttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-42952&ref_src=twsrc%5Etfw&text=BusinessObjects%20Query%20builder%20-%20Basics&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fdocs%2FDOC-42952&via=SAPCommNet
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
3/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
Like (2)
Mike Watson Aug 15, 2013 7:08 PM
Manikandan,
Not sure where best to put this comment.
Thank You!
This blog series has be en very useful, helpi ng us with our upgrad e efforts to BOE BIP 4.0. You
should be very pleased with your contribution to the community knowledge base.
Thanks Again.
Mike
Like (2)
Manikandan Elumalai Aug 16, 2013 4:02 AM (in response to Mike Watson)
Thanks for your comments and kind words Mike. "Share the knowledge to gain the knowledge" - This is how SCN works
Like (0)
pramod k Aug 21, 2013 4:03 PM (in response to Manikandan Elumalai)
Mani,
This post is really helpful .
Can I build a universe on these tables ? I need to capture the user session in dashboard . I need to
capture user credentials , like user ID and user name .
Like (0)
Manikandan Elumalai Aug 21, 2013 4:25 PM (in response to pramod k)
Pramod, You cannot really build universe on top of these tables as they are virtual in nature not physical. You
need to really pull information using SDK and push it to your custom tables. then you build universe
and do whatever you want.
Regards
Mani
Like (0)
Bikash Mohapatr a Oct 8, 2013 3:35 PM
Hi Mani,
Can u please help me how to get the list of users logged in to BO in a period of time (like month wise
info for a particular year)
How many reports run (in a period)?
And w hich user i s accessin g wh ich re port very frequently?
Thanks
Bikash
Like (1)
Manikandan Elumalai Oct 8, 2013 5:13 PM (in response to Bikash Mohapatra)
I would recommend you to have a look at Audit reports rather than COS repository as the information
of your interest would be historical in nature rather than realtime snapshot.
Like (0)
Bikash Mohapatr a Oct 9, 2013 4:14 PM (in response to Manikandan Elumalai)
Hi Mani, Can u please help me, how to get the report refresh time in respect to the user ID from
repository DB? I dont have the audit DB information with me. Using SAP BO 4.0. Please suggest.
Like (0)
Manikandan Elumalai Oct 9, 2013 4:45 PM (in response to Bikash Mohapatra)
As far a s CMS database is b eing concerned the on ly ava ilable entry for the report refresh time is
SI_LAST_RUN_TIME which doesnt gie you the duration instead the time on which report started
refreshing. If your report is the scheduled one you can always get the refresh time from
SI_STARTTIME & SI_ENDTIME column s.
The required report refresh interval is available at individual report (.wid) level for which you need to
write SDK code.
Try this query and review your results for the statement above.
SELECT * FROM CI_INFOOBJECTS WHERE SI_ID=5544 (SI_ID of your report)
http://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/bikash.mohapatrahttp://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/bikash.mohapatrahttp://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/pramod.lumburuhttp://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/mike.watson.ccd
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
4/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
Like (0)
Lesia Milimonka Oct 24, 2013 7:39 PM
This is very helpful. How can I get the names of the folders and sub folders.
Also the number o f reports p er folde r and sub fol der
Thanks
Like (0)
Manikandan Elumalai Oct 25, 2013 6:55 AM (in response to Lesia Milimonka)
I would recommend you to go for SDK code rather than Query builder query as the requirement
above is not feasible using a single query.
Like (0)
Bikash Mohapatr a Oct 29, 2013 11:28 AM
Hi Mani,
Can u plz guide me for the path to download audit universe?
Thanks
Bikash
Like (0)
Manikandan Elumalai Oct 29, 2013 2:01 PM (in response to Bikash Mohapatra)
Have you checked them here
http://scn.sap.com/docs/DOC-6175
http://scn.sap.com/community/bi-platform/blog/2013/01/07/sap-businessobjects-40-auditor-
configuration-deployment-end-to-end
Like (0)
Bikash Mohapatr a Oct 30, 2013 10:56 AM (in response to Manikandan Elumalai)
Thank you Mani for your reply.
I will deploy and let you know about.
Regards
Bikash
Like (0)
zhanyang zheng Dec 25, 2013 9:25 AM (in response to Manikandan Elumalai)
Can you provider SDK Code Download URL ? or provider Sample to me .Thanks
Like (1)
guest g09 Dec 26, 2013 10:45 AM
Thank you very much for this document
Like (1)
Rahul Verma Jan 19, 2014 8:01 PM
Thank you so much Mani for consolid ating all this. Good help for Administrators.
Like (0)
Manohar Pakala Jan 23, 2014 10:31 AM
Hi,
How to list the reports that do not have email notification?
Like (0)
Gerd de Vries Jan 24, 2014 3:52 PM
Hi,
How can i create a list with usergroups and the members(users)?
Regards Gerd
Manikandan Elumalai Jan 25, 2014 7:19 PM (in response to Gerd de Vries)
Have you tried this http://www.forumtopics.com/busobj/viewtopic.php?
t=204084&sid=c6e0cbd894ca5a308665d1b16bb5e378
http://www.forumtopics.com/busobj/viewtopic.php?t=204084&sid=c6e0cbd894ca5a308665d1b16bb5e378http://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/g.devrieshttp://scn.sap.com/people/manohar.pakalahttp://scn.sap.com/people/rahul.verma2407http://scn.sap.com/people/guest.g09http://scn.sap.com/people/zhanyang.zhenghttp://scn.sap.com/people/bikash.mohapatrahttp://scn.sap.com/community/bi-platform/blog/2013/01/07/sap-businessobjects-40-auditor-configuration-deployment-end-to-endhttp://scn.sap.com/docs/DOC-6175http://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/bikash.mohapatrahttp://scn.sap.com/people/manikandan.elumalai2http://scn.sap.com/people/lmilimonka
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
5/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
Like (0)
Like (0)
mahesh bondulabo Feb 19, 2014 9:55 AM
Dear Team,
I am new to sap bo, where exactly we need to test these queries to get the required output?
o list all the Users
SELECT * FROM CI_SYSTEMOBJECTS WHERE SI_KIND='USER'
I mean at webi level or at universe level or at database level?? Plz provide the
navigaĕon It will be much helpful for me.
Regards,Mahesh
Like (0)
Bikash Mohapatr a Feb 25, 2014 3:09 PM (in response to mahesh bondulabo)
Hi,
Plz run the above query using query builder.
URL for query builder http://hostname:port/AdminTools/
Regards
Bikash
Like (0)
Archana Reddy Mar 10, 2014 4:04 PM
Hello,
Could you let me know how to get list of power users from AD Groups using query builder?
Like (0)
Roman Peijan May 13, 2014 6:54 PM
Thank you Manikandan. Great stuff.
Additional to your examples, I would like to know how to retrieve the used database tables of an
universe star schema. Like Table1, Table2 is used within UniverseA. Is this retrievable?
Ty in advance
Roman
Like (0)
Missy Mazzola May 15, 2014 4:20 PM
Hi Mani, et al,
Is there anyway to script a 'call' to the querybuilder tool, pass the query, and then output the results to
a text file?
Thanks,
Missy
Andrew D ale May 16, 2014 11:32 AM (in response to Missy Mazzola)
you can do it with VBA in excel
start a new spreadhseet and choose the developer tab from the ribonif it is not on the ribbon choose file-options-Customise ribbon and then tick Developer
on the VBA menu choose tools-references and tick the following libraries
Visual Basic for Applicatio ns
Microsoft Excel 14.0 Office Library
Microsoft Office 14.0 Office Library
Crystal enterprise ImfoStore Library 14.0
Crystal enterprise Framework Library 14.0
I am on BO 4.0 so am using the 14.0 libraries, choose different ones if you are on a different version
paste the following into the sheet code area
this example sucks out information about universes with some side calls to connections and folder
details
you can customise the strSQL to get whatever you want
Option Explicit
Dim strName, strPassword, strCMS, strAuth As String
http://scn.sap.com/people/andrew_dalehttp://scn.sap.com/people/roseann.mazzolahttp://scn.sap.com/people/roman.peijanhttp://scn.sap.com/people/archies2013http://hostnameport/http://scn.sap.com/people/bikash.mohapatrahttp://scn.sap.com/people/mahesh.bondulabo
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
6/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
Sub UniverseDetails()
Dim SessionMana ger, Sess As SessionMgr
Dim esession As EnterpriseSession
Dim iStore As InfoStore
Dim Universes As InfoObjects
Dim UniverseItem As InfoObject
Dim Rng As Excel.Range
Dim ExitLoop As Boolean
Dim RowNum
Dim strSQL As String
Dim strConns As String
Dim strConnName As String
Dim strConnCUID As String
Dim strConnCUIDAll As String Dim iterativeUNVcoun t As Integer
Dim unvCount As Integer
Dim unvCountStr As String
Dim i As Integer
Dim vSI_DESCRIPTION
Dim vSI_ID
Dim vSI_OWNER
Dim vSI_CUID
Dim vSI_UPDATE_TS
Dim vSI_DATACONNECTION
Dim vSI_REVISIONNUM
Dim vSI_LOCKER_ID
Dim vSI_FOLDER As String
Dim vSI_FOLDER_NAME As String
Dim vSI_NAME
On Error GoTo ErrorHandler
'set your login details
strName = ""
strPassword = ""
strCMS = ""
'choose one of the followin g 3
strAuth = "secEnterprise"
'strAuth = "secWinAD"
'strAuth = "secLDAP"
'Infostore instanciation
Set SessionManag er = CreateObject("CrystalEnterprise.SessionMgr")
Set esession = SessionManager.Logon(strName, strPassword, strCMS, strAuth)
'your query goes here'
strSQL = "Select SI_LOCKER_ ID , SI_ID, SI_UNIVERSE, SI_WEBI, SI_SL_DOCUMENTS,
SI_FILES, SI_DATACONNECTION, SI_SL_UNIVERSE_TO_CONNECTIONS, SI_U PDATE_TS,
SI_REVISIONNUM, SI_SL_VERSION_NUMBER, SI_DESCRIPTION, SI_OWNER, SI_CUID,
SI_DERIVEDUNIVERSE, SI_COREUNIVERSE FROM CI_APPOBJECTS WHERE (SI_KIND =
'Universe' Or SI_KIND = 'DSL.MetaDataFile') "
Set iStore = esession.Service("", "InfoStore")
Set Universes = iStore.Query(strSQL)
'initialise variables
unvCount = Universes.Coun t
unvCountStr = Format(unvCount, 0)
iterativeUNVcoun t = 0
'set up sheet for this BO environment
Set Rng = Sheets(1).Cells
Sheets(1).Activate
Rng.ClearContents
RowNum = 1
Rng(Row Num, 1) = "ID"
Rng(Row Num, 2) = "CUID"
Rng(Row Num, 3) = "Folder"
Rng(Row Num, 4) = "Title"
Rng(RowNum, 5) = "Description"
Rng(Row Num, 6) = "Revision Number"
Rng(Row Num, 7) = "Last Updated"
Rng(RowNum, 8) = "Associated Connection(s)"
Rng(Row Num, 9) = "Connection CUID"
Rng(Row Num, 10) = "Locked by"
'loop through the universes
RowNum = RowNum + 1
For Each UniverseItem In Universes
iterativeUNVcount = iterativeUNVcount + 1
Application .StatusBar = " Universes read " + Format(iterativeUNVcount, 0 ) + " of " + unvCo untStr
DoEvents
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
7/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
vSI_REVISIONNUM = Empty
vSI_UPDATE_TS = Empty
vSI_DATACONNECTION = Empty
vSI_LOCKER_ID = Empty
vSI_NAME = UniverseItem.Title
vSI_CUID = UniverseItem.CUID
vSI_FOLDER = UniverseItem.Parent.CUID
Call getFolderDet(vSI_FOLDER, vSI_FOLDER_NAME)
Rng(RowNum, 1) = UniverseItem.ID
Rng(RowN um, 2) = vSI_CUID
Rng(RowN um, 3) = vSI_FOLDER_NAME
Rng(RowN um, 4) = vSI_NAME
Rng(RowN um, 5) = UniverseItem.Description '"Description" For i = 1 To Universes.Item(iterativeUNVcount).Properties.Count
' vSI_UPDATE_TS
If Universes.Item(iterativeUNVcount).Properties.Item(i).Name = "SI_UPDATE_TS" Then
vSI_UPDATE_TS = i
End If
' vSI_REVISIONNUM
If Universes.Item(iterativeUNVcount).Properties.Item(i).Name = "SI_REVISIONNUM" Or
Universes.Item(iterativeUNVcount).Properties.Item(i).Name = "SI_SL_VERSION_NUMBER" Then
vSI_REVISIONNUM = i
End If
' vSI_DATACONNEC TION
If Uni verses.Item(iterativeUNVcou nt).Properties.Item(i).Name = "SI_DATACONNECTION" Or
Universes.Item(iterativeUNVcount).Properties.Item(i).Name =
"SI_SL_UNIVERSE_TO_CONNECTIONS" Then
vSI_DATACONNECTION = i
End If
' vSI_LOCKER_ID
If Universes.Item(iterativeUNVcount).Properties.Item(i).Name = "SI_LOCKER_ID" Then
vSI_LOCKER_ID = i
End If
Next
If Not IsEmpty(vSI_REVISIONNUM) Then Rng(RowNum, 6) =
UniverseItem.Properties.Item(vSI_REVISIONNUM).Value
Rng(RowNum, 7) = UniverseItem.Properties.Item(vSI_UPDATE_TS).Value
strConns = ""
strConnCUIDAll = ""
'there can be multiple connections so new query to find them all
If Not IsEmpty(vSI_ DATACONNECTION) Then
For i = 2 To
Universes.Item(iterativeUNVcount).Properties.Item(vSI_DATACONNECTION).Properties.Count
Call
getConnectionDet(Universes.Item(iterativeUNVcount).Properties.Item(vSI_DATACONNECTION).Prop
strConnName, strConnCUID)
If strConns = "" Then
strConns = strConnName
Else
strConns = strConns & vbCrLf & strConnName
End If
If strConnCUIDAll = "" Then
strConnCUIDAll = strConnCUID
Else
strConnCUIDAll = strConnCUIDAll & vbCrLf & strConnCUID
End If
Next
End If
Rng(RowN um, 8) = strConns
Rng(RowN um, 9) = strConnCUIDAll
If Not IsEmpty(vSI_LOCKER_ID) Then If UniverseItem.Properties.Item(vSI_LOCKER_ID).Value
0 Then Rng(RowNum, 10) = UniverseItem.Properties.Item(vSI_LOCKER_ID).Value
'update row count for indivi dual sheet
RowNum = RowNum + 1
Next UniverseItem
CleanUp: On Error Resume Next
esession.Logoff
Exit Sub
ErrorHandler:
MsgBox Err.Source & " - " & Err.Number & ": " & Err.Description & " " & Err.HelpContext, _
vbCritical, "Failure in getUniverseDet()"
Resume CleanUp
End Sub
Sub getConnectionDet(connId As String, strConnName As String, strConnCUID As String)
Dim SessionMana ger, Sess As SessionMgr
'Enterprise Session declaration
Dim esession As EnterpriseSession
'InfoStore declaration
Dim iStore As InfoStore
'Info Objects declaration
Dim Connection s As InfoObjects
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
8/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn.sap.com/docs/DOC-42952
1 2 3 … 5
Like (4)
'Info Object declaration
Dim Connection Item As InfoObject
'User Object declaration
Dim j As Integer
Dim strSQL As String
On Error GoTo ErrorHandler
'Session Manager instanciation
Set SessionManag er = CreateObject("CrystalEnterprise.SessionMgr")
'Enterprise Session instanciation
Set esession = SessionManager.Logon(strName, strPassword, strCMS, strAuth)
strSQL = "SELECT SI_NAME, SI_CUID FROM CI_APPOBJECTS where SI_KIND =
'CCIS.DataConnection' and SI_ID = " & connId
'Infostore instanciation Set iStore = esession.Service("", "InfoStore")
Set Connection s = iStore.Query(strSQL)
For Each ConnectionItem In Connections
If Connection Item.Properties.Count > 1 Then
strConnName = Connection Item.Properties.Item(1).Value
strConnCUID = ConnectionItem.Properties.Item(2).Value
Else
strConnName = Connection Item.Properties.Item("SI_NAME").Value
strConnCUID = "***mising***"
End If
Next ConnectionItem
CleanUp:
On Error Resume Next
esession.Logoff
Exit Sub
ErrorHandler:
Debug.Print connId & " not found"
MsgBox Err.Source & " - " & Err.Number & ": " & Err.Description & " " & Err.HelpContext, _
vbCritical, "Failure in getConnectionDet()"
Resume CleanUp
End Sub
Sub getFolderDet(strFolderCUID As String, strFolderName As String)
'get the folder name for a given CUId passed from a universe parentfoldercuid
Dim SessionMana ger, Sess As SessionMgr
'Enterprise Session declaration
Dim esession As EnterpriseSession
'InfoStore declaration
Dim iStore As InfoStore
'Info Objects declaration
Dim Folders As InfoObjects
'Info Object declaration
Dim FolderItem As InfoObject 'User Object declaration
Dim j As Integer
Dim strSQL As String
On Error GoTo ErrorHandler
'Session Manager instanciation
Set SessionManag er = CreateObject("CrystalEnterprise.SessionMgr")
'Enterprise Session instanciation
Set esession = SessionManager.Logon(strName, strPassword, strCMS, strAuth)
strSQL = "SELECT SI_NAME FROM CI_APPOBJECTS where SI_CUID = '" & strFolderCUID & "'"
'Infostore instanciation
Set iStore = esession.Service("", "InfoStore")
Set Folders = iStore.Query(strSQL)
For Each FolderItem In Folders
strFolderName = FolderItem.Properties.Item("SI_NAME").Value
Next FolderItem
CleanUp:
On Error Resume Next
esession.Logoff
Exit Sub
ErrorHandler:
Debug.Print strFolderCUID & " not found"
MsgBox Err.Source & " - " & Err.Number & ": " & Err.Description & " " & Err.HelpContext, _
vbCritical, "Failure in getFolderDet()"
Resume CleanUp
End Sub
8/15/2019 BusinessObjects Query builder - Basics _ SCN.pdf
9/9
5/19/2016 BusinessObjects Query builder - Basics | SCN
http://scn sap com/docs/DOC 42952
Follow SCNSite Index Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosur e Copyr ight
http://www.sap.com/corporate-en/our-company/legal/copyright/index.epxhttp://www.sap.com/corporate-en/our-company/legal/impressum.epxhttps://accounts.sap.com/ui/public/viewTextResource?scenario=SCN&spId=504efd8ee4b0555c3c17b94e&resourceType=RESOURCE_TERMS_OF_USE&version=1&spDisplayName=SAP%20Community%20Network&locale=enhttps://accounts.sap.com/ui/public/viewTextResource?scenario=SCN&spId=504efd8ee4b0555c3c17b94e&resourceType=RESOURCE_PRIVACYPOLICY&version=1&spDisplayName=SAP%20Community%20Networkhttp://help.sap.com/http://scn.sap.com/docs/DOC-18476http://scn.sap.com/docs/DOC-19361http://spr.ly/SCNgoogleplushttp://bit.ly/SCNyouThttp://bit.ly/SCNFBhttp://bit.ly/SCNTwR