Manipulate the value of User Input Variable

Dear BI fellows,
I have a requirement to change the value that the user entered in variable screen (the variable type is a characteristic value variable, w/ processing by: user input), after the user clicks the execute button.
I tried creating 2 characteristic value variables, one w/ processing by: user input, to receive input from user, and the other one w/ processing by: user exit, which takes the value entered in the first variable and manipulate it, and eventually use this second variable to restrict data in the query.
But the problem is, the first variable must be associated w/ any characteristic in the query, and it eventually restricts data in query as well, which I don't want.
Thanks alot in advance.
regards,
arie

I browsed further on SDN and found someone mentioned about using variable in Restricted Key Figure/Selection, and eventually hide this Restricted Key Figure/Selection.
So we just make use of the first variable to receive user input and use the second variable w/ processing by: user exit to take value in first variable, manipulate it and use it to restrict the data.
The first variable doesnu2019t restrict the data, it only restricts for that particular key figure (Restricted Key Figure/Selection) which I then hide it.
Another thing is, I found that variable in Characteristic Restriction is executed first before variable in Restricted Key Figure/Selection.
Thanks all.
regards,
arie
Edited by: Arie Wirawan Margono on Jun 19, 2009 7:12 PM

Similar Messages

  • Read the value of user input variable during calculation of virtual char

    Hello
    Virtual characteristics is populated in custom BAPI based on values specified by user in the variable screen.
    How to read the value of user input variable outside the user exit for custom variables?
    The one way is to create faked user exit variable, read the value of user input variable in corresponding FM and insert it into table. Then value of this variable will be derived from the table.  
    Thanks

    no answer

  • How to check the value from user input in database or not?

    Hello;
    I want to check the value of user input from JtextFiled in my database or not.
    If it is in database, then i will pop up a window to tell us, otherwise, it will tell us it is not in database.
    My problem is my code do not work properly, sometimes, it tell me correct information, sometime it tell wrong information.
    Could anyone help,please.Thanks
    The following code is for check whether the value in database or not, and pop up a window to tell us.
    while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){ // If i find the value in data base, set flag to 1.
                  flag=1;  //I set a flag to check whether the id in database or not
                        break;
             System.out.println("falg" + flag);
                if(flag==1){ //?????????????????????
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else//???????????????????????????????
                  JOptionPane.showMessageDialog(null,"I could not found the value"); -------------------------------------------------------------------
    My whole program
    import java.sql.*;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JOptionPane;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class DeleteC extends JFrame
        public static int index=0;   
        public static ResultSet rs;
        public static Statement s;
        public static Connection c;
        public static  Object cols[][];
        private static JTable table;
        private static JScrollPane scroller;
        private static int flag=0;
        public DeleteC()
            //information of our connection
            //the url of the database: protocol:subprotocol:subname:computer_name:port:database_name
            String strUrl      = "jdbc:oracle:thin:@augur.scms.waikato.ac.nz:1521:teaching";
            //user name and password
            String strUser      = "xbl1";
            String strPass      = "19681978";
            //try to load the driver
            try {
                Class.forName("oracle.jdbc.driver.OracleDriver");
            catch (ClassNotFoundException e) {
                System.out.println( "Cannot load the Oracle driver. Include it in your classpath.");
                System.exit( -1);
            //a null reference to a Connection object
            c = null;
            try {
                //open a connection to the database
                c = DriverManager.getConnection( strUrl, strUser, strPass);
            catch (SQLException e) {
                System.out.println("Cannot connect to the database. Here is the error:");
                e.printStackTrace();
                System.exit( -1);
           //create a statement object to execute sql statements
        public void getData(String a){
            try {
             //create a statement object to execute sql statements
             s = c.createStatement();
                int index=0;
                Integer aInt= Integer.valueOf(a);
                Integer bInt;
                  //our example query
                String strQuery = "select id from customer";
                //execute the query
                ResultSet rs = s.executeQuery( strQuery);
                //while there are rows in the result set
                while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){
                  //JOptionPane.showMessageDialog(null,"I found the value"); 
                  flag=1;
                        break;
             System.out.println("falg" + flag);
                if(flag==1){
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else
                  JOptionPane.showMessageDialog(null,"I could not found the value");
            catch (SQLException e) {
                 JOptionPane.showMessageDialog(null,"You may enter wrong id");
    My main program for user input from JTextField.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.util.*;
    public class EnterID extends JFrame{
        public JTextField tF1;
        public EnterID enID;
        public String tF1Value;
        private JLabel label1, label2, label3;
        private static JButton button;
        private static ButtonHandler handler;
        private static String aString;
        private static Integer aInteger;
        private static Integer checkV=0;
        public static void main(String args[]){
           EnterID eId= new EnterID();
       public EnterID(){
          handler=new ButtonHandler();
          Container c= getContentPane();
          c.setLayout(new GridLayout(3,1));
          button= new JButton("ok");
          button.addActionListener(handler);
          label1 = new JLabel(" CustomerID, Please");
          label2 = new JLabel("Label2");
          label3 = new JLabel();
          label3.setLayout(new GridLayout(1,1));
          label3.add(button);
          label2.setLayout(new GridLayout(1,1));
          aString = "Enter Id Here";
          tF1 = new JTextField(aString);
          label2.add(tF1);
          c.add(label1);
          c.add(label2);         
          c.add(label3);            
          setSize(150,100);
          setVisible(true);     
       private class ButtonHandler implements ActionListener{
         public void actionPerformed(ActionEvent event){
             tF1Value=tF1.getText();
            //   CheckData cData = new CheckData();
             //  aInteger = Integer.valueOf(tF1Value);      
             if(tF1Value.equals(aString)){
              JOptionPane.showMessageDialog(null,"You didn't type value into box");
              setVisible(false); 
            else {
                DeleteC dC= new DeleteC();
                dC.getData(tF1Value);
                setVisible(false); 
    }

    You may have working code now, but the code you posted is horrible and I'm going to tell you a much much much better approach for the JDBC part. (You should probably isolate your database code from your user interface code as well, but I'm skipping over that structural problem...)
    Do this instead:
        public void getData(String a){
            PreparedStatement p;
            String strQuery = "select count(*) the_count from customer where id = ?";
            try {   
             //create a prepared statement object to execute sql statements, it's better, faster, safer
             p = c.prepareStatement(strQuery);
                // bind the parameter value to the "?"
                p.setInt(1, Integer.parseInt(a) );
                //execute the query
                ResultSet rs = p.executeQuery( );
                // if the query doesn't throw an exception, it will have exactly one row
                rs.next();
                System.out.println("i am testing");
                if (rs.getInt("the_count") > 0 ) {
                // it's there, do what you need to...
             else
                  JOptionPane.showMessageDialog(null,"I could not find the value");
            catch (SQLException e) {
                 // JOptionPane.showMessageDialog(null,"You may enter wrong id");
                 // if you get an exception, something is really wrong, and it's NOT user error
            // always, always, ALWAYS close JDBC resources in a finally block
            finally
                p.close();
        }First, this is simpler and easier to read.
    Second, this retrieves just the needed information, whether or not the id is in the database. Your way will get much much slower as more data goes into the database. My way, if there is an index on the id column, more data doesn;t slow it down very much.
    I've also left some important points in comments.
    No guarantees that there isn't a dumb typo in there; I didn't actually compile it, much less test it. It's at least close though...

  • Limiting the value help for a user input variable as required

    Hello Gurus,
    I have a requirement :-
    Restrict the value help for a user input variable in a query to only a required set of values instead of the default behaviour. ie instead of having all the values in the master data of that characteristics in the value help.
    How do I go about it? - Do I have to explore the precalculated value set feature?
    If so, please tell me how to go about it in BI 7.I would appreciate if you could explain it in detail rather than sending me a URL because I have gone through most of them but Iam yet to figure out how to create the broadcast setting and subsequent steps.
    Thanks for your time.
    Regards,
    Kris_Hitman

    I believe if the User doesn't want to see any particular values in F4 help then it means they are not intrested in viewing the transaction data related to those values.
    So why don't you restrict that object with the required values. Then the F4 help will automatically display only those values.

  • How to create an user input variable in SEM-BPS?

    Hi,
    anyone please guide me how to create an user input variable in SEM-BPS? I want to utilized user input variable to udpate characteristic with repost function.
    I tried to create in planning folder, variables right-click create, but the system said 'operation cannot be executed here'...
    please help....
    thanks.

    Hi Bindu,
    would you give me one more help,
    I want to use the variable created for a repost process, how do I achieve that?
    My scenario:
    - There will be a repost function on the planing folder
    - User can select a row or many rows then click the repost function button, then a popup window will appear for user to input the value for the variable
    Is it possible with the scenario? Please advise if I can use standard repost function or should i create a FOX or exit function for this purpose.
    thanks.

  • How to get the value entered in input enabled field of a list output?

    Hi all,
    I am developing a program to display  list with two input enabled fields . After users enetered the values into these fields I need to do some calculations based on these values and modify the value of another field in the list.
    But i couldn't have an idea how to read the values after users enter into these fields.
    Please help me on solving this problem?  If possible please provide the sample code.
    Thanks,
    Aravind.

    You can enable disable screen fields in at selection screen output event.
    And by using loop at screen.
    And for changing the values you can do in initialization event.
    I Hope you are doing these in Reports.

  • Can I Access the Value of a Global Variable in a Trigger

    I'm using a Global variable in a Package which i use in the BIU Trigger to populate a column. After assigning the value for that global variable, I run an INSERT in the same package. But I find only the default value of the Global variable populated in the column. Can I use a Global Variable in a Trigger? Is there any way to put in a common value across all the tables in an application for all DMLs of a particular session?

    Helios,
    I'm already having the same setup mentioned in the thread. And I'm doing exactly whats given there. But the issue seems to be something different. I'm assigning the value to the Global Variable in the Package through Apex. Here's the Package Code:
    CREATE OR REPLACE PACKAGE Schema1.SPMS_SECURITY_PKG
    AS
    X_app_user_id NUMBER DEFAULT -1;
    FUNCTION USER_ID RETURN NUMBER;
    END SPMS_SECURITY_PKG;
    CREATE OR REPLACE PACKAGE BODY Schema1.spms_security_pkg
    AS
    FUNCTION user_id
    RETURN NUMBER
    IS
    BEGIN
    -- RAISE_APPLICATION_ERROR(-20001,'USER ID'||'*'||X_app_user_id);
    RETURN NVL (x_app_user_id, -1);
    -- RETURN NVL (sys_context('USERENV', 'CURRENT_USER'), -1);
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN -1;
    END;
    And Here is the Trigger Code:
    CREATE OR REPLACE TRIGGER Schema1."USER_DETAILS_TRIGGER"
    BEFORE INSERT OR UPDATE
    ON PMS_SICAL.SPMS_USER_DETAILS REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    IF INSERTING
    THEN
    :NEW.created_by := spms_security_pkg.user_id;
    :NEW.created_date := SYSDATE;
    :NEW.START_DATE := SYSDATE;
    ELSIF UPDATING
    THEN
    :NEW.updated_by := SPMS_SECURITY_PKG.X_app_user_id;--spms_security_pkg.user_id;
    :NEW.updated_date := SYSDATE;
    END IF;
    END;
    But I always get -1 in the both in the table after the DMLs.

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • How to create an user input variable for customer exit variable? - BW3.5

    Hi Guru,
    I have a requirement for the selection period of my reports. There are 3 possible reporting periods which should be user selectable:
    1. Month: Current reporting month
    2. Fiscal Year to Date
    3. Project Year to Date
    Here I need 2 variable to do these, 1 customer exit and 1 user input variable. I have created a variable customer exit to calculate all these requirement. But can any1 tell on how to create the user input variable for my customer exit? I need a user input variable with drop down list like below.
    01-Current month
    02- Fiscal Year to Date
    03-Project Year to Date
    I have create a new master data for this variable, but it's not working. What I need now is a standalone master data which do not need to link to any exiting records. Can any1 tell me how to create this?

    Just go to the definition of the variable for which you have created a customer exit. There you will find a check box for "Ready for Input". Just tick that checkbox and the variable will be available as a selection variable in the reports selection screen.
    Regards,
    Yogesh

  • The type of the value being assigned to variable ... differs from the current variable type

    I am trying to load a variable on SSIS Execute SQL Task with a string value. I keep on getting an error message :-
    “The type of the value being assigned to variable “User::LegacyColumns” differs from the current variable type”.
    Below are the settings on my package:
    Execute SQL Task Result Set –
    Single Row
    Variable Data Type –
    String
    The data to be loaded on the variable is a single row shown below:
    FirstName,LastName,MiddleName,PatientType,Title
    Can someone kindly help me to solve this as I’m lost for ideas.
    Thanks,
    Mpumelelo

    Thank you Sorna. I think I have managed to solve it. After a long search I have found a solution which advises that I should use a Foreach Loop Container. The help is on this link:
    https://social.msdn.microsoft.com/Forums/en-US/f46dea91-c26b-4ffe-ab1c-ebeef57c90b6/error-0xc001f009-at-mypackage-the-type-of-the-value-being-assigned-to-variable?forum=sqlintegrationservices
    Mpumelelo

  • How to get the value of an input text in a table

    all,
    i have an adf table component on my jsf page and i added an input text component to one of the table columns. how do i access the value of that input text in my backing bean? normally, i would just do a getValue(), but because the input text is in the table i'm assuming it has to be treated as an array somehow.
    any help would be appreciated,
    paul
    btw. jdev 10.1.3

    Frank,
    I found a solution to fetching the column values. I created a transient attribute on my view object and bound my column to the transient attribute. Then I used this post from Duncan Mills
    http://groundside.com/blog/DuncanMills.php?title=adf_validation_context_in_a_jsf_table&more=1&c=1&tb=1&pb=1
    to get to the data by looping through the table rows.
    However, I'd still like to use the value from this transient attribute in logic to populate some other columns in the table. I
    for example, here's the content of what's submitted:
    name phone transient
    ==== ===== =======
    paul null 555
    mary null 444
    In my backing bean I'd like to get the rows from the table and read the value of the transient attribute, pass it through a function, and set the value of the column phone to some value for each row. Then have that processed to update the db. Is this possible?
    Thanks,
    Paul

  • Problem setting the value of a substitution variable in a calc script

    Hi, All.
    I'm trying to update the value of a substitution variable inside an IF statement and I'm having trouble.
    Here's the code:
    *"Jan"(*
    IF  (LoopCounter = 1) &varEntity = "100";
    ENDIF;)
    the error I get back from EAS is:
    Error: 1200336 Error parsing formula for [Jan] (line 54): [(] without [)]

    I know CL knows a lot about HBR, if he's around today... LOL
    As a matter of fact, I just used an HBR (not using Calc Manager till I have to)'s macro functionality to drive fx for different Scenarios in a Planning app. Here's how I call the macro:
              /*     Call the macro mcrFxCoreOutYears for the four fx rate types for ALL 12 months of the year.     */
              FIX(&BudYear)
                   %mcrFxCoreOutYears(Constant)
                   %mcrFxCoreOutYears(Comparable)
                   %mcrFxCoreOutYears(Estimate)
                   %mcrFxCoreOutYears(Actual)
              ENDFIXI pass the Scenarios Constant, Comparable, Estimate, and Actual to the macro mcrFxCoreOutYears. You can apply HBRs against Essbase.
    I believe (I can't remember what exactly -- is it that templates don't accept parameters? That seems hard to believe. Looking at a CM template, that does seem to be the case. Bummer if I'm right.) that Calc Manager BRs have less functionality wrt templates, but I haven't worked with CM for over a year.
    It works really well -- a single place to maintain code and no appreciable performance cost.
    You cannot launch a HBR from a MaxL script but HBRs can be launched from command lines -- this may constrain where you place your automation (it basically has to run off of whatever the EAS server is. You may end up shelling out of MaxL to execute the HBR or even execute scripts across servers -- that does get more complicated.).
    Anyway, if you have any more questions, ask away -- it really is a very powerful component. I will have to look at CM more closely (sooner or later I will lose the HBR vs CM argument and at least need to know if templates support parameters) to see if I'm right on what I wrote above.
    Regards,
    Cameron Lackpour
    P.S. You cannot define an ARRAY in an HBR macro because ARRAY arrayname[value] gets read as a parameter. I ended up declaring the array in the calling HBR.
    P.P.S. I really need to write up the fx approach in a blog post -- it is wicked fast and really easy to use. Too many other posts in the queue already.
    Edited by: CL on Aug 24, 2011 1:48 PM

  • DB2Exception - The value of a host variable in the EXECUTE or OPEN statemen

    I want to store a XML file into database.
    To undersdande my problem, please see the code below:
    java.sql.Connection conn = null ;
    PreparedStatement ps;
    // Here I'm calling a function to get Database Connection.
    String sXmlFile = "" ; // This variable stores a XML file as String
    String sSQL = "INSERT INTO Crs_x_xml (XML_TRAN_ID,XML_MESSAGE,SUSPENDED_FLAG ) VALUES(?,?,?)";
    try {
         ps = conn.prepareStatement(sSQL);
         ps.setLong(1,1);
         ps.setBytes(2, sXmlFile.getBytes());
         ps.setString(3,"A");
         ps.executeUpdate();
         conn.close();
    } catch (Exception e) {
         e.printStackTrace();
    The Problem:
    The table Crs_x_xml that I used has three columns, the first is a int, the second is a BLOB and third is Char(1) and its in DB2 running on AIX.
    Sometimes it execute very well. But sometimes gives following error :=
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/AIX64] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
    I dont know whats going wrong. Plz help....
    ~Abhijeet

    Hi,
    I am using a CMP query in websphere, in which i am trying to execute a select query.
    The query is as follows:
    SELECT OBJECT(o) FROM HrTmmbrAct o WHERE o.tmmbrActC IN ( 1,2,3 ) AND o.effD BETWEEN '2000-02-11' AND '2008-02-22'
    The tmmbrActC is defined as a string in the Websphere CMP fields. I am not sure now to pass the value to it. Do we need to pass it as objects. pls help.
    Thanks
    - Giri

  • How to change the value from one input control to another input control?

    Hi Experts,
    I want to change the value from  one input control to another input control. For Example if i change month in first tab. it should reflect in second tab also. How should we acheive through input control or some other option.
    Here I attached screen shot.Please help me for this

    Hi,
    It is not possible to have Input controll in all tabs that will be set from another .
    But There is one workaround .
    Follow the link below .
    http://davidlai101.com/blog/2013/08/13/web-intelligence-input-control-that-affects-all-tabs/

  • Setting the value of a java variable in javascript function

    How can i set the value of a java variable in a javascript function?
    <%
    String fName = "";
    %>
    now i want to define a javascript function which can set the value of fName to the value it has been passed.
    <script language="javascript">
    function setJValue(val)
    </script>
    Thanks

    The only way you could simulate this, would be call the same page inside the Javascript function, and send it the parameter that was passed. Then you would have your Java code retrieve this parameter by request.getParameter("value");, and set the variable accordingly.

Maybe you are looking for

  • How can I create a form requesting a digital signature at the end?

    I'm looking to create a form for a meeting that allows attendees to fill out their address and pertinent information as an agreement and at the conclusion of the form give them the option to sign electronically/digitally. How can I do this? Is Adobe

  • How do I view other's tweets after updating to iOS 5?

    HELP! I just downloaded the new iOS 5 with integrated Twitter but I don't know how to veiw other's tweets that I am following! Please help!

  • Bug in 10.1.3

    In swing programming, jdeveloper will lose the menu's caption setting.

  • After headache of upgrade to 3.1 vault is now stalled.

    I upgraded to 3.1 and went through that whole headache of having to rebuild the library etc.. Eventually got everything sorted out. I worked in Aperture this morning and then updated vault. First time updating vault since upgrade to 3.1 and now the u

  • Error when loading data into Planning

    Unable to load data into planning 11.1.2.3.200 using ODI 11.1.1.7 Please find the errors from below logs: INFO  [SimpleAsyncTaskExecutor-2]: Oracle Data Integrator Adapter for Hyperion Planning INFO  [SimpleAsyncTaskExecutor-2]: Connecting to plannin