How to access variable values across mappings?

Hi all,
I have created the following sample class Test.java and imported it as an archive:
public class Test{
public static String myStringData = null;
In one of the mappings, I have a UDF that sets the  "myStringData" using the foll:
Test.myStringData = "Amit";
I am trying to access this variable in another mapping using a UDF with foll statements:
String test = Test.myStringData;
result.addValue(test);
However, on testing the second mapping I get the value of the variable as null. I have activated all objects.
Not sure what exactly I am missing here...Kindly provide your inputs.
Thanks..
Amit

Hi,
>>>Shabarish/Praveen, it would be great if you could provide me with some examples on the suggested approaches as I am relatively new to PI.
the truth is that you should not write anything from message mappings
as:
what happens if the DB table to which you want to write will be locked
what happens if the file will not be accessible ?
it's better not to write anything from message mappings
especiall if you say you're new to XI
maybe just tell us the real problem - why do you think you need to do it?
Regards,
Michal Krawczyk

Similar Messages

  • How to retain variable values across a BPEL Process?

    Hi All,
    I've created a BPEL process using number of variables. Out of these I've a common variable with name processorBO that is required for calling every service. But after calling a service, I lose values inside processorBO and it gets filled with the new values.
    Can anyone tell me how to retain the processorBO values across complete process so that, I can use the required values at appropriate places ?
    Thanks in Advance
    Regards

    well...you could always use the transformations to do the assign, or if you want to use just the assign activity to set the response values from the service to the 'global variable' you could use something like
      <copy>
          <from variable="inputVariable" part="payload"
                query="/client:testProcessProcessRequest"/>
          <to variable="globalVariable" part="payload"
              query="/client:testList[1]"/>
      </copy>the [1] will assign your values to the array-part of the variable.
    This does the same as a for-each in your xsl transformation.

  • How to Read Variable Values in WAD 7.0 Using JavaScript

    I found a how to: How to Read Variable Values in WAD 7.0 Using JavaScript on SDN.
    I get a Javascript error:
    bics.getElementsByTagName is not a function
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    Thats my script:
    function currency()
    var varnm = "SFS_CP_CURR"; // Name of the variable to be read
    root = document.childNodes[0]; // <HTML>
    body = root.getElementsByTagName("BODY")[0]; // <BODY>
    xml = body.getElementsByTagName("XML")[0]; // <XML>
    bics = xml.childNodes[0]; // <BICS_VIEW>
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    varl = vars.getElementsByTagName("VARIABLE"); // gives no. of variable in DP
    for ( i = 0; i <= varl.length; i++ ) // Loop one by one
    vari = vars.getElementsByTagName("VARIABLE")<i>;
    varnam = vari.attributes[0].text; // get variable name
    mem = vari.getElementsByTagName("MEMBER")[0];
    varval = mem.attributes.getNamedItem("name").value; // read variable value
    if (varnam == varnm) //check varname in loop needs to be read
    if (varval == "ZMON") // check for value1 and fire command1
    SFS_CP_M();
    if (varval == "ZKON") // check for value2 and fire command2
    SFS_CP_K();
    break;
    Where's the mistake?

    I'm afraid I haven't made my question understood clearly.
    What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
    Please advice.
    Thanks in advance,
    Shady

  • How to access the value of application item in javascript

    How to access the value of application item in javascript?

    Hi,
    One way
    var myVariable = '&MY_APP_ITEM.';Br,Jari

  • How to set variables values via VBA.

    Anybody please help.
    How to set variables values via VBA in workbook. SAP Netweaver 2004s.

    Pass variable values with VBA and BI 7.0 funtions to Query
    At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
    How to start:
    Switch to design mode in BEX Analyzer:
    Implement a BEX 7.0 design item u201Cbuttonu201D
    Click on the button to implement the properties
    Make the input for the commands
    data_provider = dataprovider_1
    cmd = process_variables
    subcmd = var_submit
    No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
    Make a range somewhere in the excel with the following structure:
    Name    Index   Value
    VAR_NAME_1      1       Variablename
    VAR_VALUE_EXT_1 1       variablevalue
    Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
    Set a name for this range with EXCEL functionality but without the header:
    Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
    If you have more variables to process you can of course enhance your Filterrange!
    In the left upper Corner you have a name for your button:
    Now you can raise the button-click in vba like this:
    Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
    regards, Lars

