Accessing Km document in webdynpro application

Hi All,
Is it possible to access the file which is uploaded in KM through webdynpro code?
Can anybody help in this?
Regards,
V Karthi

Thank you anagha for the link.
But i'm facing some issue with the code .i think there is a problem in typecasting the Iuser and moreover whn i try to print the sap user i'm getting the following error.
"sapUser Transient data: *************************************************************************** * com.sap.security.core.persistence.imp.PrincipalDatabag Tue Jun 23 10:13:29 GMT05:30 2009 * UniqueID: USER.R3_DATASOURCE.J2EE_GUEST * Type: USER * Home data source: R3_DATASOURCE * Private id part: J2EE_GUEST * * Existence not checked. * * "com.sap.security.core.usermanagement"|->"j_authscheme" (no time limit)="anonymous" *************************************************************************** Persistent data: *************************************************************************** * com.sap.security.core.persistence.imp.PrincipalDatabag Tue Jun 23 10:13:29 GMT05:30 2009 * UniqueID: USER.R3_DATASOURCE.J2EE_GUEST * Type: USER * Home data source: R3_DATASOURCE * Private id part: J2EE_GUEST * * Principal exists. * * Direct parents: * GRUP: GRUP.SUPER_GROUPS_DATASOURCE.EVERYONE *       GRUP.R3_ROLE_DS.SAP_J2EE_GUEST *       GRUP.SUPER_GROUPS_DATASOURCE.Anonymous Users * ROLE: * "com.sap.portal.dsm"|->"DebugControlFlag" (no time limit)= * "com.sap.security.core.usermanagement"|->"mobile" (no time limit)= * "com.sap.security.core.usermanagement"|->"uniquename" (no time limit)="J2EE_GUEST" * "com.sap.security.core.usermanagement"|->"title" (no time limit)= * "com.sap.security.core.usermanagement"|->"telephone" (no time limit)= * "com.sap.security.core.usermanagement"|->"salutation" (no time limit)= * "com.sap.security.core.usermanagement"|->"jobtitle" (no time limit)= * "com.sap.security.core.usermanagement"|->"fax" (no time limit)= * "com.sap.security.core.usermanagement"|->"department" (no time limit)= * "com.sap.security.core.usermanagement"|->"lastname" (no time limit)="J2EE_GUEST" * "com.sap.security.core.usermanagement"|->"locale" (no time limit)= * "com.sap.security.core.usermanagement"|->"timezone" (no time limit)= * "com.sap.security.core.usermanagement"|->"firstname" (no time limit)= * "com.sap.security.core.usermanagement"|->"email" (no time limit)= * "com.sap.security.core.usermanagement"|->"referenceuser" (no time limit)= * "$serviceUser$"|->"SERVICEUSER_ATTRIBUTE" (no time limit)= * "com.sapportals.portal.navigation"|->"uipmode" (no time limit)= *************************************************************************** ep5User WPUser default_namespace: com.sap.security.core.usermanagement [email protected]f WPUser: (J2EE_GUEST)[[email protected]271] UME user object Transient data: *************************************************************************** * com.sap.security.core.persistence.imp.PrincipalDatabag Tue Jun 23 10:13:29 GMT+05:30 2009 * UniqueID: USER.R3_DATASOURCE.J2EE_GUEST * Type: USER * Home data source: R3_DATASOURCE * Private id part: J2EE_GUEST * * Existence not checked. * * "com.sap.security.core.usermanagement"|->"j_authscheme" (no time limit)="anonymous" "
Can you please provide me the sample code for accessing the KM document through webdynpro?
Regards,
V Karthi

