Read UWL properties in WebDynpro

Hi,
I have to read a couple of parameters from the UWL in WD.
The UWL for the WD launch part is configured as follows:
[code]   <ItemType name="uwl.task.webflow.TS91000001.PP1CLNT100" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="launchWebDynpro" executionMode="default">
      <ItemTypeCriteria systemId="PP1CLNT100" externalType="TS91000001" connector="WebFlowConnector"/>
      <Actions>
        <Action name="launchWebDynPro" groupAction="no" handler="SAPWebDynproLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="no">
          <Properties>
            <Property name="WebDynproApplication" value="WebDynproFromUWLApp"/>
            <Property name="WebDynproDeployableObject" value="local/WebDynproFromUWL"/>
            <b><Property name="DynamicParameter" value="wi_id%3D${item.externalType}%26wi_system%3D${item.systemId}"/></b>
            <Property name="System" value="XD1WDS"/>
          </Properties>
          <Descriptions default="launchWebDynPro"/>
        </Action>
      </Actions>
    </ItemType>[/code]
The question is more about the dynamicParameter part.
First I added the wi_system and wi_id to the application properties in WD.
Then I used the following code:
[code]     IWDWebContextAdapter adapter = WDWebContextAdapter.getWebContextAdapter();
     String wi_id = adapter.getRequestParameter("wi_id");
     wdContext.currentGenericApplicationElement().setWorkItem(wi_id);     [/code]
I am able to retrieve the <b>wi_id</b>, but NOT the wi_system. I retrieve this parameter the same way as shown in the WD code above.
I also used the <b>requestParameterMap</b>, but that gave me information about SaptestID, sap-css-url etc.
Who can help me? Is the UWL dynamic parameter configured correctly?
Sandhya

Hello Sandhya,
when i add more properties of name "DynamicParameter" to the xml file
E.g.
<Property name="DynamicParameter" value="name1=value1"/>
<Property name="DynamicParameter" value="name2=value2"/>
and upload the file again, just the last one of the 2 Properties get uploaded.
The uploaded file looks like this:
<Property name="DynamicParameter" value="name2=value2"/>
seems like a property name has to unique.
How did you solve that?
cheers
Markus
p.s.: we are on NW04s SP9

