cancel
Showing results for 
Search instead for 
Did you mean: 

How to Extract these data from CMS Database

0 Kudos

Hi

Please I need to extract there data through SAP SDK

(

Folder_IDFolder_NameReport_IDReport_NameTypeUniverse IDCreation_DateOwnerHAS_PROMPTS

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

All of this is easily available.  Do you need this for all reports or just for reports in a specific folder?  If it's for all reports, I usually use a recursive method to walk down the folder tree, getting the subfolders and report.  The logic looks like this:

1.  Log in to the CMC and get an IEnterpriseSession.

2.  Get an IInfoStore from the IEnterpriseSession.

3.  Query the IInfoStore to get the root public folder (SI_ID = 0 in 3.1 and earlier, SI_ID = 43 in 4.x).

4.  Call recursive "loadFolder()" method.

     a.  Query to get all of the subfolders in the current folder (SI_PARENTID = current folder's ID and SI_KIND = 'Folder').

     b.  For each subfolder found, call loadFolder().

     c.  Query to get all of the non-folder objects in the folder (SI_PARENTID = current folder's ID and SI_KIND <> 'Folder).

     d.  For each object, get the ID, name, type (kind) creation date, owner.

     e.  If the object is of kind "Webi", cast the IInfoObject to an IWebi

            i.  Use IWebi.getUniverses() to get the SI_ID values for any universes used by the report.  Then walk the list of SI_ID values and query to get the universe names.

           ii.  Use IWebi.getProcessingInfo() to get the IProcessingInfo for the report.

          iii.  In the Properties of the IProcessingInfo, get the "SI_HAS_PROMPTS" value of the properties to determine whether the report has prompts.

     f.  If the object is of kind "CrystalReport", cast the IInfoObject to an IReport.

            i.  Use IReport.getReferencedUniverses() to get the SI_CUID values for the universes used by the report.  Then walk the list and query to get the universe names.

           ii.   Use IReport.getProcessingInfo() to get the IProcessingInfo for the report.

          iii.  Get the Properties of the IProcessingInfo, get the SI_NUM_PROMPTS property of the SI_PROMPTS property.  If it's >0, the report has prompts.

For sample code, go to the homepage for this space and scroll down.  On the left there will be links to sample code.  Even though the code might be for earlier versions, it will still work with the latest version.

-Dell