Finding recursively the iViews assigned to a Role - Portal Component

Hi,
I am trying to make a Portal Component where in I need to know what iViews are assigned to any particular role in a recursive manner.
Currently by using the following code I can search the iViews recursively in the portal_content folder structure but not in the roles,
Hashtable env = new Hashtable();
env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
InitialContext ctx = null;
DirContext dirCtx;
List iViewList = null;
ctx = new InitialContext(env);
dirCtx = (DirContext) ctx.lookup("pcd:portal_content");
PcdSearchControls pcdSearchControls = new PcdSearchControls();
pcdSearchControls.setReturningObjFlag(false);
pcdSearchControls.setSearchScope(PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
dirCtx.addToEnvironment(Constants.APPLY_ASPECT_TO_CONTEXTS,     Constants.APPLY_ASPECT_TO_CONTEXTS);
NamingEnumeration ne = dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview)", pcdSearchControls);
iViewList = new ArrayList();
while (ne.hasMoreElements())
     IPcdSearchResult searchResult =     (IPcdSearchResult) ne.nextElement();
     String location = searchResult.getName();
     iViewList.add(location);
Iterator i = iViewList.iterator();
while(i.hasNext())
     response.write("<br />" + i.next().toString());
I need to find the iviews that are currently assigned to a particular role for which PCD path can be given at the time of making the iVIew from this component.
Please let me know how to go about this.
Regards,
Saurabh Agarwal

Hi,
Somebody please help on this one.
Regards,
Saurabh.