Similar Messages

  • Problem in retriving workitem id from uwl in abap webdynpro

    Hello,
    Curently, I've a problem similar with this post : Problem in retriving workitem id from uwl in abap webdynpro
    But unfortunatelly there is no answer :/
    I've followed this tutorial : http://wiki.sdn.sap.com/wiki/display/WDABAP/IntegratingWebDynproABAPapplicationswithUWLforworkflowin+Portal
    And I have a problem in my WD Abap. The WI_ID field is empty (initial).
    Here is my XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd'
      >
    <UWLConfiguration version="1.0">
         <ItemTypes>
              <ItemType name="uwl.task.webflow.TS90000087.ED1CLNT100" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="launchWebDynPro" executionMode="default">
                <ItemTypeCriteria systemId="ED1CLNT100" externalType="TS90000087" connector="WebFlowConnector"/>
                <Actions>
                   <Action name="launchWebDynPro" groupAction="" handler="SAPWebDynproABAPLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="yes" launchNewWindowFeatures="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">
                     <Properties>
                        <Property name="WebDynproApplication" value="zps_pnpi"/>
                        <Property name="newWindowFeatures" value="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no"/>
                        <Property name="DynamicParameter" value="WI_ID1=${item.externalId}"/>
                        <Property name="openInNewWindow" value="yes"/>
                        <Property name="WebDynproNamespace" value="sap"/>
                        <Property name="System" value="ED1CLNT100"/>
                        <Property name="display_order_priority" value="5"/>
                     </Properties>
                     <Descriptions default=""/>
                   </Action>
                </Actions>
              </ItemType>
         </ItemTypes>
    </UWLConfiguration>
    Here are the parameter defined in my application :
    WI_ID     000000000000     SWW_WIID
    WI_ID1     ${item.externalId}     STRING
    And, i've made the test with both the WI_ID and the WI_ID1 in the XML but everytime, no value at all.
    Could you please help me ? It's been three days I'm looking for a solution to get my Workitem ID in my Webdynpro ...

    In fact, it's quite strange, I added the menu and toolbar display and I can see that my url contains the data ...
    http://<begin_of_the_url>DynamicParameter=System%3DED1CLNT100%26wi_id%3D000000629442%26WI_ID%3D000000629442%26WI_ID1%3D000000629442<end_of_the_url>
    So ... how is it possible ?
    And the next question, how can I get the full url so I can parse it myself ?

  • How to read the properties file available in Server File structure in webdy

    hi all,
    I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
    Can i have code  how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by  maintain the iP addresses and users in  properties file based on the key i want to read like below.
    servername="abcServer"
    username="john"
    password="test123"
    Please send me the code how to read this properties file from the file structure and how to read this values by key  in webdynpro application
    Regards
    Vijay

    Hi Vijay,
    You can try this piece of code too:
    Properties props = new Properties();
    //try retrieve data from file
    //catch exception in case properties file does not exist
    try {
             props.load(new FileInputStream("c:\property\Test.properties")); //File location
             String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
             if(serverName==null)
               //....do appropriate handling
         }     catch(IOException e)
                   e.printStackTrace();
    Regards,
    Alka.

  • Configuration of UWL with Abap webdynpro

    Hi,
    We are doing configuration of UWL with Abap webdynpro. Our purpose to launch Abap webdynpro application , once clicked to a worlitem in UWL iView. we are unable to do due to following errors.
    We have done in this way.
    1.Created ECC system in EP
    2.register the uwl.webflow
    3.create ABAP iview(for test purpose still getting error when preview) (N/A)
    4.clear cache
    4.import xml file
    <ItemType name="uwl.task.webflow.TS91000006.UWLECCCLNT530" connector="WebFlowConnector" defaultView="urliview" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="UWLECCCLNT530" externalType="TS91000006" connector="WebFlowConnector" />
          <Actions>
            <Action name="launchWebDynProABAP" handler="SAPWebDynproABAPLauncher">
              <Properties>
                <Property name="WebDynproApplication" value="em_wipm_app" />
                <Property name="WebDynproNamespace" value="kgo" />
                <Property name="System" value="UWLECCCLNT530" />
                <Property name="DynamicParameter" value="WI_ID=${item.externalId}" />
             <Property name="display_order_priority" value="5" />
              </Properties>
              <Descriptions default="" />
            </Action>
          </Actions>
        </ItemType>
    5.Getting error,when I click task to perform dynpro abap screen.
    6.WI_ID not been received.
    Plz let me know the solution.
    Thanks,

    Hello,
    I think you have to import the xml-file before clearing the cache again. Your new xml-file needs a higher priority then the default view.
    You have just defined a new ItemType in your new xml-file. I am not sure, but I think that you will have to define in this file also a new view for this ItemType. Because otherwise it is not defined how this new ItemType should be shown.
    Regards,
    Iris

  • How do I read a properties file in WEB-INF without hard-coding a path?

    Hello,
    How do I read a properties file in WEB-INF without hard-coding a path?
    I tried:
    Properties properties = new Properties();
    properties.load(new FileInputStream("db.properties"));
    driver = properties.getProperty("driver");
    but it cannot find the db.properties file.
    Thanks for the help.
    Frank

    Don't use a File to read those properties.
    Better to use the servlet context and
    getResourceAsStream() method to get the InputStream.
    It'll look for any file in the CLASSPATH. If you put
    that properties file in the WEB-INF/classes directory
    you'll have no problems, even if you deploy with a
    WAR file.Completely agree with this approach. Just have to mention the following for completeness
    according to the API,
    "This method is different from java.lang.Class.getResourceAsStream, which uses a class loader. This method allows servlet containers to make a resource available to a servlet from any location, without using a class loader. "
    So using this method, the resource can be anywhere under your web context, not just in the classpath.
    Cheers,
    evnafets

  • Reading a properties file in a servlet and passing its contents to a JSP pa

    Hi all,
    I'm totally new to Servlet pgmg n JSP. Please can ne1 tell how to read a simple properties file (in a servlet) and pass its contents to a JSP page.Actually the reason is to fill a combo box in a JSP page with the contents of a properties file.If calling a servlet for the same is d best way to do that, plz can ne1 tell me :
    1> whether to override the doPost method in the servlet in which to read d file using FileInputStream
    2> Putting the contents in an array and then how to pass this array to the JSP page.
    Thanks,
    deepthy.

    I'm using a properties file to let my web application know what the name of the database is. I'm using an abstract class GeneralDao which will be extended by all the DAO's (Data Access Objects or java classes containing SQL statements).
    Here's the code :
    protected Connection getDatabaseConnection()
              throws Melding
         Connection dbconn = null;     
         ResourceBundle resBundle;
         try
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         resBundle = ResourceBundle.getBundle("gcoConfig");
         String dbConnectie = resBundle.getString("databaseconnection");
         gcoLogger.debug("lezen databaseconnection in resourceBundle " );
         dbconn = DriverManager.getConnection(dbConnectie);
         } catch (InstantiationException exc)The ResourceBundle is used to read the properties file, named gcoConfig.properties.
    With the getString() command I read the content of the string named databaseconnection.
    The gcoConfig.properties file is placed inside the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes
    The GeneralDao is placed in the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes\org\gertcuppens\cluifDao.
    So this class is placed some folder below the WEB-INF\classes folder of gcoConfig.properties.
    And the content of the properties file is just one line :
    databaseconnection=jdbc:mysql://localhost/cluif
    If you want to let the JSP know what's inside the properties file, wrap the content in a Javabean, put it in the request or even the session and pass the control to the JSP.

  • Java.lang.NullPointerException   in the code to read a properties file

    I have written the following code to read a properties file...........
    <b>
    public Property(String fileName)
        try
           InputStream is = MyClassName.class.getClass().getClassLoader().getResourceAsStream(fileName);     
           prop.load(is);
           is.close();
        catch (Exception ex)
            System.out.println("The Exception is:        " + ex.getMessage());
            ex.printStackTrace();
    </b>
    But this code is giving <b> java.lang.NullPointerException </b> at <b> prop.load(is) </b>
    please help me....
    regards
    Brahmachaitanya

    hi,
        If you are loading a resource (property) file from a jar file you can use
    getResourceAsStream("com/test/test.properties").
        if the propery file is in outside of your jar file . you can use
    Property portalProps = new Property ();
    try {
                   FileInputStream fileInputStream = new FileInputStream("<FilePath + FileName>");
                   portalProps.load(fileInputStream);
                   fileInputStream.close();
              } catch (IOException e) {
                   //Log the error
    refer the following link for more details
    http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html

  • Error: Could not read reports properties.  java.lang.NullPointerException

    Hi All,
    I am facing Could not read reports properties. java.lang.NullPointerException while trying to run the report using below string
    String:_
    /rcrmap2/weblogic/bea/ORA_PFRD/bin/rwrun module=/rcrmkr1/exe_dir/CA_PG1_T.rdf CUSTGRPID=''001139'' CANO=104 CACOPY=''F'' OPTION=''W'' CCODE=''KR'' USERID=apl_D_RCRMNIU3/Q5e3C4l1FPjrG6epG6f3C4dqFMgsDP@krcrmd DESTYPE=FILE DESNAME=/rcrmkr1/crms_RG/rep_dir/gcapg1_to_test_20110112_121902.rep BATCH=YES MODE=CHARACTER DESFORMAT=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/wide.prt pagesize=132x80
    Environment Variables :*
    export ORACLE_LOCALPREFERENCE=/rcrmap2/weblogic/bea/rcrms/config/FRComponent/frcommon/tools/admin/
    export WIDE_DEF=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/hplwide.prt
    export WIDE_VIW=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/wide.prt
    export REPORTS_FONT_DIRECTORY=/rcrmap2/weblogic/bea/rcrms/reports/fonts
    export REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar
    export REPORTS_NO_DUMMY_PRINTER=TRUE
    export REPORTS_TMP=/tmp
    export RW=/rcrmap2/weblogic/bea/ORA_PFRD/reports
    export LD_LIBRARY_PATH=/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64/classic:/rcrmap2/weblogic/bea/ORA_PFRD/lib:/usr/dt/lib:
    export LIBPATH=/rcrmap2/weblogic/bea/ORA_PFRD/lib:/usr/dt/lib:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64/classic:/usr/lpp/cobol/lib:/oracle/oracle/11.1.0.7/lib:/oracle/oracle/11.1.0.7/lib32:/rcrmkr1/exe_dir/pvcs_12july/pco:.
    export LDR_CNTRL=USERREGS@MAXDATA=0x80000000
    export TK_ICON=/rcrmap2/weblogic/bea/ORA_PFRD/reports/plugins/resource
    export REPORTS_DEFAULT_DISPLAY=NO
    export REPORTS_CLASSPATH=/rcrmkr1/exe_dir:/rcrmap2/weblogic/bea/ORA_PFRD/reports/jlib/rwbuilder.jar:/rcrmap2/weblogic/bea/ORA_PFRD/reports/jlib/rwrun.jar:/rcrmap2/weblogic/bea/ORA_PFRD/jlib/zrclient.jar:/rcrmap2/weblogic/bea/ORA_PFRD/modules/oracle.jsp_11.1.1/ojsp.jar:/rcrmap2/weblogic/bea/ORA_PFRD/javacache/lib/cache.jar:/rcrmap2/weblogic/bea/ORA_PFRD/modules/oracle.javacache_11.1.1/cache.jar
    Please help to provide your inputs
    Regards,
    Harish

    Hi,
    The problem was resolved by setting proper acl's to the corresponding directories (cache directory) in the application server
    Regards,
    Harish

  • Read a Properties File in a Static Floating Block

    I am trying to read a properties file in a static floating block:
       static
          try
             Properties p = new Properties();  
             String path = "/WEB-INF/classes";
             InputStream is = getClass().getResourceAsStream( path + "artimus_message_MessagInboxConfig.properties" );
             p.load(is); // load the stream into the Properties object
             WEBSITE_HOME = p.getProperty( "WEBSITE_HOME" );
             setWebSiteHome( WEBSITE_HOME );
          catch { ......}
       }I got a compilation error saying that the non-static method getClass() cannot be referenced from a static context. There is almost no way to make this static floating block non-static. What should I do?

    Thanks for the reply. But, huh... I do not quite
    understand. Which class is MyClass?It's a generic placeholder for whichever class your put that block into. You wouldn't put it there literally--replace it with the name of the actual class. If that block is in Foo.java, then use Foo.class instead of MyClass.class.
    >
    Okay, this static floating block is in a class called
    MessageInboxConfig.java. Then use MessageInboxConfig.class.getResourceAsStream(...)
    And inside this static
    floating block, I am reading a properties file and
    this properties file is in the
    ContextRoot/WEB-INF/classes/artimus_message_MessagInbox
    onfig.propertiesHow do I read this properties file?
    Properties p = new Properties();  
    InputStream is = MessageInboxConfig.class.getResourceAsStream("artimus_message_MessagInboxConfig.properties" );
    ... etc. ...You shouldn't need to specify "WEB-INF/classes," since it should be in your classpath. What you pass to getResource is a path relative to a directory in your classpath.

  • Read/write properties

    Hi,
    I'm trying to read a properties file, and them write back again into it. However, the newly created properties file does not overwrite the old file. The file that I read from is in the classpath, but the file that I write to is written in the directory where the program is executed from.
    How can I force that when I write the property file that it writes over the old file?
    This is the code that I'm using...
    private String    m_FileIni     = "";
    m_FileIni = "b70.properties";
    // Read properties file
    try {
       m_Properties.load(getClass().getResourceAsStream(m_FileIni));
    } catch (IOException e) {}
    // Write properties file.
    try {
       m_Properties.store(new FileOutputStream(m_FileIni), null);
    } catch (IOException e) {}

    If you use getResource rather than getResourceAsStream, you get a URL. Calling getFIle on that URL will give you a String, which you should be able to pass to the File constructor (or, indeed, the FileOutputStream constructor).

  • Could not read reports properties

    I am compiling reports with 11.1.1.3.0 on Solaris and keep getting the message: "Could not read reports properties". The RDFs do get to converted to REP files, so it appears to be just a warning message.
    The error appears to be a file privilege issue since if I use the oracle account the message goes away, but if I use my personal account I get the message.
    So what is the name of the file it is looking for? I had assumed prefs.ora; but I have already granted my personal account access to all of them.
    Thanks

    I will tell you that I had several errors when I migrated to 11g last month, the solution for all of my problems was upgrade to:
    Forms & Reports 11.1.1.4 and weblogic 10.3.4.
    its not difficult, it takes me 70 minutes to do it. after you do upgrade I bet you wont have this problem.
    cheers.

  • (Urgent) How to read file properties with virtual path?

    I have the data.properties file, and write a servlet file to read properties from this properties file. But I get a problem, that is: I CANNOT USE VIRTUAL PATH!
    How can I solve?
    My Application Directory is,
    WEB-INF
    classes
    loadProperties.class
    data.properties
    More Question,
    I can use Context in Web.xml to assign values to parameters. But its will be shown. How can I hide value with a properties file?

    This is not working.
    I am using Tomcat 4.0.6, for my JSP application I am trying to read ini.properties file from \webapps\myapp\WEB-INF\classes\common\
    directory through java bean.
    System.getProperty("user.dir")
    is giving <tomcat-home>\bin directory.
    unless I hard code the path this way, I could couldn't read the ini file.
    Properties props = new Properties();
    String strIniFilePath = <webappPath> + "\\WEB-INF\\Classes\\Offenders\\Common\\";
    props.load( new FileInputStream(strPropsFile));

  • Read Application Properties

    Hi,
    I have created a web module dc and an ear dc for reading the properties from "sap.application.global.properties" file using the ApplicationConfigHandlerFactory class.
    When I run this web module DC, all the properties gets retrieved successfully.
    Now the issue is,
    I created a Web Dynpro dc and added the above web module DC as a used DC. When I try calling a method in web module dc from my web dynpro dc which reads the properties, it returns all null.
    What I am trying to accomplish is, read the properties of "sap.application.global.properties" file from WD dc. I do not want to use the ConfigurationService in WD because I want to be able to modify the properties file at runtime without rebuilding the DC.
    Any help is appreciated.
    Thanks
    MLS

    This issue is still open. Anybody came across this issue?

  • How to read waveset.properties

    Hi group
    Please let me know how to read waveset.properties file for finding SOURCES.RESOURCENAME.HOSTS where I ll have different host name to get connected to Authoritative Resource.
    Please Help me.
    Thanks in advance.
    Regards
    Gajendra Nagapurkar

    Hi,
    You can invoke static java method getProperty on class com.waveset.util.WavesetProperties.
    Argument is name of your property.

  • How to read from properties file

    Hi,
    I am using JSR 168.
    while creating a new portlet, a folder gets created with the name as "portlet". Under which is resource package and <PortletName>Bundle.java.
    pls tell me how to read from .properties file.
    waiting eagerly for some reply
    Thanks & Regards,
    HP
    Edited by: user9003827 on Apr 13, 2010 3:42 AM

    I think i have mixed it up :)
    I have looked at it again and believe you are using regular JSP portlets.
    Can you tell what you want to achieve by reading .properties file. Are you meaning the preferences of the portlet or what exactly are you trying to do?
    Reading propertie files is easy:
    // Read properties file.
    Properties properties = new Properties();
    try {
        properties.load(new FileInputStream("filename.properties"));
        String myKey = properties.getProperty("yourKey");
    } catch (IOException e) {
    }Edited by: Yannick.O on 13-Apr-2010 05:52

Maybe you are looking for

  • Mail Preferences and lost Messages

    Had an issue after a software update: finder constantly relaunches. Tried, PRAM zap, reinstall sys, removing com.apple.finder.plist preference. Nothing worked. Then I relocated my entire preference file. Now the problem is gone, it was some preferenc

  • Error in HTML code

    I am getting an error in the javascript portion about an illegal character. I want to use a button to populate a text field. <BR> <FONT color="navy" size="+1"><B>Drawing PDMW Application</B></FONT><B><FONT      size="+1" face="Times New Roman" color=

  • Joining a network or Extending a network

    I have purchased a 500Gb TC and need the following setup.... TC is based upstairs, Main router is downstairs (and contains modem). So I set up TC and said extend a network but it won't work, keeps giving me a problem. I turn off all security, then it

  • Downloading dvd

    I just purchased a mac pro, and have downloaded a dvd video which I created with a tivo dvr system. The dvd will play with idvd, but I can't get the video to open in idvd, or with final cut express, as they will not recognize that file format. Any su

  • Security error when opening applet in HTML

    when I try to open my applet in a web page, I get the following error: java.security.AccesscontrolException: Access Denied (java.net.SocketPermission MyApplet.class resolve) The applet is a chat client, and I have the server running on my system. Whe