Nwdi-managed access of pcd-objects from java web dynpro

Hi,
im am trying to access portal pcd-objects from a java web dynpro component (namely getting and setting personalized iview properties). for locally managed web dynpro components this works fine with the code below.
when i try the same with a nwdi managed web dynpro component i run into problems regarding references to used dcs. for instance, i need to reference used dc SAP_JTECHS/tc/epbc/pcm/adminapi/java because the build needs tcepbcpcmadminapijava.jar which is inside the mentioned dc. but access permissions of this dc don't allow the dependency. when i try to "add used dc ..." in nwds i get the error message: illegal dependency: access list does not allow use of ...
has someone any solution for this problem? are there other ways of accessing pcd-objects from java web dynpro (nwdi managed!)?
thanks
heiko
private static void savePersonalizationData(String value) {
     try {
          IAttributeSet attributeSet = (IAttributeSet) getIview(IVIEW);
          attributeSet.putAttribute(ATTRIBUTE, value);
          attributeSet.save();
     } catch (Exception e) {
private static Object getIview(String pcdPath) throws Exception {
     Hashtable env = new Hashtable();
     env.put(
          com.sap.portal.directory.Constants.REQUESTED_ASPECT,
          com.sap.portal.pcm.admin.PcmConstants.ASPECT_SEMANTICS);
     env.put(
          Context.SECURITY_PRINCIPAL,
          WDClientUser.getCurrentUser().getSAPUser());
     env.put(
          IPcdContext.PCD_PERSONALIZATION_PRINCIPAL,
          WDClientUser.getCurrentUser().getSAPUser());
     InitialContext iCtx = new InitialContext(env);
     return iCtx.lookup(pcdPath);

Hi Kust,
To access the PCD objects the code you used looks ok for me but your main issues is related to the dc access permissions. This thread discussed about the similar issue. Please review this below thread.
/message/979328#979328 [original link is broken]
Regards
Krishna Reddy

Similar Messages

  • Append Data from Java Web Dynpro to an Internal Table in ECC

    Hi,
    Currently I am using AdaptiveRFCModels to creating/updating records from Java Web Dynbpro to FM in R/3. Users can add few records before they save the changes. The current design is Java Web Dynpro call RFC FM when user add/edit one record. The record will store in an global internal table in the Function Group. For example, I have added 3 records before I save the changes. It means that global internal table should have 3 records that I added before I save it. But in fact, the global internal table only store one record while I adding the third record. The global internal table not able to keep the previous records. The code below is how I code to execute the FM from Java Webdynpro. Is the code can work as I expected? Anything missing in the codes? Please advice. Thanks.
    wdContext.nodeZhr_abc_Input().bind((Zhr_abc_Input) model.createModelObject(Zhr_abc_Input.class));
    Zhr_abc_Input objReq = new Zhr_abc_Input();
    Zhr_Pad31 insUpdVer = new Zhr_Pad31();
    insUpdVer.setQ_Id(wdContext.currentContextElement().getQ_Id());
    insUpdVer.setZ_ce(wdContext.currentZhr_Detail_OutputElement().getZ_ce());
    objReq.addLt_Pad88(insUpdVer);
    wdContext.nodeZhr_abc_Input().bind(objReq);
    wdContext.currentZhr_abc_InputElement().modelObject().execute();

    According to your code you are setting only one record.
    You have to create 3 elements for each record and add all the three to the nodeZhr_abc_Input node.
    If I understand correctly, node currentZhr_Detail_Output is the one which is containing all the three records. Loop through this node, pick each record and set to the input node.
    wdContext.nodeZhr_abc_Input().bind((Zhr_abc_Input) model.createModelObject(Zhr_abc_Input.class));
    for(int i=0;i<wdContext.nodeZhr_Detail_Output().size();i++)
    Zhr_abc_Input objReq = new Zhr_abc_Input();
    Zhr_Pad31 insUpdVer = new Zhr_Pad31();
    insUpdVer.setQ_Id(wdContext.currentContextElement().getQ_Id());
    insUpdVer.setZ_ce(wdContext.nodeZhr_Detail_Output().getElementAt(i).getZ_ce());
    objReq.addLt_Pad88(insUpdVer);
    wdContext.nodeZhr_abc_Input().addElement(objReq); // Changed from bind to addElement
    }//for end
    wdContext.currentZhr_abc_InputElement().modelObject().execute();
    Note: I just typed the code. Syntax might be wrong here and there. Please correct it while coding.
    Regards,
    Jaya.

  • Can u access Oracle9i Reports objects from Java Code?

    Hi,
    How can you access Oracle9i Reports (Rel 2) objects like Body, DataSource, Groups etc from Java Code?
    What are the available APIs?
    I went thru the APIs at http://otn.oracle.com/products/reports/htdocs/getstart/docs/Javadocs/oracle/reports/plugin/definition/package-summary.html
    However various constructors stated in these APIs are using classes from "oracle.reports.definition" package which are difficult for me to locate.
    For eg. Report constructor is using oracle.reports.definition.RWReport and there is no API documentation available for RWReport class.
    Please suggest me the site for the above APIs or the method to get a reference to "Report" instance.
    Thanks
    Rakesh.

    Thanks Tugdual for your quick reply.
    Thats exactly what I am trying to do. I want to develop a utility which can have a subset of Report Developer's functionality.
    Currently using Reports Developer & Report Wizard, I can create a report by providing SQL statement and few parameters (like Report Style, Calculated Fields, Template file etc). I want to put all these parameters in a XML file and run my java utility (based on the APIs which I am looking for) which will use these XML parameter file and generate a '.rdf' file.
    Also, could you please suggest me the site for oracle.reports.definition package API or the way to get a reference to oracle.reports.plugin.definition.Report instance.
    Thanks,
    Rakesh

  • Unable to access PCD's role properties from Java Web Dynpro  (Access Denied

    Using the IPcdContext to access the portal roles does not produce the required list of roles due to the following error
    Access denied (Object) .....
    This occurs once I try to use the lookup() method
    I have tried security zones, adding sharingReferences and permission, but no luck.
    I have searched the SDN but again whatever I found still gave the same result. I now think that it's a configuration settings rather than code.
    Sample code
    Hashtable env = new Hashtable();
    env.put(Context.SECURITY_PRINCIPAL, strCurrentUser);
      env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
      //DirContext ictx = new javax.naming.directory.InitialDirContext(env);
    // InitialDirContext     ictx = new InitialDirContext(env);
      InitialContext ictx = new InitialContext(env);
      lookupObject = "portal_content";
      IPcdContext myPcdContext =      (IPcdContext) ictx.lookup(lookupObject);
    Any suggestion will be appreciated

    Rob,
    The only thing I see different as per this [document |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401]  is following line of codes. Check if adding it resolves the issue:
    env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
    lookupObject = "pcd:portal_content/"
    ... note the /
    Chintan

  • Cannot Acccess Applet Object from Java Script

    Hi,
    I am using jRE1.5, and Kava Chart Applets. Those applet jars are compiled in jdk 1.5 version. I have created one jsp where I used ,<applet> tag. The problem is when ever I am going to access the applet object from java script it is not returning the actual java applet object, when put an alert message it shows [object]. So i am not able to access the methods or the applet class.and also the screen gets hung, nothing is coming.It get stuck at the point where i tried to access the applet method like document.getElementById(applet_id).<<<some method of the applet class>>.Also it is not showing any kind of javascript error or Applet class exceptions.
    But the strange thing is, when i use jdk 1.6, the page is running fine.Also when i try to print the applet object from javascript it is showing the proper class name.
    Please help me solving the problem.

    A number of changes and improvements were made between 1.5 and 1.6 - the entire plugin is new. You need to change to 1.6, as 1.5 goes EOL about November this year and future changes to this area in 1.5 are unlikely.

  • Connecting to R/3 System through Java Web Dynpro forms.

    Hi,
    I have a requirement in which I have to send data to R/3
    from Java Web Dynpro screens.
    I will design the Java Web Dynpro screens and write a RFC Model.
    I will write a RFC in se37 which will connect to the RFC Model.
    Before creating the RFC in se37, I will create ztables in se11.
    I will write a ABAP Report to see that all data enters the ztables.
    I need some guidance with regard to this.
    Do, the RFC Model have the access of the ECC(R/3) System.
    What are tasks to be told the Basis guy so, that RFC being called from through Java Web Dynpro?
    Please provide me some documents with regards to this scenario.
    Regards
    Neha Singh

    Hi Neha,
    The steps you provided is clear enough to connect to a R/3 system through the WD forms.
    On creating the model you need to give two inputs such as
    logical system name for model instance
    logical system name for RFC metadata
    there will be 2 default values, also you can create your own JCOs in the <servername>:<port>/devinf of the server or u can ask your basis team also.
    Before creating the JCO , the SLD (System Landscape Directory) needs to be configures, that your basis team will know.
    other than that once you create the functional module in se37 make it RFC enabled , and once you import the RFC model , you can give your ECC system user name and password and search for RFC you have created from the list of RFC.
    Regards,
    Sam Charles J.

  • Call smartforms via java web dynpro

    Hi,
    We was created payslip in R3 smartforms in PDF format. How can I call the PDF file from java web dynpro?
    Regards,
    Eric

    Hi,
       Check [this|http://****************/Tutorials/Smartforms/SFinEPasPDF/Page1.htm] link.
    Regards,
    Satyajit.

  • Accessing the Binding Layer from Java

    Dear All
    How can i Accessing the Binding Layer from Java code i need details document for it becuase i have complex binding object (object inside object)
    Regards
    Mohd.Weshah

    i know but my case is complicated :
    Dear All
    i have generate a human task based task flow and i create a page with payload object . i have an empiterator whcih include the following attributes :
    - id
    - name
    - telephone
    - department (Complex object) it include another attributes - dept and dept Name
    my question i want to fill the empiterator by java code and fill all attributes including complex object (department ) from java code (my backing bean). \
    you can download a document that describe my problems by images and details :
    [http://www.4shared.com/account/document/fTREP1mv/ADF_Question__2_.html]
    Regards
    Wish79

  • How register COM object from java?

    Hi!
    In my user home directory I have myCOM.dll. My sign applet use this myCOM.dll. But before use this dll I must register it (by use regsvr32).When myCOM.dll will be success register my applet can work. The problem is that I can not get answer from regsvr3 (is myCOM.dll are successed registered or not, or is user has a grants to register COM object and so on.)
    Again, my java applet can work ONLY when myCOM.dll is registered.
    How I can register myCOM.dll from java applet and if registered is not success exit from java applet?

    I must not have been clear. I am not asking how to access a COM object using Java, we already have tools to do that.
    The question is whether there is a way to define a COM interface using Java. I want to code my COM object in Java. Right now we are using PowerBuilder to code COM objects. I would rather use Java.

  • Access file object from flex web app

    Hi all,
    I want to access file object from flex web app. What should i do?
    I have to take array from my XML. In XML there will be only dir path. So for taking file name from dir i have to access it and have to perform for loop on that dir.
    What should I do?
    Any Ideas?
    Thanks,
    -CK

    Hi Michael
    My question is that I dont want to give name of images in XML file.
    In XML file there will be only path of image directory. So I need to find all image name from that image directory.
    Thats why I want to access file object.
    Any ideas?    

  • Returning objects from Java stored procedures

    I need to pass an object from Java to a Java SP which updates the object and returns the object back. The Java SP will be calling a PL/SQL procedure which returns some nested tables that I want to stick into the passed object.
    I tried using "IN OUT" for the object in the call spec but got an error that it was not "appropriate for the parameter". So, the next option seems to be to pass it in and then return it from the Java SP. I'm just wondering though what the the best approach for accomplishing this? I've looked through some of the sample code on the OTN but haven't found anything yet that really helps.

    I am trying to use custom object classes. I have setup a type map for the connection and my custom class implements SQLData. Yet, when my client tries to call the Java SP, it gets ORA-00932 complaining of inconsistent data types (expected IN conversion failed).
    I turned on some debug info (i.e. oracle.jdbc.sql=true) but it didn't provide any useful info in regards to why I'm getting this error. Unfortunately, the JDBC Developer's Guide does not provide full examples of the code.

  • Calling inactive version of ABAP object from Java

    Hello,
    When I call an ABAP object from Java Program which version of ABAP object is called inactive or active ?
    Is there a mechanism to call the current inactive version or any other previous inactive /active versions ?
    Regards,
    Tarun

    Only the "active" version of ABAP code is active and runnable.
    You cannot run inactive versions. Like you have to compile a .java file to a .class file o make it runnable in the JVM.

  • Need coding support for Accessing MYSQL stored procedure from java

    Hi every one,
    I need coding support for accessing Mysql stored procedure from java and JSP.
    Please help me
    pranav

    You'd better have a recent version of MySQL, because earlier ones didn't support stored procs.
    If your MySQL and driver support stored procs, maybe you just need a JDBC stored proc tutorial.
    %

  • Calling java web dynpro from ABAP

    Hi!!
    I have a double problem!
    First I want to call a java web dynpro application from ABAP. I managed to do it using :
    call method cl_gui_frontend_services=>execute
      exporting
        document = url
      exceptions
        others   = 1.
    Where url is the java application url with parameters. It's working...
    ...but here comes the second problem : i need SSO So first solution is not sufficent.
    Can anybody help?

    Ok looking for the solution i figure out that it won't be possible anyway, i need a first log to the portal in order to issue a logon ticket before any attempt of SSO authentication.

  • Sending java web dynpro interactive form as pdf attachment from Business WF

    Hi,
    I have a java web dynpro application with interactive form(online), on send button click i need to send the filled form as an PDF attchment to internet mail id. I am using SO_NEW_DOCUMENT_ATT_SEND_API1 inside workflow to send attachment. My custom RFC which is interacting with WD app is getting the pdf source context attribute(simply i set the import parameter with that attribute and no juggling is done) as import parameter which  is of type XTSRING. Once i execute the application i am getting mail with attachment as pdf but i am not able to open the pdf. It is of just 1 KB size. It seems my pdf source context attribute is not sending data. Can some one suggest how can i solve this.DO i need to convert the data to pdf format before sending or any otgher thing i need to do.
    Regards
    Ravindra

    I did that before posting the question itself (enables = false), it doesn't work. It just disable the extra features like digital signature and stuff.  Interesting thing is all our HCM forms developed for HR actions works fine with out any issues. Why the interactive form developed with WDJ is not working and it requires credentials??. The same form works fine if I deploy the application directly into server but it throws the error if I check in through NWDI ..
    If you look at the server location it has the file but it throws the error:
    Caused by: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: IOException occured while creating template stream from the TemplateSource : .\temp\webdynpro\public\sap.com\ess~ben\webdynpro\Components\com.sap.xss.hr.ben.reviewtable.VcBenefitsReviewTable\ReviewTableView_InteractiveForm_Review.xdp (The system cannot find the file specified)
    Please advise.
    Thank You,
    Hari.

Maybe you are looking for