Checking portal roles in WebDynpro

Hi,
I want to make some role checking in my WD and depending on the role I want to create the WD dynamically. I know how I can check the roles and also how to generate the WD dynamically, but I don't know where to do it.
In which method should I do the role checking and generating the WD dynamically?
public void wdDoInit()
OR
public static void wdDoModifyView(IPrivateComponentEDView wdThis, IPrivateComponentEDView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
I think I should use the wdDoInit() method, but to generate the WD dynamically I need this parameter IWDView from the wdDoModifyView method. But I think it's not the right method for that...
So what should I do where?
Thanks in advance,
Hartmut

Hartmut,
Definitely, do this check in wdDoInit method.
Save the check result as context attribute value or context node elements, then later access aforementioned values/elements from variable wdContext that is passed to wdDoModifyView method.
Valery Silaev
SaM Solutions
http://www.sam-solutions.net

Similar Messages

  • Accessing portal roles in webdynpro for java

    Hi,
    Please let me know how to access portal roles in webdynpro for java.
    Rgds,
    Patana

    Hi ,
    Please use this API to access the portal roles:
    IRoleFactory fact=UMFactory.getRoleFactory();
    Also see this code to get more information of role using code:
    IRoleFactory rolef=UMFactory.getRoleFactory();
    IRoleSearchFilter searchfilterrole= rolef.getRoleSearchFilter();
    ISearchResult searchResult = rolef.searchRoles(searchfilterrole);
    while(searchResult.hasNext())
    String unq=(String) searchResult.next();
    IRole role1=rolef.getRole(unq);
    String roleName = role1.getDisplayName();
    String roleID = role1.getUniqueID();
    // Once you get the informationof role you can use it in your application as per your requirement.
    Also please note that:
    You should add "com.sap.security.api.jar" to your project`s java build path for getting the Portal Security API's.
    I hope this solves the problem. Please revert back incase you need any further informationon this.
    Thanks and Regards,
    Pravesh

  • Can I get the portal rol thought webdynpro abap?

    I am working webdynpro abap and I need to get the rol portal.
    Can I get the portal rol thought webdynpro abap?
    Tkanks and best regards.
    Maria Elena

    I am working webdynpro abap and I need to get the rol portal.
    Can I get the portal rol thought webdynpro abap?
    Tkanks and best regards.
    Maria Elena

  • Error in Portal when checking MSS role, Help me how to solve?

    In portal when I click on MSS I am getting an error like...
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : pcd:portal_content/com.sap.pct/line_manager/com.sap.pct.erp.mss.bp_folder/com.sap.pct.erp.mss.roles/com.sap.pct.erp.mss.manager_self_service/com.sap.pct.erp.mss.manager/overview/com.sap.pct.erp.mss.work_overview/com.sap.pct.erp.mss.workoverview/com.sap.pct.erp.common.key_figure_monitor
    Component Name : com.sap.portal.appintegrator.sap.WebDynpro
    Exception in SAP Application Integrator occured: Unknown system alias. System Alias: 'SAP_ECC_Financials', User: 'SAPUSER', Reason: System Alias is not defined or permission denied for this user.
    Exception id: 08:49_02/12/09_0001_63287050
    See the details for the exception ID in the log file
    How can I solve this?
    Thanks,
    Potru.

    hi potru,
    does the user 'SAPUSER' has assigned roles which has permission for system 'SAP_ECC_Financials'.
    hope this will help resolve your issue.
    thanks
    arun

  • 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);

  • Abap+java stack, users not mapping to portal role.

    We have the ABAP+java add-on install.
    The UME is by default ABAP engine.
    From Portal:
    1 I create a portal user, it ALWAYS creates ABAP user in ABAP stack of WAS.
    2. I create a portal role, it creates a role in the Portal.
    3. When I assign the user this portal role,
    having worksets and pages,
    I get no pages or worksets shown in the portal page as soon
    user logs in.
    Can you help configure this so that I could see the pages and iviews inside this workset when user logs in.
    Thanks  a lot.
    PS:  posted this in webdynpro-ABAP.  no reply came.  Sorry to double post.

    Hi Mike,
    can you check into your WorkSet (or Pages) if you have setting up the <b>Entry Point</b> flag?
    PS: Award points for good answers.
    Best regards,
    Gianluca Barile

  • No portal roles are assigned for this user.If this problem persists, contac

    I am trying to access portal first time using j2ee_admin user. It is saying "No portal roles are assigned for this user.If this problem persists, contact your system administrator."
    iam using abap+java enginee how config in abap enginne ,iwant which role to assign  j2ee_admin  user
    i already asiigned sap_j2ee_admin,SAP_BC_JSF_COMMUNICATION,SAP_BC_JSF_COMMUNICATION_RO   but it show same problem
    please help me..
    Edited by: Mugala Balu on Aug 7, 2010 5:53 PM
    Edited by: Mugala Balu on Aug 8, 2010 7:48 AM

    Balu,
    Well this issue has been discussed many a times in forums. You would have to point your data source to ABAP system.
    Check this thread in [here|J2EE Failed to start  , after changing UME datasource;.
    Good Luck!
    Sandeep Tudumu

  • How to get password of a logged in portal user in webdynpro.

    hi,
    i want to get the password of the logged in portal user through webdynpro. i already know how to get the user id and other information through webdynpro (using WDClientUser), but i want to get the password as well.
    this is an urgent requirement. Immediate help will be highly appreciated and points will be awarded for helpful answer.
    thanks in advance.

    Hi
    User Management APIs don't give the liberity to obtain the password, instead you can verify a password. Please check if your requrirement can be modified to check for password.
    Please use code mentioned below and the one suggested before.
    loggedInUser = WDClientUser.getCurrentUser();
    user = loggedInUser.getSAPUser();
    if (user != null)
    IUserAccount[] acct = user.getUserAccounts();
    if(acct[0] != null)
    b = acct[0].checkPassword(password);
    Thanks
    Srikant

  • J2EE roles vs Portal roles vs ABAP roles

    (I also posted this on portal implementation, but i hope i receive more reactions here )
    Dear all,
    I have a question about the information on the following link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4c/6c0f40763f1e07e10000000a1550b0/content.htm
    It says the following:
    "These functions are intended to assign users and their assigned portal roles a corresponding role in the SAP System. This corresponding role (authorization role) contains the authorizations needed to execute certain functions from the portal."
    1. These "...certain functions..." they talk about, can someome give an example of these functions?
    2. Is it possible for example to create a role in the portal that gives a user authorisation for starting transaction SE80 in the backend system? Without making the role in the backend first and uploading it to the portal.
    3. It's also possible to upload ABAP roles to the portal. Is the main reason for this that users can see their SAP menu (or part of it) in the portal? Or does this have other advantages too?
    4. I'm very confused about the relation between J2EE roles, portal roles and ABAP roles. Is it possible to manage the roles for a user in one place, without having to do certain actions in the portal AND the backend system?
    From what I've read on help.sap.com, you always need to do certain actions in both places.
    A possible approach is the following (from what i know): Creation of roles in the R/3 system, without assigning to users. From a webdynpro application, a user can then be created and roles can be assigned: portal roles (via some API) and R/3 roles (via BAPIs).
    I hope someone can give a bit information on this issue. I've done alot of reading on help.sap.com, but it's still an abstract issue for me.
    Kind regards,
    Joren

    Hi Jorem
    Re: point 3. I don't build portal roles through this mechanism as I don't believe in replicating the SAP easy access menu inside the portal. If there are some specific functions (transactions) that I want to run inside the portal, then I might use this mechanism to build the iViews once. I would rather start an iView that runs transaction SMEN and let the user see their regular easy access menu.
    Please note that the speed of executing transactions in the portal isn't a function of the portal, but the fact that you are using ITS, for example, to web enable the transaction...
    Re: point 4. Groups are a UME concept. They have nothign to do with ABAP groups. They can be created directly in UME through user administration functions, or they can be created in the LDAP and then they are visible in the portal. If the UME points to an ABAP system, then the ABAP roles are autoamtcially visible as UME groups. Groups created in the UME need to have the members assigned through user admin functions of the Java engine. Groups stored in LDAP are maintained using LDAP admin tools. There are upload utilities that allow you to maintain LDAP users and groups through text files. Google LDIF for more details.
    Roles on the portal need to be built in the portal contetn directory. As Michael mentioned, this can be automated by the use of the role upload function built into the portal.

  • Abap+java abap-user and portal-role PROBLEM?? help

    We have the ABAP+java add-on install.
    The UME is by default ABAP engine.
    From Portal:
    1 I create a portal user, it ALWAYS creates ABAP user in ABAP engine.
    2. I create a portal role, it creates a role in the Portal.
    3. When I assign the user this portal role,
    having worksets and pages,
    I get no pages or worksets shown in the portal page as soon
    user logs in.
    Can you help configure this so that I could see the pages and iviews inside this workset when user logs in.
    Thanks  a lot.

    Hi Mike,
    You did right,
    Just check the Entry Point Property of your iView, page and workset to YES
    there are two radio buttons yes and no select the yes one,
    you can see your pages afte rlogin with the new user.
    Regards
    Abhimanyu L

  • Page w/3 Iviews will not display all iviews thru Portal Role?

    Hello All,
    I am having a problem with getting 2 of 3 iviews to display through my portal role(s). 1 of the iviews is a copy (generated thru the wizard with same properties) of the SAP Bank information iview and the other 2 I created in the KM content (1 is an image and the other is html). If I preview the page, I see all 3 of my iviews with no problem.
    Just a little history, I created a new area page called payments which I tied Bank Information and w-4 to via config in the back end. I z copied all my resources and tied the correct PCD to them.
    It almost seems that it is still calling the SAP delivered Bank information? But, I checked all my config and nothing that is configured is pointing to there iview/page?
    Any suggestions would be greatly appreciated.
    ESS 1.0 - EP7.0
    Thanks,
    Mike

    Hello Priya,
    Thank you for getting back to me so quickly on this. I did create a z copy of the bank information service and called it z_employee_bank_us_serv05. I created the iview with application name 'per_bank_us' and as for the 'Application Parameters', I did not fill anything in which leads me to my next question.
    I know when I create a new area, that I need to fill in the application parameters of the path to the 'Area group pages'
    (Example: sap.xss.menuarea=Z_EMPLOYEE_BENEFITPAY_ERP2005&sap.xss.menuargrp=Z_SAPDEFAULTESS_ERP2005&sap.xss.menuhdr=SAPDEFAULT),
    What would the verbage that would need to be added to the application parameters for this just to point to the service?
    THX

  • Pass parameter to all iViews in a portal role

    Hi,
    we have a portal role containing several iViews for ABAP Web Dynpro applications. Now we want to assign the parameter sap-wd-lightspeed=X to all these applications. Is it possible to do this in the portal application and can the customer set it off if they want to?
    One idea is to define a dummy iView with this parameter set in property Application Parameters, and define all iViews as delta-links of this dummy iView. But we have some iViews which need their one Application Parameters.
    Thanks & regards,
    Carlo

    Hi Bies,
    I hope you are calling the Webdynpro ABAP applications using AppIntegrator iview (com.sap.portal.appintegrator.sap.WebDynpro).
    Application Name : ABAP application
    Application Parameters:sap-wd-lightspeed=X
    Thanks
    Srikanth M

  • Portal Theme in Webdynpro ABAP

    Hi Experts,
         I want my portal theme to get applied to the webdynpro abap application.But WDA application is not adapting the portal theme.
    This is the version of the theme's style sheet in portal=7.1.3.0.1;ur=7.1.3.0.1;7.1.3.0.0(Major version.minor version.SP.patch.generation run)
    The version of Webdynpro abap theme is 7.11.3.2.0.
    Portal Version is NetWeaver 7.0 Ehp1
    and SAP Basis Version is 701 and level 5.
    Is there  version incompatibility?
    How can I solve this.
    Thanks and Regards
    M.Karthiheyan.

    Hi M.Karthiheyan,
    Please follow below steps to apply Portal theme in Webdynpro ABAP.
    1. Go to transaction SE80 and navigate to the MIME Repository
    2. Create a folder in the MIME repository that will contain all the custom theme files. Make sure the folder is created in following directory /SAP/PUBLIC/BC/UR/<theme_name>
    3. Go to the Repository browser in SE80 and select u201CProgramsu201D from the drop down list.
    4. Enter BSP_UPDATE_MIMEREPOS in the input field and hit Enter
    5. Execute the program and enter the MIME repository path to the folder that is to contain the custom theme. Our custom theme is located in MIME path /SAP/PUBLIC/BC/UR/<Theme Name>
    6. Execute the program and select root folder that contains all the custom theme files.  The custom theme can be directly pulled down from the file server on portal or can be exported from Portal Theme Editor and imported into Eclipse Theme Editor in order to generate the necessary css files. We only need the root folder that contains the actual css files and images. The upload process might take a while depending on the size.
    7. Once the upload is complete, go back to the MIME Repository and check if the files were uploaded.
    8. To specify a theme at the global level you can execute WebDynpro component WD_GLOBAL_SETTING. Maintain parameter u2018Stylesheet URIu2019 with the MIME Repository path of the custom theme (i.e. /SAP/PUBLIC/BC/UR/<custom_theme>).
    9. Enter the path under "Stylesheet URI:" and select the check box which says "Force use of External Stylesheet".
    Thanks.
    Sushil S Aher

  • Portal role

    Hi all,
    Can you help me with the portal role
    I have
    3 role : role_A / role_B / role_C
    2 workset : workset_A / workset_B
    5 iviews : iviews_A / iviews_B / iviews_C / iviews_D / iviews_E
    The user with the role "role_A" see that :
              - Workset_A with the Iviews iviews_A
              - Workset_B with the Iviews iviews_C and iviews_D
    The user with the role "role_B" see that :
              - Workset_A with the Iviews iviews_A and iviews_B
              - Workset_B with the Iviews iviews_C and iviews_D
    The user with the role "role_C" see that :
              - Workset_A with the Iviews iviews_A and iviews_B
              - Workset_B with the Iviews iviews_C, iviews_D and iviews_E
    I would like have only 2 workset.
    Is it possible to manage the iviews autorizations depending on the role ?
    Or it's necessary to create 6 workset.
    Thanks for your help
    Céline

    Hi,
    You can use PCDFilter for this.
    PCDFilter -- This dynamically can hide Role Contents depending on the filter criteria. But this feature is unusable with NavigationCaching.
    Check this for more:
    Be Careful When Combining Navigation Cache, PCD Filter
    Filtering Role Content by User Attributes
    Regards,
    Praveen Gudapati

  • Find user SAP Portal role in an abap program

    Dear all,
    We would like to check the SAP Portal role of a Portal user in a R/3 abap program.
    do you know if there is a bapi or a RFC module function to do that ?
    For example : the user CCDEMO (exists in EP and in R/3 backend) has a Buyer Portal role. In an abap program, I would like to have this information.
    Thanks
    kind regards
    Véronique

    Dear all,
    We would like to check the SAP Portal role of a Portal user in a R/3 abap program.
    do you know if there is a bapi or a RFC module function to do that ?
    For example : the user CCDEMO (exists in EP and in R/3 backend) has a Buyer Portal role. In an abap program, I would like to have this information.
    Thanks
    kind regards
    Véronique

Maybe you are looking for

  • Error while installing Oracle Database Lite 10.2.0.1.1 for Win

    Hello, I am trying to install Oracle Database Lite 10.2.0.1.1 on Windows XP. I am going according screens on this page: http://www.oraclebrains.com/2008/07/installing-oracle-database-lite-10g-release-3-mobile-server/ But at Step:12 - Mobile Server re

  • BPM scenario to work

    hi Do we need to add any Parametrs in SXMB_ADM to BPM scenario to work SV

  • HT204053 can i synch addresses from icloud to my desktop mac

    can i synch addresses from icloud to my desktop mac?

  • Cannot Install QuickTime at all

    I have a vicious round-robin going. I bout an iPod Nano. To load iTune, you need to install Quicktime 7. I used to have Quicktime until something got corrupted and I had to manually uninstall Quicktime (QT did not have an Uninstaller). When I attempt

  • UML295 issue

    I very recently upgraded to the UML295 from the USB760.  On the old modem I was getting about 80-85 dbm average.  Now changing to 4g and a supposedly better modem, I am averaging 110-114 dbm.  I have not changed my antenna.  I haven't moved out of my