Query builder query to generate list folders for a group

working on custom reporting application in Excel using SDK. have query for users and groups as follows:
SELECT TOP 1000000 SI_EMAIL_ADDRESS, SI_FORCE_PASSWORD_CHANGE, SI_NAME, SI_ID, SI_USERGROUPS, SI_USERFULLNAME, SI_ALIASES, SI_DESCRIPTION, SI_LASTLOGONTIME, SI_CREATION_TIME, SI_PASSWORDEXPIRE FROM CI_SYSTEMOBJECTS Where SI_KIND='User'
and then for each si_usergroups:
SELECT SI_NAME FROM CI_SYSTEMOBJECTS Where SI_ID=" & GroupID
For each group, we also need the corresponding folders that the group can access. What's this query?

It's posted on my website:  [www.geocities.com/geekgurl7/sample_code.html].  Look at the BOEUserAudit application.  It contains code for getting the groups that have access to specific reports.  The technique is the same for folders.
-Dell
Edited by: Dell Stinnett on Dec 23, 2008 2:45 PM
Edited by: Dell Stinnett on Dec 23, 2008 2:45 PM

Similar Messages

  • Query to generate a report for incoming pending payments as per Item Group!

    Dear All,
    I need a Query to generate a report for incoming pending payments through Item Group.
    Please provide me the same.
    Thanks in advance..........................
    Edited by: Param Deshwal on Nov 22, 2011 7:11 AM

    Hi
         try this
    SELECT T0.[DocNum] as 'Invoice Number', T0.[DocDate] as 'Invoice Date', T0.[CardName], T0.[DocTotal] as 'Invoice Amount', T0.[PaidToDate] as 'Paid Amount',(T0.[DocTotal]-T0.[PaidToDate]) as 'Pending Amount',T3.[ItmsGrpnam] FROM OINV T0 Inner join inv1 t1 on t0.docentry=t1.docentry inner join oitm t2 on t2.itemcode=t1.itemcode inner join oitb t3 on t3.[ItmsGrpcod]=t2.[ItmsGrpcod] where T3.[ItmsGrpnam]=[%0] 
    Regards,
    sudhir B.
    Edited by: B.sudhir on Nov 22, 2011 7:28 AM

  • Itunes media folders for musical groups that Start with "The"

    I am using Itunes 10.7 and have selected the option of copying files to Itunes media folder when adding to library.  When I add a musician group that sometimes starts with "The" and other times don't start with "the" (eg Bee Gees or The Bee Gees) these two names are correctly sorted on the Itunes list - "The Bee Gees" sorts next to "Bee Gees".
    When I look at the folders in Itunes/Itunes Media/Music I get one folder for "Bee Gees" and a second folder for "The Bee Gees.  I have just started loading music into Itunes and already have 47 sets of folders where the groups are in two different folders - musical group name starting with "the" and another that does not start with the word "the".
    Suggestions?
    Thanks

    As Ed says, that's the way it works. For any similar group decide which of the two forms you think is correct and then use it consistently in Artist, Album Artist, and Composer when relevant. While not the ultimate arbiter of fact Wikipedia suggests that Bee Gees is the correct form in this example.
    See my article on Grouping tracks into albums for more.
    tt2

  • Build Report using sharePoint list datasource for EPM projects.

    Hi all,
    I am using Project Server 2010. 
    When project is created using EPT then for that project a site will be created and each site has sharePoint Lists. 
    I want to build SSRS report that uses this sharepoint list as datasource. 
    My connection string to the site URL must be dynamic as each project site URL will be different. 
    Your help will be appreciated!!!
    Thanks,
    Rohit

    Hello,
    Look to use an expression and pass in the Project Site URL, see the example below:
    SharePoint Web Services (XML) version but gives you the idea for using an expression:
    http://nearbaseline.com.au/blog/2010/02/reporting-workspace-lists-directly-from-sharepoint/
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Create folders for brush groups, like swatch folders CS4

    I enjoy the folders in the swatch palette,
    can we add something like this for brushes,? right now it groups brushes by brush type when listing brushes, scatter, art etc,
    I`d like to be able to drag/drop brushes into different folders, and name the folders, then be able to save those folders out as brush groups (brush libraries), but not necessarily all the brush folders or brushes on that palette, just the brush folders we select.

    I`d also like to be able to, in "list view" of the brushes palette, as you hover over a brush name, a pop up window about 4x4 cm appears showing the shape of the pattern of that brush, the thumb view doesnt give me the name feedback I need and the list view omits the pattern shape,
    The pop up of the brush head also allows me to identify the exact shape variation of the brush in list view, I prefer list view as identifying a brush by name is important, thumb view is not large enough and besides this I identify the words quicker, but then the brush head pop up would allow clearer identification of different variants within a brush group, helpful when your using all kinds of floral swirl brushes and they look very similiar, different organic brushes with slight variations like this are also hard to "name' and by name identify the differences unless you can see  a clear visual of the brush head..

  • Simple SELECT query to generate  INSERT for a table

    Hi,
    I am looking for a SELECT query which generates INSERT statements for a table.Please guide.
    Thanks
    PG.

    Like this?
    SQL> SELECT * from kons;
         COL1      COL2
            1         1
            2         2
    SQL> SELECT 'INSERT INTO kons VALUES('||col1||','||col2||');' statement FROM kons;
    STATEMENT
    INSERT INTO kons VALUES(1,1);
    INSERT INTO kons VALUES(2,2);
    SQL> If you have character and / or date columns you will have to change my example,
    but you might get the idea from it.
    You can spool the result to a file.
    Regards,
    Guido
    Edit: ';' added to end of statement...

  • SNMP query for multicast group count

    I want to get the total number of multicast groups on a switch. Is there an oid that will give me the info (ie. the number that's given by "show ip igmp snooping groups count")? If there is no oid, is there a way query the  groups (show ip igmp snooping groups)? I'm thinking with the 2nd option I might be able to count the number of entries returned by an snmpwalk or something and turn that into a number.
    Right now i'm logging into the switch with a script and running the command but that might be a problem with all those logins (only every 5 minutes though) so I'd like to do this via SNMP if possible.
    Any ideas?
    Thanks

    Works just fine!!!
    Thanks!
    LA$$E
    Hi,
    Well, at the very least, you can create a formula
    column in your break group using a combination of the
    same where clause as your original query and the
    break values for the group so that you are getting
    the correct records. If you have it in the break
    group, then it will execute for each record in that
    group.
    Hope that helps,
    Toby

  • Table for 2way,3way matching .query to generate invoice with 2 ways matchin

    hi
    table for 2way,3way matching .query to generate invoice with 2 ways matching
    plz help me
    thanks

    Hello John, I put the (1,2,3) list in the query to show it works with multiple invoices.
    You should comment out the conditions:
    select a.invoice_no, b.child, sum(a.amount) from invoice_detail a,
    select
    child,
    decode (instr(scbp,'.'),0,scbp,
           substr(scbp, 1, instr(scbp,'.') -1)
           ) starting_child
    from (
    select ltrim(sys_connect_by_path(child,'.'),'.') scbp,
    child from
    element_relation
    start with child in (select element_id from invoice_detail /* where invoice_no in (1,2,3) */)
    connect by child = prior parent
    ) b
    where a.element_id = b.starting_child
    /* and a.invoice_no in (1,2,3) */
    group by a.invoice_no,b.child
    order by 1,2to show it works for all invoices
    regards, Tony

  • Cannot build the query or generate the report. WIS 30351

    I am trying to create a docuemtn using SDK. I have created a document and when I try to add dataprovider and update the document, I am facing the below error
    Cannot build the query or generate the report. WIS 30351
    http://help.sap.com/saphelpiis_sbo41sp5wi-sdk/frameset.htm?ec5645bc6fdb101497906a7cb0e91070.html
    Any help would be appreciated...

    Hi Pirabu,
    here's the required steps for what you described:
    1. Create a new report in folder with ID 12345:
         POST ../raylight/v1/documents
         request body:
            <document>
            <name>My New Doc</name>
            <folderId>12345</folderId>
            </document>
          response:
            <success>
            <message>The resource of type "Document" with identifier "54321" has been successfully created.</message>
            <id>54321</id>
            </success>
    2. use the new document ID when adding a data provider (ie universe ID is 5543)
          POST ../raylight/v1/documents/54321/dataproviders
          request body:
            <dataprovider>
            <name>Query 1</name>
            <dataSourceId>5543</dataSourceId>
            </dataprovider>
          response:
            <success>
            <message>The resource of type "Data provider" with identifier "DP0" has been successfully created.</message>
            <id>DP0</id>
            </success>
    If you are doing something different, please provide the steps you are using and the type of datasource you are adding (unv, unx, Bex query etc).
    Is the error when adding the data provider, or do you have an additional step updating the document?
    Also, what version of BI4 are you working with?
    Dan

  • Cannot build the query or generate the report - BI4.0 Dashboard on WebService Error

    Hello All,
         I am trying to create a Dashboard with WebService connections in SAP BI4.0 SP04. While running the dashboard I am receiving the error, Cannot build the query or generate the report. I have already set the refresh parameter to TRUE (bound to an excel cell and I have tried with 1 also). Back end WebI Reports of the BIWS connections are created from BEx queries through BICS connection. I have two prompts to run the Web Service and the report. Please share your thoughts regarding this.
    Thanks and Regards,
      Debajyoti Dan

    Hi All,
        I have found the issue. The problem is coming only when I am receiving prompts from BEx query and trying to use them through dashboard. I replaced these BEx prompts with the same in WebI report. Then the entire functionality started working correctly from dashboard.
    But, this is only a work around and can not be applied at all times. So I have raised a message for the same to SAP. I will update the thread based on what I receive from SAP Support.

  • Problem with a query of a list of values

    Hi,
    In BO XI 3.0, when I edit the query of the list of values of one information object, in the results objects panel, I've 2 objects : the Information object and a warning objects (the symbol is a warning sign with a strange name like PK4041) !
    When I edit the SQL of the list of values, I can see :
    SELECT DISTINCT
      MASS_REFR_HIER_ORGA_ANLS.LIBL_CENT_COUT,
      MASS_REFR_HIER_ORGA_ANLS.COD_CENT_COUT
    FROM
      MASS_REFR_HIER_ORGA_ANLS
    I don't understand why the SQL of the Dimension Object appear in the generated SQL query.
    When I delete the warning objects, the SQL is the same.
    Some information objects are working well as usual, others have the same behavior.
    Any ideas?

    Hi,
    I have heard something similar to your issue in the past. I think it was identified as a bug in BO XIR2 base release.
    Try deleting the object and recreate the object again from scratch.
    Note: Try to give it a different name in your test.
    I know this is not a solution, however, it seems as a buggy behavior for me in XI 3.0 as well.
    Thanks,
    Sheeba

  • Query to find list of all tables relating to BP

    Hi,
    Is there any query which can generate list of all table names relating to BP?
    For example tables like BUT000,020,051 etc which are related to BP. I know a list of 14-15 table names but do not know the name of each and every field that is existing in BP.
    By writing a query can we get a list of all such table names for all the fields which appear in Field Grouping (which may be Role specfic)

    Hi Praveen,
    Well I am not aware of such query but if you want the CRM data model give me your mail ID i will send it to you in which you will find all the required details.
    Best regards,
    Vikash.

  • Querying Operational (Not DW) Database For Active Incidents

    I sure hope I am asking this in the correct forum...  Before I get started a little bit of background is needed...
    We (my company) are mostly happy with SCSM but the biggest request we hear about is that there is no easy way for technicians to see their Active/Pending tickets when out at locations.  We know about web analyst portals offered by 3rd parties such as
    GridPro, Cireson, et al. however the funding (we are in public education) for this has never been realized and the first request to get shot down.  For some reason I wondered if it would be possible to query the operational database myself for a list
    of incidents to appear and for some reason I decided to try it.  My knowledge of the inner workings of the SCSM databases (both operational and DW) are severely lacking but after 3 hours of looking around, Googling, and brute-forcing through it I have
    the following with the hopes of a free analyst portal/view...
    SELECT inc.Id_9A505725_E2F2_447F_271B_9B9F4F0D190C  AS ID
        , inc.Title_9691DD10_7211_C835_E3E7_6B38AF8B8104 AS Title
        , inc.Description_59B77FD5_FE0E_D2B5_D541_0EBBD1EC9A2B AS Description
        , inc.CreatedDate_6258638D_B885_AB3C_E316_D00782B8F688 AS CreatedDate
        , statusdisp.DisplayName AS IncidentStatus
        , AffectedUser.DisplayName AS AffectedUser
        , AssignedToUser.DisplayName AS AssignedToUser
        , classdisp.DisplayName AS Classification
        , locdisp.DisplayName AS Location
        , incExt.RoomNumber_24150BC7_9958_313D_8DD1_3CE2A0A68165 AS RoomNumber
        , incExt.AltSchedule_B1A8258C_1048_4D6E_AEB9_910811B94326 AS AltSchedule
    FROM MT_System$WorkItem$Incident (NOLOCK) inc
    INNER JOIN EnumType e ON 
    inc.Status_785407A9_729D_3A74_A383_575DB0CD50ED = e.EnumTypeId
    INNER JOIN DisplayStringView statusdisp ON e.EnumTypeName = statusdisp.ElementName
    AND statusdisp.LanguageCode='ENU'
    AND statusdisp.DisplayName!='Closed'
    AND statusdisp.DisplayName!='Resolved'
    INNER JOIN [ServiceManager].[dbo].[Relationship] AssignedToUserRel ON
    [BaseManagedEntityId] = AssignedToUserRel.[SourceEntityId]
    AND AssignedToUserRel.[RelationshipTypeId] = '15E577A3-6BF9-6713-4EAC-BA5A5B7C4722'
    INNER JOIN [ServiceManager].[dbo].[MT_System$Domain$User] AssignedToUser ON
    AssignedToUserRel.[TargetEntityId] = AssignedToUser.[BaseManagedEntityId]
    INNER JOIN [ServiceManager].[dbo].[Relationship] AffectedUserRel ON
    inc.[BaseManagedEntityId] = AffectedUserRel.[SourceEntityId]
    AND AffectedUserRel.[RelationshipTypeId] = 'DFF9BE66-38B0-B6D6-6144-A412A3EBD4CE'
    INNER JOIN [ServiceManager].[dbo].[MT_System$Domain$User] AffectedUser ON
    AffectedUserRel.[TargetEntityId] = AffectedUser.[BaseManagedEntityId]
    INNER JOIN MT_ClassExtension_685ca40e_4af9_4bca_93e1_5397c69cc946 incExt ON
    inc.BaseManagedEntityId = incExt.BaseManagedEntityId
    INNER JOIN DisplayStringView locdisp ON incExt.Locations_30F8DDC7_9552_A890_D1FC_6FC14F5B45AF = locdisp.LTStringId
    AND locdisp.LanguageCode='ENU'
    INNER JOIN EnumType enumClass ON 
    inc.Classification_00B528BF_FB8F_2ED4_2434_5DF2966EA5FA = enumClass.EnumTypeId
    INNER JOIN DisplayStringView classdisp ON enumClass.EnumTypeName = classdisp.ElementName
    AND classdisp.LanguageCode='ENU'
    where AssignedToUser.DisplayName='somename'
    ORDER BY locdisp.DisplayName, ID ASC
    This query is run against the ServiceManager database.
    (We extended the Incident class so that we could get detauls from users such as Location (56+ physical locations), Room Number, and Alternate Schedule (for users who are not full time at one location).
    This query works on my end and assuming the AssignedToUser and AffectedUser are not NULL properly display the list of incidents for a given technician (or all technicians) however there is one major flaw.  If a ticket gets assigned to Technician A and
    gets reassigned at some point to Technician B (or reassigned again to Technician C) there are duplicate records coming up for each AssignedTo user.  If you search for all technicians the duplicates show but if you filter by individual technicians then
    each tech has a version of the incident appear in their list.
    Does anyone out there know of a way to query for the latest 'version' of an incident so that only the most recent AssignedTo is listed.
    Note: Feel free to use this query as a building block for your own potential portal or use, although obviously if you figure it out please share!

    first off, welcome :) second..not bad for a beginner. The operational database is basically a no-man's land where dangerous monsters roam. And it's dark. ;)
    third: a warning..you shouldn't query the database directly. But..we all do it anyway. :)
    I recommend using "with (NOLOCK)" on _all_ tables, not just the incident table. The Operational Database is supposed to be hands off..even simple "select" queries can interfere with the data access service and the hundreds of queries
    that run automatically against this database. So, to be safe..always use "with (nolock)" on every table that you query.
    If you want unassigned incidents to show up, replace your inner joins with left outer joins. That's a SQL thing..you want to display all incidents whether they have related users or not. So, left outer join.
    The reason you're seeing multiple assigned-to users is because "deleted" relationships between objects aren't truly deleted for about 2 days. So, in your join criteria, simply add "AffectedUserRel.IsDeleted=0". This will filter out any
    "deleted" relationships from your result set. Obviously you'll have to add that filter for each relationship table instance in your query.
    Lastly: I strongly recommend you use the SDK instead of querying the database directly. There's a learning curve, but it's far safer and it's actually supported :)

  • Impact of selecting "Removing Query from Selection List" in 2 channels.

    HI All ,
    I have customized a query in one channel (My Agreements and Contract Documents query in Master Agreements List channel) and have removed the standard query from the channel by checking the  "Remove Query from Selection List" and introduced my custom query in that query group .
    But  it resulted in break in chain for  "Master Agreements" link in "Contracts To Do List" channel as the link was pointing to standard  "My Agreements and Contract Documents" query and is displaying "The query can not be executed. Contact your system administrator" when ever I click on that.
    Any pointers on how to overcome above scenario wud be gr8!
    Regards,
    Uday

    Hi Uday,
    In order for To Do List channel to work, the query definition should be in the Master Agreement List query group. Do you still want the standard query in the To Do List? If so, you would have to leave it on the Query Group as To Do list is pointing to it. May be change the display name of the query so you can differentiate between the 2 queries. The other option is change the To Do channel to point to the custom query.
    Regards,
    Vikram

  • SAP Query not generated after upgrade

    Hi All,
    Our client has upgraded from 4.6c to ECC 6.0
    In the upgraded server some SAP Queries have not been generated…and others have generated. I wanted to know why all are not generated….
    I also wanted to know if any table name exists which maintains query with generated program name…
    Please let me know your learning’s on SAP Query if any…
    Thanks in advance

    These generated program names are stored in AQLDB for local area and AQGDB for global area. Usually these program names will include the infoset names and the query names.

Maybe you are looking for

  • JTable Renderer

    I am trying to develop an application that allows users to enter in scores into a table. How can I access a particular row/cell in a table and add it to another row/cell. Is it possible to add a JTextfield to a Row/Cell??? Hope you can understand wha

  • Sort two one dimensional arrays

    I am having trouble sorting two one dimensional arrays. The first array is int type with ID numbers. I use a bubble sort to sort those. The other array is a string array of video titles. When the first int type array of ID numbers sort, I want the se

  • IPhone unknown error (-39)

    I've received the bellow error for a couple of weeks now. My iPhone will sync contacts, calendars, music and video. It always gets to the very end where it shows a progress bar attempting to delete photos and gives the following message: +The iPhone

  • BATCH DELETE ALL SENT

    How do you batch delete all sent messages on an iPhone?

  • My facetime gets connected but not able to move from connecting screen to the video chat mode.

    Hi.. I am abel to make a call from my facetime, and if the opposite person accepts the call, it says connecting and it stay that way for a min and then says call failed, i am able to make facetime calls with my ipad to any other device other than min