Reading iview personalization language in Web Dynpro java

HI
How can i read Iview personalization language in webdynpro java netweaver 7 enviroement?
WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-locale") is deprecated it seems.
regards
PG

Hi Pranav,
In that case why dont you try to use the PCD API to access iView properties
Check this link:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/314ae7a5-0c01-0010-c198-9c7c5e8cee46
/people/daniel.wroblewski/blog/2006/08/15/pcd-ii-creating-portal-objects
You would require following jars for accessing PCD data:
com.sap.portal.usermanagementapi.jar,
com.sap.portal.pcd.glserviceapi.jar,
com.sap.portal.ivs.api_iview_api.jar
This thread contains the links for accessig the PCD content properties. Please check this as well:
iView Properties
I hope this solves the issue.
Thanks and Regards,
Pravesh

Similar Messages

  • Problem: Changing Language for Web Dynpro Java within NW Portal (i18n)

    Hi Experts out there,
    I hope all you had a nice Christmas and a big New Years Eve :)!!!
    i got a challenge for you about WD Java and internationalization (i18n)
    Here is the scenario:
    We are using a SAP NetWeaver Portal 7.0 and my task is to implement some smaller Web Dynpro  Applications.
    These Applications must be i18n conform, so i just created (according to the corresponding WD Java tutorial) some ".xlf" files.
    Okay...Everything is working fine. The user can log at the portal and the application is displayed in his language, which is "english" or "german". (the application is just a simple form)
    So far so good...Now here comes the point where it's getting tricky...
    When the user wants to change his assigned language (of the portal user) he can use the "personalize" button in the Masthead (-> change portal language). All the portal content should now be displayed in his new chosen language.
    For example the user is logged into the portal with "german" as portal language and now changes his languages settings into "english". After this everything in the portal (navigation, portal iViews ) is displayed in the changed language (from english into german) ...
    BUT: my Web Dynpro  Java Application stays as the original languages setting was. That means the whole portal is now english, but my WD Java Appl. stays german .
    Only if the user logs of and logs in again, the WD Java Appl. is displayed in the corresponding portal language...
    VERY Strange?!?!
    Can anybody give me a hint how to solve this problem?
    I guess i have to re-initiate the Web Dynpro  Application some how ...(like killing the application and restarting it ...) but is just a "weak guess"...
    Any Help / Hint is more than welcome !!!
    Cheers
    Stefan

    Hi Stefan,
    This correct see SAP Note [947081|https://service.sap.com/sap/support/notes/947081]
    If the locale for the Web Dynpro iView is changed in the portal (through portal personalization), this is not reflected in the running login session. The user needs to logoff and login again, in order to see the locale change in the Web Dynpro iView.
    Regards,
    Leo

  • IView Personalization (Web Dynpro Java) for Anonymous User

    Hello All,
    Is it possible for anonymous user to see iView personalization (Web Dynpro Java) when personalized by an administrator?  What I did was create new role and iView making available to anonymous user.  This work fine meaning I can view iView using URL http://<servername>:<port>/irj/portal/anonymous .  But the personalization I made to iView using administrator mode launching iView in preview mode and then using personalization dialog by choosing Ctrl and secondary mouse button to personalize is not showing.  Iu2019m currently on EP7 SP15 and using iView type Web Dynpro Java for the development component sap.com/tcsecumewdenduser application name LogonHelpApp.  
    Any help is very much appreciated.
    Many Thanks,
    Gary

    Hello Michael,
    Yes, the Web Dynpro  for Java Personalization is working perfect for non-anonymous users.  The issue is when I view same iView using anonymous URL http://<servername>:<port>/irj/portal/anonymous the personalization is not showing just defaults back to the original Web Dynpro Java application settings.  The iView that I created and personalized is the new Logon Help Dynpro Java application (LogonHelpApp).  Is there some permissions that restricts anonymous user to view personalization?
    Koti Reddy Iu2019m using the Web Dynpro for Java Administrator Personalization.  Here is the documentation [http://help.sap.com/saphelp_nw70/helpdata/en/42/ed3ce7f8593eebe10000000a1553f7/frameset.htm |http://help.sap.com/saphelp_nw70/helpdata/en/42/ed3ce7f8593eebe10000000a1553f7/frameset.htm ]
    Thank You for your help,
    Gary

  • Make custom Web Dynpro java iView properties

    Hi All,
    Please guide me as to creation of custom Web Dynpro java iView properties in NW 04s .
    I have already gone through the music box example but  still have doubts .
    ANy pointers?
    Regards
    Radhika Kuthiala
    Edited by: Radhika Kuthiala on Dec 13, 2011 9:49 PM

    I don't think this can be done since WDJ apps can also run standalone (not in a portal)

  • Reading contents of uploaded excel file in web dynpro java

    Hi All.
    I am aware how to provide facility to upload files in web dynpro java. But my requirement is that on uploading a particular file (for eg. an excel file having 10 columns), I need to read the contents of that file and store it in a table in R/3.Can anyone suggest a way how I can read the contents of the uploaded file?
    Thanks and Regards,
    Saurabh.

    Hi.
    I am having the following requirement : I have a FileUpload UI element where user clicks Browse button, selects a file from the local system and presses a Upload button. Upon pressing Upload, the name of the selected file and the contents of the file should be shown.
    In the View context, I have two value attributes: FileName of type String and FileResource of type binary.
    This is the code that I have in the Upload button action handler :
      public void onActionUpload(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload(ServerEvent)
        IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(
                 IPrivateReadExcelView.IContextElement.FILE_RESOURCE);
        IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)attributeInfo.
                 getModifiableSimpleType();
        IPrivateReadExcelView.IContextElement element = wdContext.createContextElement();
        String fname = binaryType.getFileName();
        wdComponentAPI.getMessageManager().reportSuccess("File selected - "+fname);  //Statement 1
         try {
              wdComponentAPI.getMessageManager().reportSuccess("Successful");    // Statement 2
              InputStream in = new FileInputStream(fname);
              HSSFWorkbook wb = new HSSFWorkbook(in);
              wdComponentAPI.getMessageManager().reportSuccess("Successful");    //Statement 3
              int sheetsNo = wb.getNumberOfSheets();
              for (int i=0;i<sheetsNo;i++) {
                   HSSFSheet sheet = wb.getSheetAt(i);
                   Iterator rowsNo = sheet.rowIterator();
                   while(rowsNo.hasNext()) {
                        HSSFRow rows = (HSSFRow)rowsNo.next();
                        Iterator colsNo = rows.cellIterator();
                        while(colsNo.hasNext()) {
                             HSSFCell cell = (HSSFCell)colsNo.next();
                             wdComponentAPI.getMessageManager().reportSuccess("File uploaded" +
                                  "successfully");
                             if(cell.getCellType()==1) {
                                  wdComponentAPI.getMessageManager().reportSuccess("00000"+
                                       cell.getStringCellValue());
                             else if(cell.getCellType()==0) {
                                  String str=""+cell.getNumericCellValue();
                                  wdComponentAPI.getMessageManager().reportSuccess("11111"+str);
         catch(Exception e) { wdComponentAPI.getMessageManager().raisePendingException();
        //@@end
    On pressing Upload button, name of selected file is being shown(Statement 1). I am also getting Statement 2 in the output. However I am not getting Statement 3 onwards.
    Where am I going wrong? Can anyone shed some light on this?

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • Portal Eventing between Web DynPro Java iView and non-Web DynPro iView

    Dear Experts,
    I have 1 Web DynPro Java iView and 1 non-Web DynPro (using JSPDynPage and JSP) iView, both attached to a page. When Web DynPro Java iView fire a portal raise event, the portal iView did not execute the javascript function tied to the event subscribed.
    Here is the code snippet which reside in the Web DynPro Java iView that is used to fire the event
    String param = "test";
    WPortalEventing.fire("urn:com.company.Test1", "TestEvent", param);
    This the code snippet that is in the jsp page
    function notifyTest(param)
         // Code to print param value here
    EPCM.subscribeEvent("urn:com.company.Test1", "TestEvent", notifyTest);
    Note:
    1. When Web DynPro Java iView fire the portal event the entire page is refreshed, including the non-WDP iView.
    2. When EPCM is replaced with window.top.EPCM, the page is refreshed, it is totally hanged with progress bar.
    Can anyone help to solve this problem?

    hi
    Please write the below code snippet in ur jsp for notifyTestjavascriptfunction
    function notifyTest( eventObj ) {
         eventParameter=eventObj.dataObject;
         // code to print the parameter "eventParameter"
    Thanks
    Harsimran

  • Controlling visibility of Web Dynpro Java iView in portal WDJ page

    I should be able to use the WDPortalUtils interface in my Web Dynpro Java DC application to get the name of the iView in my Portal WDJ page using IWDPageService method getVisibleIViews(). My intent is to add another iView to this page and programmatically control the visibility of each iView from my WDJ application.
    -> Instructions I have found through my online research indicate I should not have to specify a sharing reference because I am using the WDJ framework, but I tried it anyway. It didn't work.
    -> I have added DC epbc.prtapi._api public part to my used DC's, and specified dependency at both Build time and Run time.
    -> My portal page template is of type Web Dynpro Proxy Page.
    -> My iView template is of type Web Dynpro Proxy iView.
    -> The Page Content view of my page shows the 'visible' checkbox set for my iView.
    The following statements in the wdDoInit() method of my DC's view controller should return the portal name of my iView:
    IWDPageService pageService = (IWDPageService) WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);
    String[] iViews = pageService.getVisibleIViews();
    I get no compile time errors or runtime errors when I execute these statements.
    BUT...
    Instead of a String array, I get back a memory space pointer.
    Example: [Ljava.lang.String;@664e664e
    What am I missing?

    Hi Jennifer,
    That's what this forum is all about; finding solutions to hard-to-solve issues, which might also help someone who may face the same issue in the future. So I hope my input is valuable
    The last thing I can think of is the method is been called before the portal page has been rendered completely, which may lead to the faulty results.
    Is it possible to move the getVisibleIviews() to a method which is called later in the phase (for instance, at the bottom of wdDoModify or wdDoPostProcessing) or, even better, in an onAction event handler when a button is clicked?
    If this doesn't work I'm afraid I'm running out of options and i would file an OSS message with SAP
    Hope this helps!
    Robin

  • Synchronization in Web Dynpro JAVA

    Hi All,
    I have a Web Dynpro JAVA application, for which an iView has been created and is assigned to a role. Now I have the below requirement,
    If two users tries to access this application at the same time then the second user has to get a message stating that "A user is already accessing this application please try later". Basically the thread concept. Is it possible to achieve this in Web Dynpro JAVA. If yes please provide me some pointers on how to achieve this.
    Thanks & Regards,
    Vishweshwara

    Hi Vishweshwara,
    Create the Custum table with UserID fields.
    Create the RFC with UserID fields as input parameters and result  field as export parameter.
    Write the logic in RFC if Custum table contains any value in UserID Field then return error message like " This application is already using by  <UserID>"
    else
    stor the values UserID and LoginStatus(which you are sending from Webdynpr java app) in custom table and  return success message.
    Create webdynpro java component and create two iview called main and info view
    import the RFC in webdynpro java app and do the binding from model to component controller and component controller to view controller of main.
    Write the following code in wdDoInit() method of main view to get the login userid and sending that to RFC.
    String userID = null;
    IWDClientUser clientUser = WDClientUser.getCurrentUser();
    IUser User = clientUser.getSAPUser();
    if (User != null)
    try
    IUserAccount[] acct = User.getUserAccounts();
    if(acct[0] != null)
    userID = acct[0].getLogonUid();
    wdContext.current<RFCNodeName>Element().setUserID(userID);
    catch(UMException e)
    //Raise some error msg according to your scenario.
    //code for calling the RFC
    wdThis.wdGet<ComponentControllerName>().execute();
    String msg = wdContext.current<OutputNodeName>Element().getResult();
    if(msg != null && msg.lenght() !=0)
        if(msg.equalsIgnoreCase("This application is already using by  <UserID>")
              wdThis.wdFirPlug<PlugName>();// code for naivigate from main view to info view
    the navigation between main view to info view needs to defined in navigation moduler area.
    if you foolow the above specified way u can achive your requerment.
    Revert back if you any quaries.
    Thanks & Regards,
    bhargava.

  • KM Permissions in Web Dynpro Java

    The error message: "Permission denied: uri=/kmfolder,
    permission=node_create_child, user=XXXXXX"
    Background:
    We are using a KM Windows repository to connect KM to a Windows shared
    folder over the network. Then we are using a Web Dynpro java
    application to write a file to the KM Folder, which is then mapped to
    that KM Windows repository.
    Security on the Windows shared folder is wide open. Everyone=Full
    Control, and Domain Users=Full control.
    Problem:
    When end users try to write the file to KM through the Web Dynpro app,
    they get the error:
    "Permission denied: uri=/kmfolder, permission=node_create_child,
    user=XXXXXX"
    But when we give them the Content Admin role, they are able to write
    the file just fine. For this reason, I do not believe there is a
    Windows permission issue.
    We have tried:
    -Explicitly setting User Mapping through User Admin -> Identity
    Management
    -Using a System Principle role with Full Access (Read, write, delete)
    -Duplicating the Content Admin role, removing the pages & iViews (so
    they can't view the Content Admin interface) and assigning this role to
    our test users.
    We have setup:
    Network path
    - ->jCIFS=True
    - ->Network path=
    <serv.host.com>\<sharename>
    - ->User=<domain>\<ADMIN User>
    KM Windows System Object
    - ->User Mapping=admin,user
    KM Windows System Landscape Definition
    CM Repository Manager
    - ->Prefix=/<sharename>
    - ->Persistance Mode=fsdb
    - ->Root directory=
    <serv.host.com>\<sharename>\root
    - ->Root directory for versions=
    <serv.host.com>\<sharename>\versions
    - ->Repository services=svc_acl
    - ->Security Manager=W2kSecurityManager
    - ->ACL Manager Cache=ca_rsrc_acl
    Edited by: Peter Speers on Apr 9, 2009 11:41 PM

    /thread/1302951 [original link is broken]

  • Enhancements / Modifications in Web Dynpro Java

    Hi, all!
    I' ve a more general question: Are there any enhancement concepts for Web Dynpro Java available or at least planned that would give developers the same comfort and possibilities ABAP programmers have?
    I mean, will there ever be an Enhancement Framework like in ABAP - modification free enhancements via BADIs or customer exits?
    Think of one of SAPs WDJ flagship - the ESS/MSS. If you want to change anything within, you have no other possibility but to modify the sources. Considering this - together with the weak possibilities of backend access via JCo - I give the WDJ not a chance to stand the challenge of WD4A.
    Regards,
    Thomas

    Hi!
    I' m just going through the hep-pages, but what I can definitly say by now is that there' s no enhancement-concept in sight. This matter is getting kind of really embarrassing and leaves the question open: What the heck should an SAP customer persuade to focus on Java Development? No enhancements, no direct data access, no easy debugging possibilities like in ABAP.
    I' ve started with WDJ, but digging deeper into WD4A I' m getting more and more convinced that the whole Java thing was just something like a playground field for the development of the programming model and is now getting more and more obsolete with the rising of WD4A.
    Correct me, if I' m wrong, and forgive me, if I' m flaming, but when I started with Java development in SAP enviroment I was quite enthusiastic and didn' t understand resentiments of the ABAP developers against our programming language, but now I' m more and more joining their opinion.
    Regards,
    Thomas
    PS: I' ve - by the way - done the SAP Java Certification and am already regretting it.

  • Web Dynpro Java timesheet to Web Dynpro ABAP timesheet  what changes needs to be done from EP side

    Hi All,
    We are moving Web Dynpro Java timesheet to Web Dynpro ABAP timesheet.
    what changes needs to be done from EP side?
    I have made Web Dynpro ABAP iView calling Web Dynpro ABAP timesheet and linked it with page.
    But It is showing an error 'Web Dynpro Application CATDATARECORD does not exist'.
    Please suggest what other changes needs to be done.

    Hi Anurag,
    I have added new Web Dynpro ABAP iView to the same page in which Web Dynpro JAVA iview was added and made ABAP iview visible.
    And this page is already assigned to role.
    How should I link this ABAP iview so that it get replace by the Web Dynpro JAVA iview.
    And the  application name (CATDATARECORD) is correct and Web Dynpro JAVA is using the same application.
    But now we want new time timesheet for that what changes needs to be done?
    Please suggest.

  • Web Dynpro ABAP == Web Dynpro Java

    Hi Gurus,
    I've written a Web Dynpro Abap Application to maintain CRM Opportunities, working with Transaction-ID and everything (read&write) works fine.
    Now, I'd like to write the same Application in Web Dynpro Java.
    I'm quite new in WDJ and thus would like to have some good Howtos & Guides (using the NWDI, CMS, CBS & DTR on a remote J2EE Engine) - e.g. how do I get information out of FMs I used in Abap, like CRM_ORDERADM_H_READ_OB when writing code in Java?
    Thanks in Advice,
    Farid
    (help will always be rewarded)

    Hi,
    I've deleted the model, restarted the j2ee engine, created a new model in a new package, importet Z_R_CRM_ORDER_SAVE an get the following message:
    [code]
    [Warning]:     Creating a connection with Metamodel language <en> failed.  Continuing with language <DE>
    [Fatal]:     com.sap.mw.jco.JCO$Exception: Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx
    [Info]:     Creating Model: MyNewModel
    [Info]:     Creating Model Class: Z_R_Crm_Order_Save_Input
    [Info]:     Creating Model Class: Z_R_Crm_Order_Save_Output
    [Info]:     Creating Model Class Property: Cv_Log_Handle
    [Info]:     Creating Model Class Property: Cv_Log_Handle
    [Info]:     Creating Model Class: Crmt_Exception
    [Info]:     Creating Model Class: Balmsghndl
    [Info]:     Creating Model Relation: Crmt_Exception:Msg_Handle
    [Info]:     Creating Model Class Property: Log_Handle
    [Info]:     Creating Model Class Property: Msgnumber
    [Info]:     Creating Model Relation: Z_R_Crm_Order_Save_Output:Et_Exception
    [Info]:     Creating Model Class Property: Guid
    [Info]:     Creating Model Class Property: _Class
    [Info]:     Creating Model Class Property: Code
    [Fatal]:     java.lang.ClassCastException: com.sap.dictionary.types.mdi2metamodel.model.SimpleType
    [Info]:     Creating Model Class: Crmt_Return_Objects_Struc
    [Info]:     Creating Model Relation: Z_R_Crm_Order_Save_Output:Et_Saved_Objects
    [Info]:     Creating Model Class Property: Guid
    [Info]:     Creating Model Class Property: Object_Id
    [Fatal]:     java.lang.ClassCastException: com.sap.dictionary.types.mdi2metamodel.model.SimpleType
    [Info]:     Creating Model Class Property: Iv_No_Bdoc_Send
    [Info]:     Creating Model Class Property: Iv_Save_Frame_Log
    [Info]:     Creating Model Class Property: Iv_Update_Task_Local
    [Info]:     Creating Model Relation: Z_R_Crm_Order_Save_Input:Output:Z_R_Crm_Order_Save_Output
    [/code]
    and same problem as discribed above (no IT_OBJECTS_TO_SAVE etc.), even after restarting the j2ee engine a second time after importing.

  • Is it possible to integrate web dynpro java  with xPD screens?

    We have a requirement to integrate the xPD screens with Adobe using web dynpro java. The UI has to be completely Adobe and the xPD transactions would be triggered through Adobe.
    Is it possible?? Please let me know how if anyone worked on this.
    We are using SAP NW SP12 and NWDS 7.0.1
    Thank you,
    Vasu

    Vasu,
    I'm in the same boat as you because I have no idea where to start either.  Right now we are just evaluating some possible solutions for our UI needs that our Business is asking for.  Originally I only heard about the Adobe Forms.  Then I heard about this Web Page Composer which could also provide us a way to display our iViews and other links in a more user friendly page.
    So learning how to display xPD in either area is new to me and I am just starting to learn SAP all together.  If I hear anything or read anything, I will share with you.  Maybe we can help each other out. 
    Jennifer

  • Trigger Web Dynpro Java application automatically.

    Hi All,
    I don't know if I am asking too much, but I have a requirement as below
    I have a Custom Web Dynpro Java application for which an iView has been created and assigned to a role on the Portal. The user just have to access the role and can run the application.
    Now my requirement is to triggered or run this application without any user intervention on it's own periodically lets say after every 15 days or so. Please somebody let me know if is it possible and how?
    All the help would be really appreciated.
    Thanks and Regards,
    Abhishek

    Check out this
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90a95132-8785-2b10-bda5-90d82a76431e?quicklink=index&overridelayout=true
    and
    Scheduling webdynpro java application
    Hope this helps.

Maybe you are looking for

  • Invalid Export Options RAS SDKs

    Hi All, As given in post Re: XML Export - Cannot select format CR2008 SP2 We are using RAS sdks and given sample code but still we are gettting same error i.e. Invalid Export Options. Is this also scheduled to be fixed in SP3. Thanks, Stanly

  • When will Nokia Asha 105 be available in Europe, m...

    Thank you for your answers! Yours truly, AndreyOblomov Solved! Go to Solution.

  • Using JNI in JSP

    Hi i am going to develop a DI COM viewer in web. so that it uses lot of shared libraries (.dll). i tried JNI with servlet it works fine. but when i try to load a same DLL for another page it gives an error saying ".dll loaded in another class loader"

  • Failure to Open PDFs from the web - 'Adobe Acrobat has crashed'

    I can't download pdfs from the internet, for instance an exam paper. Chrome tells me 'Adobe Acrobat has crashed' I'm using Windows 7, any ideas what I can do to fix this?

  • DE offline on different computer?

    Historically, I have read my eBooks on a laptop that has no connection to the Internet. I download PDFs (or Word documents) onto my desktop and then use a USB key to transfer the reading material to the laptop. If I have purchased an Adobe Digital Ed