Access KM predefined property values from a Web Dynpro application

Hi,
I am trying to build a custom search interface in Web Dynpro which leverages the KMC Indexing and Search services.
In this interface I would like to display value lists of predefined properties in KM (created using the Property Metadata Service) and bind each predefined property's value list to a checkbox group UI element.
Which KM API should I use to retrieve the values of a specific predefined property ?
When using the standard flexible user interface in the portal this can easily be achieved through configuration, but now I would like to know how to achieve this in Java code.
Thanks in advance for your input.
I have some idea on how to get the propertymap from a resource, but how can I access the metadata of a predefined property in KM directly ?

Hi Theo, i'm working on something like this, i have a WD application that is accessing Km through a Webservice, on the webservice ejb i have this problem:
IResourceFactory resFactory = ResourceFactory.getInstance();
IRepositoryServiceFactory serFactory = resFactory.getServiceFactory();
IPropertyConfigurationService propConfigService = (IPropertyConfigurationService) serFactory.getService("PropertyConfigurationService");
IMetaNameListIterator i = propConfigService.getMetaModel().nameIterator();
     while (i.hasNext()) {
     IMetaName metaname = i.next();
     if ( metaname.getDocumentPatterns()!= null){
     propertyData.setId(metaname.getName());
     propertyData.setName(metaname.getLabel(locale));
     propertyData.setNamespace(metaname.getNamespace());
     propertyData.setDescription(metaname.getDescription(locale));
                propertyList.add(propertyData);
On this line serFactory.getService("PropertyConfigurationService") i get the following error on the trace:
#System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]#Error##Plain###Configuration Framework error: unable to create an IConfigClientContext instance from an EP5 userInitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.#
#System.err#sap.com/KmmsListEAR#System.err#Guest#2####30a27fa0cbfa11dbace30018de0545f1#SAPEngine_Application_Thread[impl:3]#Error##Plain###InitialConfigException: The configuration service locator could not be initialized for any of the environments. The configuration framework is not available.
Do you have any idea of how to solve this? or if you accomplished in a different way, can you guide me a little bit.
Thanks in advance Theo

Similar Messages

  • How to pass the values from the Wb Dynpro Application to the SAP Backend ?

    Hi All,
    Good morning..,
    I have scenario like:
    I want to pass the values from the web dynpro appication to the SAP Back end R/3 Table. IN backend the RFC is writtn to accept the structure input from the Webdynpro.
    Upto know I imported the corresponding RFC and maaped to the View.
    How to proceed with the coding to save the data...
    PLease suggest...
    Regards and Thanks in Advance,
    CSP

    Hi  Pradeep
    Steps:
    1. First create an instance for bapi and bind the instance to the bapi node.
      Z<bapi name> zb=new Z<bapi name>();
      wdContext.nodeZ<bapi name>. bind(zb);
    2. Then if u have the import parameter u have to set them by using
        The instance of the above bapi.
        Zb.set<import parameters>;
    3. If the bapi has a table parameters then the structure for the table parameters will also be imported
       In the model class.
    4. Set the table parameters by creating the instance for that structure and using this instance set it.
       Z<Struct>itm tab=new Z<Struct>();
       Tab.set<table parameters>
    5. Then add the structure instance to the bapi instance.
        Zb.add(Tab);
    6. Then Execute the bapi after setting the import parameters.
    7.  If there is any export parameters, then get the values after execution.
    Look at this thread for codes
    Re: RFC call on click of button
    Regards,
    Arun

  • Parameter transfer from one Web Dynpro Application to another

    hi,
    Is it true that  only parameters with string type can be transfered from one Web dynpro application to another ?

    hi, Justin ,
    You are right , I can use inplug for the dest component , and can transfer referenced type , but now I met a problem , how I can transfer the parameter to the dest comp ? 
    I can use the following code to transfer a value from origin to dest , but how to transfer an object , can you give me some sample code ?
    CONCATENATE l_url '?'
                   '&guid=' lv_guid
                   into l_url.
    CALL METHOD window_manager->create_external_window
          EXPORTING
            url    = l_url
          RECEIVING
            window = lo_window.

  • How to execute a BI query/view from a web dynpro application?

    Hi all,
    I am trying to connect to a BI system from a Web Dynpro application. I have to execute a view/query and process the output in my application. Please guide me about how to establish the connection to the BI system from my web dynpro application and then execute the query/view.
    I have tried executing/modelling the BI query/view using Visual Composer but I get an error saying 'QueryView Instantiation failed' when I try to drag the view/query on to the design board.
    Please guide me and help me achieve this.
    Thanks & Regards,
    Kishan

    Hi Kishan,
    Define system for BI in portal and define JCo destination, then from WDJ application use can query BI.
    Create the Technical System and connect with JCO Destinations
    or
    Connecting through the BI Connecters (ex: XMLA Connecter)
    Refer below link:-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1
    In this document you will get details related to connector and other admin activity.
    Hope this may help you.
    Deepak!!!

  • Exiting from ABAP Web Dynpro application

    Hi,
    In ESS portal we have one tab Personal info, there I have created one link and integrated my ABAP web dynpro application.
    I want to exit from the application and go back to the Personal info sub area. created one exit button in my application on press of that i need take this action.
    Please guide me with this
    Thanks!
    Piyush

    Piyush,
    I am not sure whether it works or not just get the navigation url of personalinfo subarea and using portal APIs navigate to that url when you click on exit button
    Thanks
    Bala Duvvuri

  • How to Debug a BAPI from a Web Dynpro application

    I have a Web Dynpro application calling a BAPI, and I would very much like to see what data the Web Dynpro application is passing into the BAPI, and then debug the BAPI.
    Is there a way to do this? I'm wondering if it is possible to somehow set up the ABAP stack so that on receipt of the BAPI call, it appears on the tRFC queue waiting for execution.
    However it is done, I need a way to step through the BAPI on the ABAP stack.
    BR,
    Tony.

    Hi Anthony,
    The ABAP runtime environment contains various tools that you can use for analysis purposes, such as for debugging source code. All source code written for Web Dynpro applications in ABAP can normally be tested using the debugger.
    To allow it to test other Web Dynpro-specific program entities too, the debugger has been equipped with a special enhancement. In the phase model in the active application, you can typically see the following information at various points in time:
    -The structure of the content of the current controller,
    -The properties of the UI elements in the layout of the current view
    -The currently instantiated component usages
    Starting the Debugger
    The functions for debugging Web Dynpro entities are embedded in the new debugger. You therefore need to have selected the new debugger in your Workbench settings.
    Selecting the New Debugger
    1. In the menu, choose Utilities -> Settings.
    2. A dialog box now appears that contains two nested tab page areas. Choose the “parent” tab page ABAP Editor.
    3. The settings for ABAP Editor always open with the content of the child tab page Editor. Here, select Front End Editor (New).
    4. Now switch to the Debugging tab page in the ABAP Editor settings and select New Debugger.
    5. Save your changes and close the dialog.
    Starting the Debugging Process
    To run an application in debugging mode, you first need to set an external breakpoint in display mode in one of the methods in the component.
    Now start a test run of the application from ABAP Workbench as usual.
    The method in which you set the breakpoint depends on the purpose of the test run. To debug a view, for example, it is best to set the breakpoint in method WDDOMODIFYVIEW. Provided that the context of the view controller is not filled using a supply method, the view is fully instantiated in the phase model at this point in time.
    Selecting the Web Dynpro Tool in the New Debugger
    When you start the application, another session opens automatically for the debugger. If you have not yet saved any personal settings with regard to the layout of the debugger, the Editor tool will now appear on the left, with the Display Variables tool on the right.
    1. Select one of the three desktops in order to reconfigure it for debugging the Web Dynpro application (see Designing Work Areas).
    2. The right-hand edge of the debugger window has a bar of function icons. Choose the Replace Tools icon:
    3. In the next dialog box (New Tool) open the lowest node (Special Tools) and choose Web Dynpro.
    4. Confirm the dialog box.
    On the right of the debugger desktop, you will see that the previous tool has now been replaced by the Web Dynpro debugger. You can save this setting for future debugging activities. To do this, choose Save Layout In the debugger’s general toolbar.
    Thankyou,
    Ramganesh.

  • How to start a Web GUI program from a Web Dynpro application

    I know the program name , and it is a Web GUI program ,is anybody know how to start it from a Web Dynpro application

    hi,
    I use the following program to call a SAP GUI program :
    DATA: l_componentcontroller TYPE REF TO ig_componentcontroller.
      DATA: l_api_componentcontroller type ref to if_wd_component.
      DATA: l_sapgui_manager type ref to cl_wdr_sapgui_integration.
      DATA: lt_parameters    TYPE wdr_name_value_list.
      l_componentcontroller = wd_this->get_componentcontroller_ctr( ).
      l_api_componentcontroller = l_componentcontroller->wd_get_api( ).
      l_sapgui_manager = l_api_componentcontroller->get_sapgui_manager( ).
      IF l_sapgui_manager IS NOT INITIAL.
        l_sapgui_manager->fire( EXPORTING name = 'PROGRAM_NAME 'parameters = lt_parameters ).
    But the l_sapgui_manager is always initial , what can I do ?
    ENDIF.

  • Pass Values between 2 web dynpro applications

    Hey,
    I have a created an application which display data from table 1, I am capturing the value ON_LEAD_SELECT
    and calling another application2,
    I wanna be able to export the value selected from applciation1 into
    applciation2.
    This what I tried to export selected value, it didn't work through:
    in application 1:
    construct a URL
    CALL METHOD cl_wd_utilities=>construct_wd_url
        EXPORTING
          application_name = 'APPLICATION2'
        IMPORTING
          out_absolute_url = str.
    concatenate str '?' 'carrid =' ls_sflight-carrid into str.
    get reference of window from component
    l_cmp_api = wd_comp_controller->wd_get_api( ).
    l_window  = l_cmp_api->get_window_manager( ).
    get reference of window of target component
    result = l_window->create_external_window(
    url    = str ).
    result->open( ).
    Thanks in advance

    >
    Abdul kourani wrote:
    > Hi Thomas,
    >
    > Thanks for the quick reply. I used the method you recommended
    >
    > call method cl_http_server=>append_field_url
    >           exporting
    >             name  = 'carrid'
    >             value = ls_sflight-carrid
    >           changing
    >             url   = str.
    >
    > but Im getting a not-compatible type error , since VALUE is expected to be  string.
    > lets say hypothetically I successfully exported the value from application 1, how can I possibly
    > read it in application 2
    >  for example:
    >
    > * read data
    >   select * from sflight into table lt_data
    >   WHERE carrid = ????.
    >
    > Thanks
    Whatever value you have, you need to put into string format anyway.
    Just declare a temporary string field and move yoru carrid value to it before calling the append_field_url method.
    From application 2 you read the URL parameters using the start plug of the window.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/b44e6ae8603095e10000000a421937/frameset.htm

  • How can I create a web Service from my Web Dynpro Application ?

    Hi,
    Kindly let me know How I could create a "Web Service" with my Web Dynpro DC project.
    Awaiting your responses.
    Regards,
    Mahesh

    Hi Mahesh,
          You can use the web services by creating the Model in web Dynpro
    And if you want to publish your own web service then you have to create a EJB module and publish as a web service.
    Thanks
    Ninad

  • 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

  • Calling a Standard SAP transaction VA03 from another web dynpro application

    Hi All,
    I have a requirement wherein I need to call the standard SAP transaction VA03 whenever a sales order is selected in some other we dynpro application so that the sales order gets displayed.
    No regarding usage of OBN for the above functionality I have certain queries:
    1. In order to call VA03 do I need to create a transactional iview for it or is there any direct method.Also how to pass this sales order number as parameter to the T.Code.
    2. Can we use standard business object BUS2032 for OBN or a new Business object is created.What exactly is the purpose of these standard business objects in portal and when should they be used.
    Thanks in advance
    Aman Gupta

    Hi Aman - Do you have a portal team in your project or you have to create the IVIEWS yourself?
    I do have a portal team and I dont know how they create the IVIEWs but for example, I will go to my portal team and I will ask them to create an IVIEW for TCODE VA03, they will created and they will tell me the input parameters they entered for the IVIEW so I can call OBN and display in webdynpro.
    SAP in SRM has webdynpro e.g. for BUS2121 and they have an IVIEW already implemented in the portal context pointing to the webdynpro of BUS2121 so we can used the IVIEW by calling OBN and passing the parameters; in my case the object_type will be 'shc' and the operation will be 'display' and the paremeters itab will be the GUID of my shopping cart, that way the OBN can understand which Shopping cart open and in which operation mode.
    I also did something like your requirement, I need it to display a specific case in Records Management but SAP has a standard IVIEW for records management 'RMREGEDIT' that didn't work for my requirement so I went to SE38 created a program that displayed the case based on GUID and I created a TCODE of my custom program. Portal team created a custom IVIEW of my custom TCODE and they told me the input parameters to call the TCODE in OBN and I pass in the itab parameter the GUID of the case using the FM that I post before.
    The action to call the OBN is in the event handler ON_CLICK of my ALV and the action is getting trigger when the user actually clicks a HYPERLINK in the ALV.
    Hope this helps you!
    Please feel free to ask me more details if you need.
    Jason PV

  • Call ESS FPM CATS Working time application from non FPM web dynpro application on click of button

    Hi,
    My requirement is to launch ESS Working time application HRESS_AC_CATS_1 from custom web dynpro application.
    ESS CATS working time application is configured in LPD_CUST launchpad.
    I tried using method  cl_hr_navigation_services=>navigate in my custom web dynpro but it did not work.
    Regards,
    Ibrahim

    In case you want to use Launchpad, you can use ABAP class CL_APB_LAUNCHPAD_API. If choose not to use Launchpad, you can use method CONSTRUCT_WD_URL of ABAP class CL_WD_UTILITIES to generate the URL. Specify Web Dynpro application and Web Dynpro Configuration as parameter. Finally create an external window using method CREATE_EXTERNAL_WINDOW that points to that URL.

  • How to change the Portal Password using a link from Web dynpro application

    Hello Everybody,
    I have a requirement to change the user password from a web dynpro application which is available on a mobile device. Firstly User will log into the portal through a mobile device and after getting authenticated user will be redirected to the mobile application. Within this mobile application there will be a link to change the login password(Portal login). Can somebody tell me how can i change the portal login password from a link available within the mobile application. Looking forward for a suitable reply.
    Thanks to all,
    Regards,
    Saby.

    Hi Maksim,
    Thanks for your reply..but i would also like to know can we directly use the Change Password Iview "persoUserPassword" from the portal. Can i directly Pass the URL of this iview from the portal to a "Change Password" link in the web dynpro application, so that when the user click this link he should be able to see this Iview on his/her mobile device and should be able to change the password from there. But i dont know whether this iview will appear properly on the mobile device or we have to have a custom web dynpro application for this purpose...Please reply with a suitable answer.
    Thanks in advance.
    Regards,
    Sarabjeet Singh.

  • Java dictionary database table in web dynpro application

    Hi,
    I want to access java dictionary database table in my web dynpro application in java.
    Right now I have created one java dictionary DC.
    and in that Dc i have created two database table .
    Now I want to use this table in my web dynpro application.
    Can anyone help me.

    You can use the Dictionary Projects to create tables in Database. You must use codes to access these database tables that is created using Dictionary projects.
    You have to use the DataSource in order to get connection ; Use Visual Administrator to see the data source name.
    You can use the following code to access the database table.
    ResultSet result = null;
    try
         InitialContext initialcontext = new InitialContext();
         DataSource datasource = (DataSource)initialcontext.lookup("jdbc/<DataSourceName>");
            Connection connection = datasource.getConnection();
         Statement statement = connection.createStatement();
         result = statement.executeQuery( <Query>);
         connection.close();
    } catch (NamingException e) {
         // TODO Auto-generated catch block          
              e.printStackTrace();
    } catch (SQLException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    Regards
       Vinod

  • 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

Maybe you are looking for