Similar Messages

  • 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

  • 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>Preferences>Java>Code Generation>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

  • Saving a document using webdynpro application

    Dear All,
    I am new in webdynpro development and I have a requirement to develop a webdynpro application which can save a document in a specified file directory. Can somebody please suggest or give sample code as to how to develope this application ...so that i can understand how to go about it.
    Awaiting response.
    Thank You.
    Ranu

    Dear Suresh,
    Thank you very much for your helpful answer.I have rectified the imports. Now the only error that is still persistent is "fname cannot be resolved ".
    I am attaching the code snippet that I have written in the part onActionSave for your perusal.Can you please look into it and let me know where I am making a mistake.
    public void onActionSave(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSave(ServerEvent)
              byte imgsource[] = wdContext.currentDataElement().getDocument();
              String filePath = wdContext.currentDataElement().getFileName();
              byte[] fileBytes; //an array of bytes
              try {
                   File files = new File(filePath);
                   fname = files.getName();
                   final InitialContext ctx1 = new InitialContext();
                   final DestinationService dstService1 = (DestinationService)ctx1.lookup(DestinationService.JNDI_KEY);
                   final Destination destination1 = dstService1.getDestination("HTTP", "document");
                   //specify the Http destination as document
                   fileBytes = imgsource; //create a byte array from contents of field
                   String docuurl = "http://impp11.pune.telco.co.in:50000/irj/portal/+fname";
                   OutputStream targetFile = new FileOutputStream(docuurl);
                   //define the output stream
                   targetFile.write(fileBytes); //write the array of bytes to file
                   targetFile.close(); //close the File stream
              } catch (Exception e) {
                   e.printStackTrace();
                   wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
    Thank You.
    Ranu

  • Appraisal documents with Webdynpro application

    Hi All,
    in my system i can see some of the webdynpro application for appraisals
    e.g.
    HAP_START_PAGE_UI  with application hap_a_ess_start_page
    HAP_DOCUMENT_LINK with application hap_document_link
    etc..
    but when i am trying to run the application i am getting the error message
    Error when inserting or changing in a sorted table
    I have already created the appraisal template and all and those are running with the hap_document_pa BSP application.
    I just have the requirement of look and feel changes so i want to check this out.
    Regards,
    Umesh Chaudhari.

    Hi,
    An objective setting cycle encompasses the following phases:
    Planning
    In a planning consultation, the necessary qualifications and competencies are first identified for an employee and then concrete objectives and required performance levels are agreed. For example, sales targets could be defined and the employee could agree to take on specific tasks in a project, and so on. These aspects can be defined by the manager, by the employee or both. The employeeu2019s personal training and development requirements are discussed and entered in the objective setting agreement.
    Review
    During the review, the objectives agreed with the employee during the planning phase are checked and adjusted to reflect the current situation. The manager and employee discuss the possible need for support, establish whether the objectives defined in the planning phase are still relevant, and add further objectives or decide to delete obsolete ones. Furthermore, the manager can make comparisons between the objectives set previously and the employeeu2019s current performance.
    Appraisal
    During the appraisal, the manager and employee discuss the extent to which the employee has fulfilled the set objectives. They check and assess the employeeu2019s overall performance and the implementation of concrete set objectives. Any further training requirements or an overfulfillment of the objectives are identified in the different areas. The appraisal document is completed when the manager and employee agree on an valuation. As soon as the appraisal document is saved in the system as Completed or Approved, the employeeu2019s compensation can be adjusted automatically and the employeeu2019s qualifications profile can be updated
    Get the proper information from following .
    https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=53773.

  • Upload / Download document to KM Content Server from WebDynpro Application

    I have a requirement where I need to upload / download document into / from KM Content Server from my WebDynpro Application.
    Is it technically possible and if Yes, can I get any Sample code for this.

    Hi Tahzeeb,
    first of all i would point you to the JavaDocs for KMC API.
    https://media.sdn.sap.com/javadocs/NW04/SPS15/km/index.html
    And here is a small example of reading and storing KM resources.
    For reading:
         * Returns a resource as an InputStream from the KM repository
         * at the given path. The IUser is needed for authorization.
         * @param user      IUser for checking authorisation.
         * @param resPath   Path to the KM resource.
         * @return          Requested resource as a stream.
        private InputStream getKmResource(final IUser user, final String resPath)
            throws ResourceAccessException {
            try {
                final IResourceFactory factory = ResourceFactory.getInstance();
                final RID rid = RID.getRID(resPath);
                final IResource kmResource =
                    factory.getResource(
                        rid,
                        new ResourceContext(getDeprecatedIUser(user)));
                if (kmResource == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                return kmResource.getContent().getInputStream();
            catch (WcmException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
    And for writing:
         * Stores a resource in the KM repository at the given path with the given name and mimetype.
         * Content is taken from the given inputstream.
         * @param user          IUser for checking authorisation.
         * @param resName   Name of the resource
         * @param resPath     Path to the resource
         * @param mimeType MimeType of the resource
         * @param inputStream  Resource content
         * @throws ResourceAccessException
        private void putKmResource(
            final IUser user,
            final String resName,
            final String resPath,
            final String mimeType,
            final InputStream inputStream)
            throws ResourceAccessException {
            try {
                final ResourceContext rContext = new ResourceContext(getDeprecatedIUser(user));
                final RID rid = RID.getRID(resPath);
                final ICollection kmCollection =
                    (ICollection) ResourceFactory.getInstance().getResource(rid, rContext);
                if (kmCollection == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                else {
                    IContent kmContent = new Content(inputStream, mimeType, -1);
                    IResource kmResource = kmCollection.createResource(resName, null, kmContent);
            catch (ResourceException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
            finally {
                try {
                    inputStream.close();
                catch (IOException e1) {
                    throw new ResourceAccessException("Error closing InputStream when accessing " + resPath, e1, resPath);
    Hope that helps for a start.
    Best regards,
      ok

  • 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 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 ABAP table in Webdynpro Java application

    Hi All
    Is it possible to access ABAP table in Webdynpro Java application
    Please provide your input
    Thanks
    Karthi D.

    Hi you will connect to the remote SAP system, the
    backend, using an Adaptive RFC MOdel. To access database tables, you can make use of existing functions in terms of RFC function modules. For each function module you need, the system generates a corresponding Java proxy class. All the generated proxy classes and interface are bundled together in the RFC model and treated as part
    of your Web Dynpro project
    In WebDynpro java you RFC by using Model :
    Adaptive RFC Model
    1. automatically adapts to changes in function module signature
    2 provides support for data types and extensibility
    3.support for different structure definitions in different backend
    systems (release dependent structures, custom adaptation)
    Basic principles and guidelines
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
    See this blog
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
    http://help.sap.com/saphelp_nw04s/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm
    Thanks,
    Tulasi

  • 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

  • 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 knowledge management documents using webdynpro for java

    Dear all,
    iam having some documnets in KNLOWLEDGE MANAGEMENT documents folder in portal using webdynpro for java clicking on a link means perner(employee no) i should get that perpicular employee number documents.
    examples documents are stored like this in knowledege management folder 20016319.pdf  ,  20016397.pdf  ,  20016398.
    how to access those employee using webdynpro for java for perticular employee number if i want 20016319
    Send me the code for above requirement and where i have to wrirte that code exactly
    Regards

    Dear Kishore,
    To get the Employee ID you have to create a Adaptive RFC Model (call BAPI) which will return you the employee pernr, for this
    1. Create a model using  : BAPI_EMPLOYEE_GETDATA
    2. Get User ID using the code
    public java.lang.String getUserID( )
        //@@begin getUserID()
         String userID = new String();
              try
                    // getting Logged in userid
                   IWDClientUser myUser = WDClientUser.getCurrentUser();
                   userID = myUser.toString().substring(19).trim();
                   StringTokenizer filterdUID = new StringTokenizer(userID,")");
                   userID = filterdUID.nextToken();
              catch (WDUMException e)
                   e.printStackTrace();
                   return userID;
        //@@end
    3. Execute the BAPI
    public java.lang.String getEmployeeID( java.lang.String userID )
        //@@begin getEmployeeID()
         String employeeID = new String();
              Bapi_Employee_Getdata_Input employeeData = new Bapi_Employee_Getdata_Input();
              Bapi_Employee_Getdata_Output outData = new Bapi_Employee_Getdata_Output();
              Bapip0105B comm = new Bapip0105B();
              com.sap.aii.proxy.framework.core.AbstractList list = new Bapip0105B.Bapip0105B_List();
              list.add(comm);
              employeeData.setUserid(userID);
              Calendar cal = Calendar.getInstance(Locale.UK);
              Date date = new Date(cal.getTimeInMillis());
              employeeData.setDate(date);
              employeeData.setAuthority_Check("");
              employeeData.setCommunication(list);
              outData.addCommunication(comm);
              wdContext.nodeBapi_Employee_Getdata_Input().bind(employeeData);
              wdContext.nodeOutput_BAPI().bind(outData);
            try
                   wdContext.nodeBapi_Employee_Getdata_Input().currentBapi_Employee_Getdata_InputElement().modelObject().execute();
                   wdContext.nodeOutput_BAPI().invalidate();
            catch (WDDynamicRFCExecuteException e) {printMsg("Failed to Obtain Employee Data");
                 e.printStackTrace();
            employeeID = wdContext.nodeBapi_Employee_Getdata_Input().nodeOutput_BAPI().nodeOrg_Assignment().currentOrg_AssignmentElement().getPerno();
            return employeeID;
        //@@end
    Hope it Helps!!
    Warm Regards
    Upendra Agrawal

  • 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.

  • 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

Maybe you are looking for

  • Payment Term (include Material exclude Unplanned Freight)?

    Hi all, The business has requested a Payment Term 0123 that can be used in MIRO to include a discount % on the material price but exclude the discount from the unplanned freight entered on the invoice.  They want a 10% discount on the material with n

  • Mouse clicks when hands on handrests

    so i dont know if this is normal or what, but if my hands are on the handrests (not touching the trackpad) then the mouse gets clicked.... its fine if my hands are barely touching it but any pressure at all and the mouse clicks... very annoying when

  • Unable to Create G/L Account Number in G/L Group

    Hi Experts, We are not able to create G/L Account NO. While creating Account Number in FS00 TCode, I have selected one of the created Account group and gave the Account Number which falls under that Account group range. Still i am not able to create

  • How do I access my backed up photo library?

    I want to see my photo library backup. I have delete the original photos from my phone, how do I access the backup?

  • Need to set the Vissible row count Dynamically

    Hi,    I have requirement where i am supposed to set the Vissible row count for a table dynmaically, depending upon the number of rows in a table.