Fill Variable from other variable

Hi all,
I 'm using a characteristic structure in my BEX report.
It has two selection.
In one selection I 'm using a variable.
In second selection I want to use a variable that get data  from the firt one.I mean I want to fill a variable from the other one at query runtime.
How can I handle it?
Thanks.

Sample code....to copy values from variable "ZFISPER" to variable "FST_PERI".
WHEN 'FST_PERI'.
DATA : WA_FPER LIKE LINE OF I_T_VAR_RANGE,
       L_S_RANGERFPER TYPE rrrangesid.
DATA : L_FPR TYPE rrrangesid-LOW.
*break-point.
CLEAR : WA_FPER,L_S_RANGERFPER.
IF i_step = 2.
   LOOP AT i_t_var_range INTO WA_FPER WHERE vnam = 'ZFISPER'.
        EXIT.
   ENDLOOP.
   IF sy-subrc EQ 0.
       CONCATENATE WA_FPER-LOW+0(4) '001' INTO L_FPR.
   ENDIF.
      L_S_RANGERFPER-LOW = L_FPR.
      L_S_RANGERFPER-SIGN   = 'I'.
      L_S_RANGERFPER-OPT    = 'EQ'.
   APPEND L_S_RANGERFPER TO e_t_range.
ENDIF.
Srini

