Accessing PCD inside WebDynpro application

Hi Forum,
I am re-posting the message as I didnt get any answers to my previous message. I need to read the PCD inside my WebDynpro application to get a list of all the Workcenters/Worksets/Roles/iViews in the portal.
Is it possible to do this? If yes, can someone please point me to the required APIs and the location of required jars that I would need to import?
Best Regards,
Vivek

Hi
I am not sure if everything is possible or not as you require but getting the roles assigned to the user is possible.
You can do this by using the code similar to this.
IUser epUser = null;
            String portalUser = "";
            try {
                 IWDClientUser user = WDClientUser.getLoggedInClientUser();
                 epUser = user.getSAPUser();
                 Iterator roleList=epUser.getRoles(false);
               if(roleList!=null)
                    while(roleList.hasNext())
                         String strRole=roleList.next().toString();
                         IRole role=UMFactory.getRoleFactory().getRole(strRole);
          catch(Exception e)
You can explore UMFactory and see if you can meet your requirements.
For above code you will need com.sap.security.api.jar which you can find in plugins folder of your NWDS installation.
All the best.
Regards,
Ajay

Similar Messages

  • How to access custom JAVA webdynpro application from an iPad?

    Hi,
    We are trying to access custom JAVA webdynpro application from an iPad, but nothing is opening up from the iPad browser.
    What can be the possible reasons for this? Any kind of SICF enablement or opening up of ports in the network?
    Any inputs are welcome!!
    TIA,
    Regards
    Deepthi

    Hi,
    it is possible to show Java Web Dynpro applications on a mobile device in general, but the controls and the ui should be optimized for the mobile device.
    Safari devices are not officially supported so far for Mobile Web Dynpro.
    Supported are Windows Mobile devices and Blackberry devices. I also got some good results with Symbian devices.
    You can find more inforamtion on Mobile Always Connected at:
    ht[http://help.sap.com/saphelp_nwce711core/helpdata/en/7d/28fa3e7cb1d861e10000000a114084/content.htm|http://help.sap.com/saphelp_nwce711core/helpdata/en/7d/28fa3e7cb1d861e10000000a114084/content.htm]
    Best Regards,
    Stefan

  • Access UME from Webdynpro Application

    Access UME from Webdynpro Application u2013 display the user attributes from Webdynpro iview
    How to go for this...??
    Edited by: saurav mago on Sep 1, 2008 6:45 PM

    Hello Saurav,
    Try this:
    import com.sap.security.api.IUser;
    import com.sap.security.api.IUserAccount;
    import com.sap.security.api.UMException;
    import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDUMException;
    try {
         IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
         IUser sapUser = wdClientUser.getSAPUser();
         if (sapUser != null) {
              java.util.Iterator parentGroups = sapUser.getParentGroups(false);
              while (parentGroups.hasNext()) {
                   String parentGroupName = (String) parentGroups.next();
                   if (parentGroupName.equals("GRUP.R3_ROLE_DS.Z:EP_XPTO123")) {
                        return true;
    catch (WDUMException e) {
         e.printStackTrace();
    OBS.: sapUser can be used to access a lot of info regarding the user.
    OBS.: you need to add a reference to "com.sap.security.api.sda", that is in the default SC SAP_JEE, if I well remember.
    Regards,
    Douglas Frankenberger

  • Accessing PCD with Webdynpro objects

    How do we access PCD objects using <b>webdynpro-java</b> applications?  Where can we find information to read properties of PCD objects using <b>webdynpro</b>?

    check these threads
    https://forums.sdn.sap.com/click.jspa?searchID=7255594&messageID=1545216
    https://forums.sdn.sap.com/click.jspa?searchID=7255594&messageID=3434621
    https://forums.sdn.sap.com/click.jspa?searchID=7255594&messageID=2815761
    https://forums.sdn.sap.com/click.jspa?searchID=7255594&messageID=544952
    https://forums.sdn.sap.com/click.jspa?searchID=7255594&messageID=1340704
    reward points if helpful

  • Javascript Access Denied in WebDynpro Application SP11

    Hi all,
    I'm developing a WebDynpro application that is published in EP as a WebDynpro IView.
    Deploying the application and running as standalone (out of EP) this works fine but when I access that by EP I get JavaScript errors in DropDowns.
    I know that this error is know as an bug of SP11 but I want to know if someone obtain some answer from SAP or do anything to solve this problem.
    I already install another server with EP and WEBAS from the last SAP WEBAS installer downloaded from SAP website but the problem already persists.
    Server: WEBAS 6.40 SP11
    IDE: Version: 2.0.11
    Build id: 200503080124
    Thanks,
    Manoel

    Hi
      Refer to OSS Note no : 779659. But even in that case if you are using your own themes there are some display problems in SP11.
    In SP10 we had our own theme and we followed the OSS Note. It worked fine. When we applied the Same theme to SP11 it did not work.
    There is also another note which says that custom themes are not supported properly. I will try to give you the note number. Maybe that is a problem.
    I would advice you to try and use standard themes for your Webdynpro apps. Even if you apply the note you are not going to get proper display in case of SP11. Maybe the problem gets solved in SP12.
    regards
    ravi

  • Problem regarding BAPI call from a webdynpro applications

    Hi,
      We are trying to call a BAPI in R/3 system from a webdynpro application through the standard method. But we are getting some problems in JCO settings. We already wasted so much time in solving those problems. Is there anyway where i can access BAPI from Webdynpro application.
    Rgrds,
    Anna

    Hello Anna,
      You can do it by using SAP Java Connector API's in the implementation of the Webdynpro application. You can refer to the sample programs for JCO at http://service.sap.com/connectors and download the latest version of SAP JCo in that install those files as per the installation document in the downloaded zip. The downloaded zip contains information about JCo APIs and sample programs.
    Hope this will solve your problem.
    Best Regards,
    Srinivas.

  • WebDynpro application no displayed on other systems

    Hi All..
    We have developed an WebDynpro application using webservices where in the webservice will be used in connecting to the XI server and the rest all the business logic is there is done on XI which will be connecting to the R/3 using an RFC and the data is retrived on to the webdynpro.This has been deployed on to the XI J2EE engine and its running well on the systems where we are having the NWDS but its not working when we are using the same URL in other systems.Its working well on the system where we have NWDS.
    We are having EP and XI servers on different systems.
    URL:http://hostname:port/webdynpro/dispatcher/local/XIWebService1/OrderApp
    Help Me
    Thanks in advance..
    Suma

    Hi Suma,
    Are you getting any error or just a blank page ?
    Did you check wether you can access any other webdynpro application page on other system where NWDS is not available?
    Let me know the details ..
    Nanda

  • Cannot access WebDynpro application:com.sap.tc.webdynpro.services.exception

    Hello gurus!!
      I am trying to access the "Emergency address" from the LWE and I am getting this error "Cannot access Web Dynpro application: com.sap.tc.webdynpro.services.exceptions.WDException$DummyLocalizableTextFormatter@76829226". Could anybody please suggest what could be wrong with this action "Emergency Address"?
    Thanks much for your help with this,
    Maria Kutty Somori....

    Hi Yugandhar/Siddharth,
       Emergency address is the standard callable object for Execution that is part of the Standard Life and Work events. I have customized to reorganize the actions depending on our requirements and i have created a different folder structure and different order of execution of callable objects.
    How do I fix this "cannot access Webdynpro application" error? Please suggest.
    Thank you so much,
    Maria Kutty Somori.....

  • Not able to access the WebDynpro application in BlackBerry.

    Hi,
    I have created a WebDynpro application. The application is workin fine on IE but when I access the same application from BlackBerry simulator 8830 it gives an error :
    500 Internal Server error.
    APPLICATION ERROR OCCURED DURING THE REQUEST PROCESSION
    THE REQUESTED DEPLOYABLE OBJECT "InventryLookUpApp" is not deployed on the server.
    Please check the URL for typos
    The URL for the application is :
    http://10.54.162.252:50000/webdynpro/dispatcher/sap.com/a1s~searchproduct/InventoryLookupApp
    Please guide.
    Manish

    Hi Manish,
    Try this link:
    http://10.54.162.252:50000/webdynpro/dispatcher/sap.com/a1s~searchproduct/InventoryLookupApp?sap-wd-client=WmlClient
    Let me know what happens.
    Thanks,
    Ted

  • How can I call Adobe Reader from inside my Application and prevent operator to access Open/save opt

    Can Anyone help to find a way?
    http://answers.acrobatusers.com/How-call-Adobe-Reader-inside-application-avoid-operator-op en-save-doc-q13487.aspx
    From inside my application that run on an Automation PC, under Windows O.S, I want to call Adobe Reader using a shell command to open up an PDF Document containing some informations.
    Shell command like these
    "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" /A "<options>" "C:\mydoc.pdf"
    or
    cmd  /c "C:\mydoc.pdf"
    Operator is using a touchscreen.
    I want to prevent user to access any option that can give him acces to filesystem (Open/save/save as).
    I want also to prevent any change/add information to PDF document
    Thank you in advance for the time you will spend for me.

    You can use the Installation Tuner for Reader to customize the UI elements provided to the user.  Details on the Adobe web site.

  • Error in WebDynpro Application in accessing "MIME Repository"

    Hi All,
    I am writing a XML file to Mime Repository from WebDynpro Application.
    To do this, I developed the below code:
      DATA mime_repository TYPE REF TO if_mr_api.
      DATA url TYPE string VALUE
    '/SAP/BC/WebDynpro/SAP/PUBLIC/BC/SSR/uuielibs/example.xml'.
      mime_repository = cl_mime_repository_api=>get_api( ).
      CALL METHOD mime_repository->put
        EXPORTING
          i_url                     = url
          i_content                 = content
          i_suppress_package_dialog = 'X'.
    In execution process,I am getting an error,
    "Screen output without connection to user" and "DYNPRO_SEND_IN_BACKGROUND"
    In calling the method IF_MR_API~PUT, I have passed "X" to I_SUPPRESS_PACKAGE_DIALOG to avoid Transport Request screen.
    Can you please suugest how can I overcoem this issue.

    Leha,
    Is this RFC expecting any mandatory parameters ? if that is the case make sure that you are sending the expected type mandatory parameter.  (you can print a message on the screen and verify this)
    If you are sure that you are sending the correct details to execute RFC, Please turn on the debiug session for the portal user in the backend and see whether the values are passing from the portal or not.
    How to switch on Debug mode in the backend for the specific user:
    Requirements:
    1. Make sure the user id existed in Portal and SAP Backend.
    2. Setup the debug mode for the user in the backend
    3. Run the application from the portal
    4. While executing the application from the portal , The backend stops the execution to debug, so from here you have to execute the FM step by step and verify whether you are getting the values from the portal or not.
    Steps to switch on Debug mode in the backend:
    Logon to ECC System>> To access the function module use SE37 tcode from the SAP Easy access menu>>Enter the Function Module name and click on Display>>From the SAP Menu click on Utilities>>Settings >>Debugging >>Enter the user ID to switch on the debug mode and Enter.
    Now the user ID is switched on for Debug. Go to the Function module Source Code>> palce the cursor at the start of the soruce code>>From the Menu go to Utilities>>BreakPoint>>Set?Delete Break Point
    This will set the break point for the mentioned user id and now you can veryfy the values on the backend.
    Once you complete the debug process please turnoff the debug mode.
    Thanks
    Krishna

  • Using MS Access as backend in Webdynpro Application

    hi guys,
    I am creating a application in webdynpro in which i want to use MS Access as Backend, so can u please tell how to use MS Access as backend.
    What all needs to be done and where the database file needs to be stored etc. please give me all the details...
    thanks in advance
    Gaurav Makin

    Hi Gaurav,
    It is pretty easy to use the MSAccess as a  back end from the webdynpro applications. Take the driver as a JDBC-ODBBC driver and  creat the alias name for the  database  server  to use as a data source.Select the model as a Beanmodel  while creating a model in the Webdynpro explorer.
    please  find the below code which will help you lot.
    Please let me know if you need any further information.
    package com.accenture.radar.project;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    @author suvarna.chittoor
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class ProjectBean {
         private String name;
         private String description;
         private String du;
         private String saveOrUpdate;
         static DataSource dataSource;
         private Connection connection;
         private ResultSet rs;
         private ArrayList duArrayList =new ArrayList();
         private ArrayList projectArrayList =new ArrayList();
         public ProjectBean()
              try
                   //code to look up the datasource
                   InitialContext initialContext = new InitialContext();
                   dataSource = (DataSource)initialContext.lookup("jdbc/aliasforradar");
              catch(Exception e)
                   System.err.print("Error Message"+e.getMessage());
         public static Connection getConnection() throws SQLException, ClassNotFoundException
              System.err.println("In Get Connection");
              java.sql.Connection connection = null ;
              try
                   connection = dataSource.getConnection();
              catch (SQLException e)
                   System.err.println(e.getMessage());     
                   throw e;                         
              System.err.println("After getting Connection from the datasource");
              return connection;
         public void getDUInformation()throws SQLException, ClassNotFoundException
                        connection = getConnection();
                        PreparedStatement ps= connection.prepareStatement("select distinct name from du");
                        rs=ps.executeQuery();
                             while(rs.next())
                                  duArrayList.add(rs.getString("name"));
                        ps.close();
                        connection.close();
         public void saveProjectDetails() throws SQLException, ClassNotFoundException
                   Connection connection = null;
                             if(saveOrUpdate.equalsIgnoreCase("Save"))
                                  connection = getConnection();
                                  PreparedStatement ps =
                                       connection.prepareStatement(
                                            "insert into project values(?,?,?)");
                                       ps.setString(1, getName());
                                       ps.setString(2, getDescription());
                                       ps.setString(3, getDu());
                                       ps.executeUpdate();
                                       connection.close();
                                       ps.close();
                             else
                                  connection = getConnection();
                                  PreparedStatement ps =connection.prepareStatement("update project set du=?,description=? where name='"name.trim()"'");
                                  ps.setString(1,du);
                                  ps.setString(2,description);                         
                                  ps.executeUpdate();                         
                                  connection.close();
                                  ps.close();
         public void getProjectDetails() throws SQLException, ClassNotFoundException
                             Connection connection = null;
                                  connection = getConnection();
                                  PreparedStatement ps=connection.prepareStatement("select name,description,du from project");
                                  rs=ps.executeQuery();
                                       while(rs.next())
                                            Project_HelperClass proj= new Project_HelperClass();
                                            proj.setName(rs.getString("name"));
                                            proj.setDescription(rs.getString("Description"));
                                            proj.setDu(rs.getString("du"));
                                            projectArrayList.add(proj);
                                    ps.close();
                                    connection.close();
         public void getProjectInformation()
                   throws SQLException, ClassNotFoundException {
                   Connection connection = null;
                   connection = getConnection();
                   PreparedStatement ps =
                   connection.prepareStatement("select description,du from project where name='"name"'");
                   rs = ps.executeQuery();
                     while(rs.next())
                        this.description=rs.getString("description");
                        this.du=rs.getString("du");
                      connection.close();
                      ps.close();
    @return
              public String getDescription() {
                   return description;
         public void deleteProject() throws SQLException, ClassNotFoundException
             Connection connection = null;
              connection = getConnection();
              PreparedStatement ps=connection.prepareStatement("delete from sme_support where project = '"name"'");
              ps.executeUpdate();
              PreparedStatement ps1=connection.prepareStatement("delete from wbse where project = '"name"'");
              ps1.executeUpdate();
              PreparedStatement ps2=connection.prepareStatement("delete from supervisor where project = '"name"'");
              ps2.executeUpdate();
              PreparedStatement ps3=connection.prepareStatement("delete from du_lead where project = '"name"'");
              ps3.executeUpdate();
              PreparedStatement ps4=connection.prepareStatement("delete from project where name = '"name"'");
              ps4.executeUpdate();
              connection.close();
              ps.close();     
              ps1.close();
              ps2.close();
              ps3.close();
              ps4.close();          
    @return
         public String getDu() {
              return du;
    @return
              public ArrayList getDuArrayList() {
                   return duArrayList;
    @return
         public String getName() {
              return name;
    @param string
              public void setDescription(String string) {
                   description = string;
    @param string
         public void setDu(String string) {
              du = string;
    @param list
              public void setDuArrayList(ArrayList list) {
                   duArrayList = list;
    @param string
         public void setName(String string) {
              name = string;
    @return
         public ArrayList getProjectArrayList() {
              return projectArrayList;
    @param list
         public void setProjectArrayList(ArrayList list) {
              projectArrayList = list;
    @return
         public String getSaveOrUpdate() {
              return saveOrUpdate;
    @param string
         public void setSaveOrUpdate(String string) {
              saveOrUpdate = string;
    Thanks and regards
    Ratnakar reddy alwala

  • Error occured while accessing WebDynpro Application

    Hi,
    I am getting below mentioned error when i am trying to access WebDynpro application through Portal.
    Appropriate roles have been assigned to me in Portal as well Dynpro.
    What is the cause of this error message ?
    Is this something to do with Authorization or User Mapping ?
    #/System/Server#Plain###com.sap.engine.services.jmx.exception.JmxSecurityException: Caller GTMLMLF not authorized, only role adminis
    trators is allowed to access JMX#
    Pls Guide!!!
    Answers will be rewarded.
    Regards,
    Rohan

    Hi Rohan,
    Might be the user you are using is not in the Admin group.
    You can assign the user into that group using the Visual admin or
    User management by logging using the j2ee_admin user.
    Reward points if helpfull.
    Regards,
    Vamshi.

  • Anonymous access to KM documents in WebDynpro applications

    I am linking to KM documents in WebDynpro applications. This works fine for normal logged on users, but for anonymous users I am asked to login and gets eventually a "401 Unauthorized" error. I have configured everything according to note 837898 and it works fine for KM Document iViews, but not for WebDynpro iViews that are including KM documents.
    What do I have to do?
    Regards
    /Oskar

    Hi Oskar,
    when does the authentication request comes up? Directly when you open the WebDynpro iView or only after you try to open the KM document?
    In first case the Authentication Scheme for the iView must be set to Anonymous, so that opening the iview via URL ../irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fmy_pcdfolder!2fmy_iview should work fine without authentication.
    In the second case you need to make sure that the short km URLs are used as mentioned above and also the Authentication Scheme for the KM Document iView from the Hidden workset in the eu_role set to Anonymous as described in SAP Note 837898.
    If you still experience problems you can send me some screenshots.
    Hope this helps,
    Robert

  • Query regarding accessing of Webdynpro application from a non-SAP system.

    Hi,
      I have developed a webdynpro application and I want the users from non-SAP systems to access it from their browser. User will not have to enter the username and password of the SAP system. How will I achieve this? Any suggestions?

    Hi Anirban,
    you can assign a user in the service of your web dynpro application.
    Call transaction SICF and open the service to your web dynpro application.
    Within the tab "logon data" you can enter a user/password.
    You should not assign a dialoug user.
    For productive environment, have a look at all the other options like SSL
    and maybe you have to do some more configuration to make it secure!!!
    Keep in mind, that all "internet" users are working now with the same SAP user/authorization.
    Kind Regards,
    Andreas

Maybe you are looking for

  • Java mysql connectivity

    hi i m trying to connect to mysql database through java. i have mysql-java-connector jars file placed in the JAVA_HOME\jre\lib\ext directory. now when i try to run this file its starts givin me this error............... Exception in thread "main" jav

  • How to export a book made in my Minimac iPhoto to my Powerbook

    I would like to show and improve my iPhoto book with my friends (not at home). Is it possible to find the book in iPhoto library - I couldnt. Joska

  • Standard extractor to load IHPA data into BW

    Hi, Is there any standard extractor (from business content ) to load IHPA table data (Plant Partner) into SAP BW ? Thx. Radj. Edited by: Radjech Radjech on Dec 29, 2010 3:24 PM Edited by: Radjech Radjech on Dec 29, 2010 4:11 PM

  • Require MS IE 4.0 or higher...

    When I try to install Elements 2 I get this message [see below] and the setup terminate. The problem is that I've got MS IE 6 (6.0.2600.0000) installed. Is this a known bug or what? This version of Adobe Photoshop Elements requires Microsoft Internet

  • How do i connect my iphone4 to my new officejet 100 L411 printer

    how do i connect my iphone4 to my new officejet 100 L411 printer? I feel like I have been misled by buying this printer because all my reseach said that the compatibility was fine. If I cannot use bluetooth can I conact by a cable at least?