  • How to maintain pageFlowScope value across 2 japx??

    Hi All,
    How to maintain pageFlowScope values across the pages.
    In my application I got 2 jspx pages where the 1st page (result page) have two page fragments and no fragments in the 2nd page (Master Details page).
    I am triggering the 2nd jspx while clicking the continue button from the 1st jspx's 2nd fragment. I am using Java webservice DataControl in the model layer and both the pages sharing the same WS DC results. In the 2nd fragment I am displaying the user search result. While hitting the continue button I am collecting the selected userID and then triggering the 2nd jspx by passing the that userId thru pageFlowScope, which used to call the WS method once again.
    PageFlowScope losing the context while navigating to 2nd page. It is returning null value. If I remove 2nd page and create the new fragment in the first page itself then the master details is working well.
    Please help me how do I pass the pageFlowScope value from one page to other page without losing the value. I am using faces-config.xml for page navigation.
    Continue button Action method:
    public String userSelected() {
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    return "goToUserMgmt";
    Thanks
    kln

    I am not opening any new window for the 2nd jspx. Trying to open the 2nd jspx in the same window.
    I did the same as you mentioned.
    1) create first page idm.jspx
    2) create 1st page fragment search.jsff (Manually create the input fields...didnt drag and drop the WS DC input).
    3) create 2nd page fragment searchResult.jsff (drag and drop the WS DC result and setting #{pageFlowScope.netid} as value)
    4) create search-task-flow and attaching these 2 frag in it.
    5) Drag and drop the search-task-flow in to first page IDM as region.
    6) Creating 2nd page MasterDetails.jspx (Drag and drop the same WS DC result)
    7) Creating faces-config.xml where I drag and drop both the jspx and setting the navigation rule.
    (If continue from IDM.jspx then go to------>masterDetails.jspx)
    Here the String continue is return by the 1st page--2nd fragment continue button action method...
    This is what I am doing exactly....Any idea please why am I missing the pageFlowScope value!!!
    -kln

  • How to Access the value(Ex: Delivery no) From Web to R/3 side.

    How to Access the value(Ex: Delivery no) From Web to R/3 side.
    Any sample code please suggest.
    sai

    Hi,
    Try RSA3.
    Extract Checker
    /people/sajeed.ms/blog/2006/02/12/extract-checker
    Thanks,
    JituK

  • How can access stock value corresponding to an ItemCode and WarehouseCode ?

    Hello everybody. Do you know how can access stock value (corresponding to OITW.StockValue) corresponding to an ItemCode and WarehouseCode in SAP BO 2005 using DI API objects ?
      Thanks in advance,
      TLBS

    Hello,
    you need to use the items Object of the DI
    you need to first make a GetByKey on your item Code
    this object has a child object called ItemWarehouseInfo,
    using this object (it has several line, one by Warehouse), find the good Warehousecode, and look at the value InStock)
    HTH
    Sebastien

  • How to change variable values ?

    Dear friends,
    How to change variable values when we are broadcasting the Queires ?
    Do we need to change them everytime ?
    Thanks,
    N

    Hi,
    Please go through it.
    /people/ramkumar.ghattamaneni/blog/2008/02/25/using-variables-while-broadcasting-queries-to-the-portal-in-bi-7
    Regards,
    Ramkumar.

  • How to access variables passed in custom tag body

    I am developing custom tags in my application. I need to pass some variables from the .jsp file into tag file. I want these to be passed as body of the tag rather than as tag parameter. It seems the correct syntax for this is:
    <myTags:display> someVariable </myTags:display>
    Question 1: Can I not use this as: <myTags:display someVariable /> Since this tag will be used at many places in the jsp, I dont want to write myTags:display twice for every usage.
    Question 2:
    I want to call the tags from main.jsp like:
    <% String var1 = "Display Me Please"; %>
    <myTags:display var1 />I want the tag file to do some processing on the value stored in var1. I've written the following code in tag file, display.tag:
    <jsp:doBody var="theBody" />
    <% Object obj = (Object) request.getAttribute ("theBody"); %>This code snippet gives me access to obj which has the value "var1". Now how do I access the value that is contained in "var1".
    Edited by: coolkomal on Jun 3, 2009 7:45 AM

    coolkomal wrote:
    I am developing custom tags in my application. I need to pass some variables from the .jsp file into tag file. I want these to be passed as body of the tag rather than as tag parameter. It seems the correct syntax for this is:
    <myTags:display> someVariable </myTags:display>
    Question 1: Can I not use this as: <myTags:display someVariable /> Since this tag will be used at many places in the jsp, I dont want to write myTags:display twice for every usage.
    <myTags:display var="<%=someVariable>"/> is a valid syntax for performing respective action of that variable. You can also use EL to pass the variable ${someVariable} provided the custom tag provide support for EL.
    >
    Question 2:
    I want to call the tags from main.jsp like:
    <% String var1 = "Display Me Please"; %>
    <myTags:display var1 />
    Just ensure that you declare all the related variables in Main.jsp and statically include Main.jsp in your jsp such that you do the checking
    [http://java.sun.com/products/jsp/tags/11/syntaxref117.html]
    >
    I want the tag file to do some processing on the value stored in var1. I've written the following code in tag file, display.tag:
    <jsp:doBody var="theBody" />
    <% Object obj = (Object) request.getAttribute ("theBody"); %>This code snippet gives me access to obj which has the value "var1". Now how do I access the value that is contained in "var1".Can be done provided you code it the right way. Start learning basics of how to create custom taglibraries to gain more knowledge on how things can be managed.
    [http://java.sun.com/javaee/5/docs/tutorial/doc/bnalj.html]

  • How to access variables declared in java class file from jsp

    i have a java package which reads values from property file. i have imported the package.classname in jsp file and also i have created an object for the class file like
    classname object=new classname();
    now iam able to access only the methods defined in the class but not the variables. i have defined connection properties in class file.
    in jsp i need to use
    statement=con.createstatement(); but it shows variable not declared.
    con is declared in java class file.
    how to access the variables?
    thanks

    here is the code
    * testbean.java
    * Created on October 31, 2006, 12:14 PM
    package property;
    import java.beans.*;
    import java.io.Serializable;
    public class testbean extends Object implements Serializable {
    public String sampleProperty="test2";
        public String getSampleProperty() {
            return sampleProperty;
    }jsp file
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <html>
    <head>
    <title>Schedule Details</title>
    </head>
    <jsp:useBean id="ConProp" class="property.testbean"/>
    <body>
    Messge is : <jsp:getProperty name="msg" property="sampleProperty"/>
    <%
      out.println(ConProp.sampleProperty);
    %>
    </body>
    </html>out.println(ConProp.sampleProperty) prints null value.
    is this the right procedure to access bean variables
    thanks

  • How to access a value from "List of Values" by giving a name?

    I have a "List Of Values" defined in my BI Report. It comprises list of label-value pairs.
    I have defined a parameter :p_Value for the above "List Of Values" defnition. this parameter is used in datasource sql defnition to filter the query results. I configured a template which has a table that shows all the parameters used for filtering query results. If I give <?$p_Value?> in the template then the parameter value is rendered on it. But I want the "name" of the parameter and not the value. Can anybody tell me how to access name of the parameter which refers to one of value in "List of Value" defnition?

    option 1:
    Can you get the value from the DB in the report sql ?
    You have the code, inside the report query, if you can get the decoded value form that
    option2:
    create another paramater, LOV and query, and make it as hidden, and use the first :param_1_value in the lov query in the second param and decode the value.
    Now , you can refer the :PARAM_2_value in template which will have decoded value.

  • How to access variables from other class

        public boolean inIn(Person p)
            if  (name == p.name && natInsceNo == p.natInsceNo && dateOfBirth == p.dateOfBirth)
                 return true;
            else
                 return false;
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phello,
    here am trying to compare the existing object with another object.
    could you please tell me how to access the variables of other class because i meet this error?
    name cannot be resolved!
    thank you!

    public class Person
        protected String name; 
        protected char gender;      //protected attributes are visible in the subclass
        protected int dateOfBirth;
        protected String address;
        protected String natInsceNo;
        protected String phoneNo;
        protected static int counter;//class variable
    //Constractor Starts, (returns a new object, may set an object's initial state)
    public Person(String nme,String addr, char sex, int howOld, String ins,String phone)
        dateOfBirth = howOld;
        gender = sex;
        name = nme;
        address = addr;
        natInsceNo = ins;
        phoneNo = phone;
        counter++;
    public class Store
        //Declaration of variables
        private Person[] list;
        private int count;
        private int maxSize;
    //constructor starts
        public Store(int max)
             list = new Person[max];//size array with parameters
             maxSize = max;
             count = 0;
        }//end of store
    //constructor ends
    //accessor starts  
        public boolean inIn(Person p)
           return (name == p.name && address == p.address && natInsceNo == p.natInsceNo);
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phope it helps now!

  • How to access variables outside user exit

    Hi,
    I'm working with a user exit and my problem is that in a particular moment I have to access variables located outside the scope of the user exit (they are in a standard program)
    How can I reach these variables?
    thanks in advance

    Hi,
    If they are global variables then you can access them using Global assign technique,
    For example,
    FIELD-SYMBOLS: <fs_value> TYPE ANY.
    ASSIGN ('(SAPMV45A)XVBAK') TO <fs_value>.
    It is basically,
    ASSIGN ('(<Std. Program Name>)<Variable name>') TO <field symbol>.
    NOTE: To make sure they are accessible in your user exit, just put a break-point in the user exit and once you are there in debugging, type in,
    (<Std. Program Name>)<Variable name> in the Field names section and if it does not show it in RED then it is accessible..
    Hope this helps.. 
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • How to access variables??

    how to access public variables of any other class??
    suppose i have a file temp.java file ..& i know all the public variables. and
    i want to access the variable of those temp.class file which extends JApplet or Applet..
    and as u know it will declare public void init() .. & in this function only all declaration will be there.
    so now how to invoke this init() function from any mymethod()..to access public variables...

    its not working. for me..
    the variable which i m trying to access is non static.. its displays the error :
    Exception in thread "AWT-EventQueue-1" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
    and by one method i have connected database also.. and it has been called from init()..
    i have collected the data from the database..and i m storing the data in one ArrayList ..
    and i want to access that ArrayList..

Maybe you are looking for

  • DOBJ.UPDATE_FAILED error while attaching adapters to Users Data Object

    PROBLEM DESCRITPION:- The following error occured while trying to attach entity adapters to Users Data Object (com.thortech.xl.dataobj.tcUSR) in Post-Update section. Error Message: The security level for this data item indicates that it cannot be upd

  • Swirly beach ball on wake up

    When I wake up my computer from sleep (e.g. open the lid) my computer will at times (more frequently now) take a while to load. My cursor becomes the swirly beach ball and I am un-able to log my self in. This began a while ago and has since become an

  • HT201274 Erase all settings question

    Am trying to erase all content and settings on my iPhone 4 before selling it. I go to the "reset" menu, click the appropriate button, put in my passcode. It then asks for my passcode again, but when I put it in I get a "failed passcode attempt" messa

  • Old ipod won't charge

    Older ipod won't charge.  30 gig, white, I've shown videos on it, so it's one of the earlier color iPods.  I gave it to my mom 2 years ago and she never used it. I've tried a wall charger and plugged it into my computers, no luck.  I can't get it to

  • Photoshop reinstall

    The latest Photoshop CC update failed, and Photoshop no longer worked. I uninstalled Photoshop (couldn't deactivate), but now I can't reinstall. What's my next step?