Similar Messages

  • How to check the privileges assigned to a role

    Hi All,
    Can you please let me know how to check the privileges assigned to a role in Oracle?
    When I query the dba_tab_privs it says no rows returned.
    Please help..
    Regards,
    Dan

    user9212851 wrote:
    Can you please let me know how to check the privileges assigned to a role in Oracle?
    When I query the dba_tab_privs it says no rows returned.
    When you've checked the manuals and identified the views suggested by other posters you will find that it's still not a trivial problem since a role may be granted to another role - which means you need to do some recursion to uncover all the privileges available to a role.
    Pete Finnigan - who specialises in Oracle security - published some appropriate scipts a few years ago; they are probably still relevant. Here's a starting link: http://www.petefinnigan.com/weblog/archives/00001243.htm
    Regards
    Jonathan Lewis

  • How to find out the amount assigned to WBS element

    Hello Friends,
    Will you please inform how to find out the (amount/value/budget) assigned
    to WBS element
    Which Table it is stored in?
    Thanks in Advance
    Bset Regards
    Diwakar

    Hi Diwakarnd,
    You can use any of the following reports to get the information you require.
    1. <b>S_ALR_87013557</b> - Budget/Actual/Variance
    2. <b>S_ALR_87013558</b> - Budget/Actual/Commitment/Rem Plan/Assigned
    3. <b>S_ALR_87013559</b> - Budget/Distributed/Plan/Distributed
    Some of these reports use a complex selection criteria from various tables which has been grouped together, logically by SAP. The Logical Database table name for PS is <b>PSJ</b>.
    Execute transaction code <b>SE36</b> -> <b>PSJ</b> -> (Subobject : Radio button <b>Structure)</b> -> Click on <b>Display</b>.
    You would see all the underlining tables used.
    I hope the above helps.
    Do not forget to award the points please.
    Regards,
    Jacob

  • How to find out the users assigned tasks within a GP process using GP API?

    All,
    I am trying to get details of all the running GP processes. As a part of this, I need to get the user information of who is assigned a task within a process.
    Any inputs on this ?
    Do I have to use the IGPProcessRoleInstance interface? Also how do I get the execution context of all the callable objects within the process?
    -Thanks in advance
    KN

    Hi Chandan,
    I am basically looking for the roles responsible for each task in the process.
    I get the below exception when I execute the code provided by you.
    <i>com.sap.caf.eu.gp.exception.api.GPEngineException: No active version of the given development object existscom.sap.caf.eu.gp.exception.api.GPEngineException: No active version of the given development object exists at com.sap.caf.eu.gp.exception.impl.ExceptionUtil.convertTo(ExceptionUtil.java:36) at com.sap.caf.eu.gp.process.impl.GPProcess.getActiveTemplate(GPProcess.java:116) at com.sap.caf.eu.gp.process.dt.impl.GPDesigntimeManager.getActiveTemplate(GPDesigntimeManager.java:276) at com.sap.caf.eu.gp.process.dt.impl.GPDesigntimeManager.getActiveTemplate(GPDesigntimeManager.java:269) at com.bp.cmd.wd.GPReporting.getOverdueProcesses(GPReporting.java:346) at com.bp.cmd.wd.wdp.InternalGPReporting.getOverdueProcesses(InternalGPReporting.java:184) at com.bp.cmd.wd.GPReportingView.onActionSubmit(GPReportingView.java:145) at com.bp.cmd.wd.wdp.InternalGPReportingView.wdInvokeEventHandler(InternalGPReportingView.java:169) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132) at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:746) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:699) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:255) at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:154) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</i>
    I guess this is because there is no active version of the process available now. Any inputs on this and how to avoid this ?
    -Thanks,
    KN.

  • Find the iViews, Pages and Folders assigned to Role

    Hi,
    Does any one has the idea about how to retrieve the worksets, pages and iviews assigned to a role.
    I found a piece of code that will retrieve the roles, worksets, pages and iviews from PCD.
    Here is the code, that is to retrieve the roles, worksets, pages and iviews from PCD
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env.put(Context.SECURITY_PRINCIPAL, WDClientUser.getCurrentUser().getSAPUser());
    env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);
    InitialContext initialContext = null;
    DirContext dirCtx;
    initialContext = new InitialContext(env);
    dirCtx = (DirContext) initialContext.lookup("pcd:portal_content/");
    PcdSearchControls pcdSearchControls = new PcdSearchControls();
    pcdSearchControls.setReturningObjFlag(false);
    pcdSearchControls.setSearchScope(PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
    dirCtx.addToEnvironment(Constants.APPLY_ASPECT_TO_CONTEXTS,Constants.APPLY_ASPECT_TO_CONTEXTS);
    // Gets the full path of the iViews from the PCD
    NamingEnumeration ne =      dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview)",     pcdSearchControls);
    while (ne.hasMoreElements())
         IPcdSearchResult searchResult = (IPcdSearchResult) ne.nextElement();
         String location = "pcd:portal_content/" + searchResult.getName();
         wdComponentAPI.getMessageManager().reportSuccess("View ="+location);
    // Gets the full path of the pages from the PCD
    NamingEnumeration nePage = dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.page)",pcdSearchControls);
    while (nePage.hasMoreElements())
         IPcdSearchResult searchResult = (IPcdSearchResult) nePage.nextElement();
         String location = "pcd:portal_content/" + searchResult.getName();
         wdComponentAPI.getMessageManager().reportSuccess("Page ="+location);
    // Gets the full path of the worksets from the PCD
    NamingEnumeration neWorkSet = dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.workset)",pcdSearchControls);
    while (neWorkSet.hasMoreElements())
         IPcdSearchResult searchResult = (IPcdSearchResult) neWorkSet.nextElement();
         String location = "pcd:portal_content/" + searchResult.getName();
         wdComponentAPI.getMessageManager().reportSuccess("WorkSet ="+location);
    But my requirements is, if I have the role as "Sales Role", I want to find the iViews, Pages and worksets assinged to this role.
    Your help is really appreciated.
    Thanks in Advance,
    Chinna.

    Hi,
    All you need to do is to change the search root object:
    DirContext dirCtx;
    initialContext = new InitialContext(env);
    dirCtx = (DirContext) initialContext.lookup("pcd:portal_content/mypath/myrole");
    PcdSearchControls pcdSearchControls = new PcdSearchControls();
    pcdSearchControls.setReturningObjFlag(false);
    pcdSearchControls.setSearchScope(PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
    dirCtx.addToEnvironment(Constants.APPLY_ASPECT_TO_CONTEXTS,Constants.APPLY_ASPECT_TO_CONTEXTS);
    all the rest stays the same.
    BTW - you can also retrieve all the objects using one search by putting
    (|(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview),(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.page),(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.workset))
    In the search query. Then you can get the type using PCM (portal content model) APIs.
    Hope this helps, Elisha

  • How to find programatically where the iView is present in page layout

    Hi all,
        I have a iView (Abs Portal comp) in the page which has wideNarow layout . i have a requirement to find where the iView is loaded in the page i.e ) either in Wide column or Narrow column . Based on that i want to reduce/increase the size of the content in the iview.
    How to do it ? Any ideas welcome
    <b>Thanks</b>
    Saravanan

    Use DBA_DEPENDENCIES:
    select owner,name,type from dba_dependencies where referenced_name = 'TABLE_NAME'
    and referenced_owner = 'TABLE_OWNER';For example:
    SQL> select owner,name,type from dba_dependencies where referenced_name = 'EMP'
      2  and referenced_owner = 'SCOTT';
    OWNER                          NAME                           TYPE
    PUBLIC                         TABLE1                         SYNONYM
    SCOTT                          SELECT_EMP                     PROCEDURE
    SCOTT                          EMP_DEPT_VW                    VIEW
    SCOTT                          PP                             SYNONYM
    SCOTT                          EMP_MV                         MATERIALIZED VIEW
    SCOTT                          EMP_VIEW                       VIEW
    6 rows selected.
    SQL> However, keep in mind DBA_DEPENDENCIES stores statis references only. If your code references table in question in dynamic SQL you will have to parse DBA_SOURCE and in some cases, even that will not give you all answers.
    SY.

  • Adding the organization level to one Role

    Hi Experts,
                    I have one role in PFCG, this role contains
    some authorizations.
    These role maintain the role.organization level values also.
    now i want to include one organization level  to this role
    for example
                       company code----
    > *
                       purchasing group------> *
                       division----
    > *
      now i want to add "Work center"        
    how can i include? is there any option is there?
    Thanks is advance
    sundar.c

    Thanks for the Doc. This will be my Plan B.
    I am still researching on How to Directly publish to Portal. I was able to do that from Query Designer using Publish to Portal and the report shows up as an iview in a PCD folder in the Portal. The Endusers have only Business Explorer Role and all they can see is the the Busineess Explorer tab of the Portal. So, I need to figure out a way to assign the iview to End user role.
    In one of the threads,
    Prakash Darji suggested
    "The "publish into Role" from WAD saves to BI Roles which doesn't help you in web deployment, so I typically don't use this. I usually "Publish to Portal" and then will add my iView on the portal to a portal role that users are assigned to. This would make these iViews available to users on the portal. "
    I am going to assign points for your suggestion though.

  • How to find out the Responsibilty name

    Hi All,
    I have this query which retrievs the request_id.
    SELECT DISTINCT fcp.user_concurrent_program_name,
    fcp.concurrent_program_name,
    fcr.request_id,
    fcr.request_date,
    flv.meaning status,
    fcr.status_code,
    fcr.completion_text,
    fcr.logfile_name,
    fcr.outfile_name,
    fcr.argument_text
    FROM apps.fnd_concurrent_programs_vl fcp,
    apps.fnd_concurrent_requests fcr,
    apps.fnd_lookup_values flv,
    apps.fnd_request_group_units frgu
    WHERE fcr.concurrent_program_id = fcp.concurrent_program_id
    --AND trunc(fcr.last_update_date) = trunc(SYSDATE)
    AND flv.lookup_code = fcr.status_code
    AND flv.lookup_type = 'CP_STATUS_CODE'
    AND flv.language = 'US'
    --AND FCP.CONCURRENT_PROGRAM_ID=FRGU.REQUEST_GROUP_ID
    --and fcp.user_concurrent_program_name like '%DHL%'
    and fcp.concurrent_program_id='228284'
    but i need to find out the responsibilty assign ed to it.
    so it need to findthe request group.
    Could any one please find out.
    thankx..

    Pl post details of OS, database and EBS versions.
    FND_CONCURRENT_REQUESTS table has a RESPONSIBILITY_ID column that should help
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_REQUESTS&c_owner=APPLSYS&c_type=TABLE
    HTH
    Srini

  • New portal component not available for new iView

    I've just written my first portal component using the NetWeaver Developer Studio.  It's a trivial "Hello World" application. 
    If I run it in the portal from the NWDS it runs successfully allowing me to capture the full URL.
    I tried to export the par file and upload it to my portal.  I used the Archive Uploader from the portal to load the par file (System Configuration -> Support -> Portal Runtime -> Administration Console).  The upload appeared to go successfully but the "Archive Deployment Checker" shows the local and repository versions as "undefined" with "update", "delete" and "refresh" buttons - no "install" button.
    When I try to build an iView to display this component I don't see it in the list of possible types. 
    (portal content -> new iViews -> choose source type of "portal component") I can't see anything that looks remotely like my component.
    If I create a generic applicationintegrator iView I can paste the full URL from my NWDS test run and it works.  I can even build that into a role and make it appear in the portal content area. 
    How do I:
    1  find/make visible my component so I can build an iView directly from it
    2  if I can't do 1, configure the URL a little more generically so it's portable.
    The URL in the iView looks like
    http://dev.mycompany.com:5xx00/irj/servlet/prt/portal/prtroot/MyHomePage.HomePage
    and I'd like it to look like
    http://<prtroot>/MyHomePage.HomePage

    Hi Murray,
    Try to deploy your portal application from NWDS itself.
    NWDS
    Windows / Preferences / SAP Enterprise Portal /Add
    After that check in Portal Archive Selection your component will be there.
    And for shorter URL you needs to check the DNS settings.
    Regards,

  • To get the Roles, Worksets, iviews assigned to portal user using webdynpro

    Hi..
    I need to display the roles, worksets, pages and iviews that are assigned to a particular portal user using WebDynpro.
    I tried to search in SDN and found a few blogs on this... but all are for DynPages. I could not find any inputs on how to achieve this in Webdynpro.
    I am listing down the blogs for your reference :
    1) /people/prakash.singh4/blog/2005/07/28/browse-roles-folders-pages-iviews-assigned-to-a-user-ep6-sp9-and-higher
    2) /people/prakash.singh4/blog/2005/09/06/create-a-sitemap-for-your-portal
    Please provide me your suggestions on how to display the roles, worksets, pages and iviews that are assigned to a particular portal user using WebDynpro.
    Thanks and Regards,
    Sayan Ghosh

    Please use following code to get all roles assigned to user:
         IWDClientUser wdUser = WDClientUser.forceLoggedInClientUser();
         IUser user = wdUser.getSAPUser();
         String strRoleID = "", strRoleDesc = "";
         IRoleFactory iRoleFactory;
         iRoleFactory = UMFactory.getRoleFactory();
         // Get All the Roles of the User
         Iterator iteratorRoles = user.getRoles(true);//prtRequest.getUser().getRoles(true);
         // Loop through all the Roles
         while(iteratorRoles.hasNext())
              strRoleID = iteratorRoles.next().toString();
              try
                   strRoleDesc = iRoleFactory.getRole(strRoleID).getDescription();
                   wdComponentAPI.getMessageManager().reportSuccess("Role: "+strRoleDesc);
              catch(Exception e)
                   wdComponentAPI.getMessageManager().reportException("Exception e: "+e, false);

  • How find out the URL of a Transaction like se80 called by an iview

    Hi Everybody,
    instead of a transaction-iview i want to use only the URL in the browser to call the screen of a ITS-Transcation. How can i find out the needed URL without using a transaction ivew?
    regards,
    Sid
    Edited by: sid_mopo on Mar 23, 2009 2:18 PM
    Edited by: sid_mopo on Mar 23, 2009 2:19 PM

    Go to the Transaction iview and open as object.
    Go to the property Quick Link and add a name to it. (say 'abc').
    Then open the url
    http://<urportal>:<port>/irj/portal/abc
    After login, it will directly open the iview in the portal.
    Note that the iview should assingn to a role and this role is assigned to a user
    Raghu

  • How to find out the Role ?

    Is it possible to find out the correct role throught one query ?
    I am not able to find out the role , which my report checking ...user is getting no authoriation for this report and i m not able to figre that which role should assign to his user id .
    Regardsm

    Hi,
    You  can check the same through RSRT as well. If you run the query in execute+debug mode and check the Authorization breakpoints you'll see the objects its accessing.
    Also check the users role using SU01D or SUIM to see what he currently has. He's lacking the correct business authorization to access values for certain characteristics.
    Cheers,
    Kedar

  • How to find out the values which are assigned in authority group

    Hi to all
    Please tell me where can I find out the values which are assigned in authority object according to roles.
    for ex :
             Changed    Customer: Account Authorization                              F_KNA1_BED
              Changed    Customer: Account Authorization                              T-DR50175601
                Activity                       01, 02, 03, 08                                                              ACTVT
                Authorization Group            5100                                                                        BRGRU
    F_KNA1_BED is the authority object , assigned to one user.
    He can access the authorization group 5100. I want to check that value in my program.
    How ?
    Where it is stored.
    Please help me....
    Regards
    Anubhav Gupta

    Hi Anubhav,
    Please use this FM "SUSR_USER_AUTH_FOR_OBJ_GET" and pass the object name in it . You would get the values for that particular object.
    Thanks
    Nitin Sachdeva

  • How to a ssign the iViews & Workset of the Role

    Hello gurus,
    Listed below are the procedures for organizing the reports within the Role:
    a. Create a workset for each of these folders in the role
    b. Assign the iViews/Pages currently present in the folders of the role to the newly created workset
    c. Delete the folders from the role
    d. Assign the worksets to the role
    I've created a Workset to assign the iViews, how do I assign iViews to the new Workset?
    And how do I assign the Workset to the Role?
    Thanks in advance for any helps.
    Regards,
    Niki Nguyen

    Hi Niki,
    - Open the Workset and then right click on the iView in the PCD and select "Add iView to Workset". Close the Workset.
    - Open the Role and then right click on the Workset in the PCD and select "Add Workset to Role".
    Reward Points of helpful.
    Thanks,
    Abhishek

  • Not able to view the 'proxy-to-remote' iView under 'user admin' role

    Hi All,
    I am not able to view the 'proxy-to-remote' iView under 'user admin' role. I need this for Remote role assignment for FBN .
    I am using the portal version EP 7.0.
    Can anybody help me .
    Thanks & Regards,
    Amit Kade

    Hi, Amit
    u have to assign the one iview in User-Admin role
      Goto->Contentadmin-> portal content->content provded by sap->Admin interface->iview template ->select proxy to remote role iview.
    and this iview assign to user admin role the u can able to see.
    if its solve please give me 10 points
    thanks & regards
    chitta

Maybe you are looking for