Similar Messages

  • Calling one variable to other variable ( alphanumeric)

    Hi All,
    I have scenario where I am calling one variable to other variable in ODI.
    For example.
    Lets say I have two variable V_SET1 & V_SET2
    V_SET1 :
    Variable type : alphanumeric , Historize,
    Refreshing : SELECT #V_SET1 FROM DUAL to historize value.
    Now I am using V_SET1 in V_SET2
    V_SET2:
    Variable type : alphanumeric , Historize,
    Refreshing :
    select SOURCE_NAME from EXTRACT_PGSQL_DETAIL where OE_DETAILS = # V_SET1
    Both variables are inside scenario I am passing value of V_SET1 at run time as parameter 'TEST'
    V_SET1 is executed sucessfully & TEST is stored is historized
    BUT in V_SET2 V_SET1 value is getting passed in " quotes & i am geeting error of INVALID IDENTIFIER "TEST"
    select SOURCE_NAME from EXTRACT_PGSQL_DETAIL where OE_DETAILS = # V_SET1 ( "TEST") -- error inavlid identifier.
    How can I covert the value of TEST from "TEST" to 'TEST' in second Variable V_SET
    Edited by: neeraj_singh on Jun 24, 2011 3:15 AM

    Hi,
    Try this if not,
    select SOURCE_NAME from EXTRACT_PGSQL_DETAIL where OE_DETAILS = '#V_SET1'
    Thanks,
    Guru

  • Inserting variables into other variables

    I have several objects that have similar names, like slot1, slot2, slot3, etc. I also have a function that is supposed to do something to the first object, then the next, then the next, etc each time a button is pressed. Is it possible to insert variables into other variables? So say I have a variable called n that is increased each time the button is pressed. The function is then applied to slot"n" each time the button is pressed. How would I do this?

    use:
    var n:Number=1;
    function f(){
    // do something to parentmovieclip["slot"+n]
    n++
    p.s.  please mark this thread as answered, if you still can.

  • Read variable from other method

    i am coding a method which required a reading from a variable in another method.
    what's the syntax for getting the variable???
    I tried.....
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    public static void main (String[ ]args)
    range_1
    private static double area (int radius, final double pi)
    radius = range_1
    return radius * radius * pi
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    but it doesn't work

    "private static double area (int radius, final double pi)"
    final double pi? as the method parameter? ROFLHAHAHAHAHAHAHAHAHAHAHA
    That made my day.
    As for your question, make range_1 a global variable, in other words, declare it outside your main method
    Something like
    public class gary{
    int range_1;
    public static void main (String afgfg[]){
    range_1=//something;
    private static double area (int radius)
    radius = range_1
    return radius * radius * 3.14

  • Accessing public variables from other classes

    Probably a simple questions, but how can I access a variable from another class. My exact situation is as follows.
    A class called WorldCalender has a variable which is defined: public int hour; (the value is given to it elsewhere).
    I want to access this variable and increase it by one in a subroutine in the class Hour. In this class I have put: WorldCalender.hour++; but it doesn't seem to work. How should I do it?

    don't expose the hour variable at all.
    have a method eg addToHourBy( int hrs )
    Probably a simple questions, but how can I access a
    variable from another class. My exact situation is as
    follows.
    A class called WorldCalender has a variable which is
    defined: public int hour; (the value is given to it
    elsewhere).
    I want to access this variable and increase it by one
    in a subroutine in the class Hour. In this class I
    have put: WorldCalender.hour++; but it doesn't seem to
    work. How should I do it?

  • Retreive int variable from other pages.

    Hi,
    My program is something like this:
    Content.jsp
    <script type="text/javascript">
    function clicked2()
    var x2;
    for (var i = 0; i < form1.radio.length; i++)
    if (form1.radio.checked)
    x2=(form1.radio[i].value );
    document.form2.hiddenTextBox.value = x2;
    </script>
    <%int i=0;
    for(int l=1;l<=(Ress.size()/4);l++){ //Ress is my vector of results
    %>
    <tr>
    <td width="10%">
    <form method="get" name="form1" action="Update.jsp">
    <fieldset>
    <input type="radio" name="radio" value="<%=l%>">
    </fieldset>
    <input type=submit name="submit" value="Update" onclick="clicked2()">
    </form>
    <br><br>
    <form name="form2" method="get" action="content.jsp">
    <input type=submit name="submit" value="Delete" onclick="clicked2()"><br>
    <input type="hidden" name="hiddenTextBox"><br>
    </form>
    <br>
    <% int y2 =0;
    if(request.getParameter("submit") != null){
    y2 =Integer.parseInt(request.getParameter("hiddenTextBox"));
    session.setAttribute("num",new Integer(y2));
    //For deleting data
    String Result="";
    Result=mb1.deleteRow(y2);
    if (Result.trim().toLowerCase().equals("deleted")){
    out.println("Deleted from the database");
    }else{
    out.print(Result);
    }%>
    update.jsp
    <%Integer i1=(Integer) session.getValue("num");
    int i2=Integer.parseInt("num");%>
    <td width="65%">
    <input type=text name="textno" value="<%=i2%>">
    </td>
    <%String first=request.getParameter("textfirst");
    String middle=request.getParameter("textmiddle");
    String design=request.getParameter("textdesig");
    String dept=request.getParameter("textdept");
    String Result="";
    Result=mb1.Updating(first,middle,design,dept);
    if (Result.trim().toLowerCase().equals("done")){
    out.println("Updated");
    //response.sendRedirect("content.jsp");
    }else{
    out.print(Result);
    }%>
    I am getting null value error when I click on update button for update.jsp.I know it's a looooong one.Sorry for taking u r time.Plz help. I am just submitting the abstract.

    "private static double area (int radius, final double pi)"
    final double pi? as the method parameter? ROFLHAHAHAHAHAHAHAHAHAHAHA
    That made my day.
    As for your question, make range_1 a global variable, in other words, declare it outside your main method
    Something like
    public class gary{
    int range_1;
    public static void main (String afgfg[]){
    range_1=//something;
    private static double area (int radius)
    radius = range_1
    return radius * radius * 3.14

  • 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 delete multiple variables from the variables list

    Hello,
    Iam using FrameMaker 9.0. Is there a way I can select multiple variables from the book and delete them together.
    Thanks,
    CP.

    NO in FM9. Take SQUIDDS TOOLBOX the free tool: 'Formats'
    'Formats' is a very helpful tool for 'deleting' paragraph formats, character formats, cross reference formats, table formats, color definitions and variables.
    You can delete unused one or all formats of selected. For paragraph and character you can also decide to 'add new one in catalog'.
    -Georg

  • Extract Environment Variable from System Variables

    Hi,
    I want to define a custom environment variable manually and from my code I want to retrieve the value for that system variable which I have created.
    Steps:
    Manual Actions
    1. Right Click "My Computer" >> Properties >> Advanced System Settings >> Advanced >> Environment Variables
    Here I have 2 options. User Variables and System Variables.
    In either of these I have to declare a variable - "Test Region" and its value as "Test1"
    Now, when I run my c# program I have to get "Test1" as output when I provide "Test Region" as parameter.
    Please provide me the code for this.

    Dear Cheong,
    It is working perfect now, when I restarted the PC.
    But the problem is each time when I change the Value of the environment variable, I need to restart the PC to make it effective.
    Is there any solution for this?
    Your support is much appreciated.

  • How do you use the windows User32.dll Library functions to read variables from other applications that are running

    I am trying to read a text box from a programme running at the same time as my Labview application using calls to the Windows
    User32.dll. I believe I need to find the window handle for the 'form' containing this text string and use this together with
    various other defined input variables to access the sting.
    I have no experience of using this 'Call Library Function Node', but have an understanding of the 'C' programming language. Does anyone have
    example Labview code showing how this might be done.
    Thanks

    If you're trying to access information that's being displayed in the window of another application and that application has no ActiveX interface, then yes, Windows calls can be used. There's a very good example on calling DLLs that ship with LabVIEW. Open the Example Finder (Help->Find Examples) and switch to the Search tab. Enter "Call" in the search box and open the VI "Call DLL". Run the VI, select any of the examples, and click the "Open Example VI..." button. That shows you how to call a DLL.
    Now, given that you have no experience in calling DLLs, have only an "understanding" of C (which to me means you have never written something like a DLL), and don't seem to know that much about what Windows functions you may need, you're going to find this route pretty difficult, especially since you have to deal with Windows API calls, which are not always that easy to do from LabVIEW.
    Let me propose an alternate solution. Go over to http://www.autoitscript.com/autoit3/ and download AutoIt. This is an automation tool that allows you to automate just about anything you want. It has an ActiveX interface that you can call from LabVIEW. I've attached an example VI that shows you how to use it to get the value of a text box from one of the tabs in the computer "System Properties" control panel applet.
    Attachments:
    AutoIt Example (v7).vi ‏25 KB

  • Use of variables from other class

    hallo,
    i have two classes A and B
    i would like to access a variable of the class B out of A class
    without class A extends B or
    A classA = new A();
    to use
    i attempted it with a constructor
    class A{
        B klb;
        public A(B b1){
        this.klb = b1;
       int a;
       a= klb.varausB;
    }with that I get, however, a NullPointerException
    in a similar form i saw it already once and it functioned
    somebody can help me?

    that is it what I mean
    public class ClassA {
    ClassB clb;
    public ClassA (ClassB cb){
    this.clb = cb;
    public static void main(String[] args) {
    System.out.println("Var from class B:
    class B: "+clb.varb1);// there is an error, i know
    but how it is right?
    public class ClassB {
    public String varb1 ="var b1";
    }nevertheless so similarly it should function, or?So if you create an instance of ClassA, clb will be initialized. But you don't do that in main. Hence your errors:
    1) You're not calling the constructor, so clb is null
    2) You're trying to access an instance variable without having an instance, so clb is not only null, it actually doesn't exist.
    public static void main(String[] args) {
      Class A myA = new ClassA();
      System.out.println("Var from class B: "+ myA.clb.varb1);
    }You're outside of any object, ehnce you need to address clb through an instance of ClassA.

  • How to access variables from other classe through getter ?

    Hi !
    I have 10 classes
    Cau_1.java containing char Cau_1_Answer;
    Cau_2.java... Cau_2_Answer;
    Cau_10.java... Cau_10_Answer;
    and another class Resume_grammar.java with char[] AnswerList = new Char[10] used to hold cau_1_Answer, Cau_2_Answer...Cau_10_Answer.
    but I don't success to get them.
    In Cau_1.java, I do :
    private static char Cau_1_Answer;
    static char getCau_1_Answer() {
              return Cau_1_Answer;
         static void setCau_1_Answer(char cau_1_Answer) {
              Cau_1_Answer = cau_1_Answer;
    if (a.isChecked()) {Cau_1_grammar.setCau_1_Answer('a');}
    if (b.isChecked()) {Cau_1_grammar.setCau_1_Answer('b');}
    if (c.isChecked()) {Cau_1_grammar.setCau_1_Answer('c');}
    if (d.isChecked()) {Cau_1_grammar.setCau_1_Answer('d');}
    Cau_2, Cau_3...are the same way.
    in Resume_grammar.java :
         static char[] AnswerList = new char[10];     
    AnswerList[0] = Cau_1_grammar.getCau_1_Answer();
    AnswerList[9] = Cau_10_grammar.getCau_10_Answer();
    When I make AnswerList display, all is null (nothing displayed).
    Please help ! What I do wrong ?
    Thank you !

    Johnny.vn wrote:
    Cau_1 is Question_1 (Vietnamese).
    I am developing a academic test application with many question and finally display the result of the test.
    Thank you.Back to the original question: why do you need to define different classes for different questions? Do they really behave differently in a way that can't be captured by a single class?

  • How to Derive value in a text variable from numeric variable.

    Hello experts!!
    I have a requirement where i need to show some derived text in the column headers of my BEx query.
    Say i have a text variable for the column header FYT which need to have the fiscal year text. I have another variable on 0FISCYEAR -- FY which has values of the fiscal year.
    I have used FYT = &FY&, so, if FY = 2007, then the column header will show '2007'.
    But my requirement is, If FY = 2007, then FYT should have FY-1, if FY = 2008, FYT should have FY-2 and so on.
    I am not sure if we can use a normal and a text variable in a formula together. Please suggest what to do.
    Thanks and Best Regards,
    Vikas Bittera.

    Hi Bob,
    Thanks for the reply. But i am very clear about the explanation given. I enter one FY value on the screen say 2007.
    Now depending on this value i have multiple columns say for 2008, 2009, 2010. So it will always vary according to the entered year. For example if i enter 2006, then i will have columns for 2007, 2008 and 2009.
    The requirement is to show text for these columns. Say FY-1, FY-2 and FY-3. But this text is not same always. Say i take the year 2007 as my reference year for the start of use of my application.
    Then when i will put 2008, then my columns should display FY-2, FY-3 and FY-4.
    Please give the steps needed for the same. Be assured for full points
    Thanks and Best Regards,
    Vikas Bittera.

  • CJE0 - REMOVE A VARIABLE FROM TAB 'VARIABLES'

    Hi ,
    I'm modifying a custom report creat by third party . I'm not able to remove the variable Object currency (it's shown in the selection screen of the report) as I don't see any button which lets me change(also in change mode) , the variables present into tab 'Variables' (between Characteristics, and OutputType).
    Thanks ,Carlo

    Hi,
    One option i found is you need to go to the form and when you double click on the rows it will give you an option to flip to something else. For example i created a report with transaction currency and it appeared as a variable. Later i went in tothe form and flip to object currency. Hope this helps.
    Regards
    Sreekanth

  • WAD - How do I hide Exit Variables from the variable listings?

    If i'm using an InfoField control to display the user input variables on top of my web template, how do i hide the user exit variables?
    I simply want to show the variables available to the user as 'Ready for Input' at runtime.  However all of the user exit variables appear as well.
    thanks in advance.

    Hi Webonomist,
    It is also my understanding that any settings applied in the CFAdmin would
    affect the entire server.
    Check out the <cfapplication> tag for handling session variables on an
    individual basis. Use caution when using cookies to hold session
    variables. As noted in serveral livedoc information articles, "If client disables
    cookies in the browser, client variables do not work".
    As for the <cflocation> tag
    <cflocation
    url="path_to_redirect_to"
    addtoken="no / yes"><!--- Include/not include token  --->
    Leonard

Maybe you are looking for