Set value in af:query with value from method

hello all
i have problem, when they want set value in af:query (inputText) with value from method, how to do that?
anyone help..?
thx
agungdmt

Hi,
are you facing this issue when you try to show few values on right side (selected list) of shuttle component.
what is your usecase exactly ?

Similar Messages

  • Send values to IN query with parameter

    Subject: send values to IN query with parameter
    Hello. Hope I'll explain my problem well enough:
    I have a query:
    -- select id from table where id in ('100')
    Now I used parameter for the IN part:
    -- select id from table where id in (:param)
    and I gave the parameter the value 100.
    now I want to have the query with two values:
    -- select id from table where id in ('100','200')
    I tried to use the parameter and give him the value of: '100','200'.
    It didn't worked :(
    Is there a syntax to give the parameter more then one value for the IN query (with out using another table or function etc')?
    Thanks in advance,Roy.

    This is the best solution I have for it.
    variable parameter varchar2(4000);
    exec :parameter := 'SYSTEM,SYS';
    select username
    from dba_users
    where username in ( select COLUMN_VALUE from table  (split_string(:parameter,',')))It uses this function
    CREATE OR REPLACE
    type string_table  as table of varchar2(4000)
    CREATE OR REPLACE
    FUNCTION split_string (
         string IN varchar2,
        delimiter IN varchar2
    ) RETURN  string_table IS
         tab string_table;
         pre integer;
         post integer;
         step integer;
         i integer;
    BEGIN
         pre := 1;
         step := length(delimiter);
         i := 0;
         tab := string_table();
         loop
              tab.extend;
              i := i + 1;
              post := instr(string,delimiter,pre);
              if ( post = 0 ) then
                   tab(i) := substr(string,pre);
                   return tab;
              end if;
              tab(i) := substr(string,pre,post-pre);
              pre := post + step;
         end loop;
    END;
    /Bye Alessandro

  • BEx query with variant from ABAP

    Hello,
    I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
    regards,
    Krzysztof

    Hi,
    the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
    What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
    Here is my example, which is not working.
    DATA:
      lv_query(30) TYPE c,
      lv_genuniid  TYPE rsrrepdir-genuniid,
      ls_var       TYPE rrx_var,
      lt_var       TYPE TABLE OF rrx_var.
    lv_query = 'YB_MAKLER_DETAIL'.
    CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
      EXPORTING
        input  = lv_query
      IMPORTING
        output = lv_genuniid.
    IF lv_genuniid = ''.
      WRITE: / 'There is no Query', lv_query.
    ELSE.
      ls_var-vnam = 'YS_MKLE'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '0000005100'.
      APPEND ls_var TO lt_var.
      ls_var-vnam = 'YS_VTGJ'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '1999'.
      APPEND ls_var TO lt_var.
      CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
          i_genuniid                       = lv_genuniid
          I_OBJVERS                        = 'A'
          i_hide_sapgui                    = 'X'
        TABLES
          I_T_VAR                          = lt_var.
    ENDIF.
    If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
    If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
    Do you have any idea how to pass parameters to the query with this function module?
    Regards,
    Krzysztof

  • Query with 'different from' clause in Sqlite

    My question is very simple:
    How can I submit a query with a 'different from' clause into a table.
    In AIR, I would like to query :
    "select * from myTable where myField <> 'value' ";
    but it does'nt work !
    Nor
    "select * from myTable where myField != 'value' ";
    nor
    "select * from myTable where myField is not 'value' ";
    is it impossible to query with a 'different from' clause in Sqlite wih Adobe Air

    Hello,
    SQLite in AIR does support 'different from' and '<>' is the correct operator. Take the following emp table for example:
    id
    name
    age
    1
    A
    26
    2
    B
    30
    3
    C
    28
    If you want to query the records whose name isn't A. The following SQL is correct:
    select * from emp where name <> 'A'
    Thanks,
    Yang

  • Query with variant from ABAP

    Hello!
    I need to execute a BW-query from an Abap-report.
    I tried it already with function module 'RRW3_GET_QUERY_VIEW_DATA' and with classes / objects 'CL_RSR_REQUEST' resp. 'CL_RSR_DATA', but:
    I want to use the query with a variant, which could be found in table RSRPARAMETRIZA.
    (Btw: even with a variant in table RSRVARIANTDIR  I don't get the results wanted...)
    Is there a direct way to call a BW-query with a variant from Abap?
    Alternatively: How do I get the variant-contents? Is there a 'universal' way to work with both kinds of variants? (RSRVARIANTDIR / RSRPARAMETRIZA) 
    Thanks in advance.

    Thanks for the link.
    Well, I already read that document and I followed the links to the former blogs on this subject.
    But this solution doesn't work for me: CL_RSR_QUERY_VARIABLES is unknown.
    I read the pdf and the function-module-code, but I still don't have an idea how to work with query- variants . The example-coding includes a line
    DATA: wf_variant TYPE variant .
    but that's not used, or is it?
    (I don't have a set of variables and conditions, but just a variant-name. The variant will be created by other people, who would start my report.)
    Greetings

  • Parametrized query with output from sql

    Hey all,
    has anyone figure out how to use the database connectivity toolset to perform a parameterized query with outputs (SQL)? From the other threads that i have read it would seem that this issue is not resolved. The error i get is:
    Error -2147467259 occurred at Cmd Execute.vi->getjobID.vi
    Possible reason(s):
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [MySQL][ODBC 3.51 Driver][mysqld-5.0.50sp1a-enterprise-gpl-log]OUT or INOUT argument 3 for routine eln.lv_caperJob_create is not a variable or NEW pseudo-variable in BEFORE trigger in Rec Create - Command.vi->Cmd Execute.vi->getjobID.vi
    However, In Toad for mysql the following call works:
    set @outJobID=-999;
    set @outMsg="";
    call  lv_caperJob_create('TestJune30_2', '207', @outJobID, @outMsg);
    select @outJobID, @outMsg
    Attached is the LV code i am using. Thanks!
    Attachments:
    db code.JPG ‏50 KB

    Your first approach gave you an error because it took the ? parameter inside the '%?%' string and treated it as whole string as '%?%'. As you set the parameter, it did not understood where it need to insert the parameter.
    Your second approach is pretty much OK, only problem is you are trying to set the parameter with a string and aging creating the string while setting the parameter.
    The solution will be to create the whole string before setting the parameter and set the created String as parameter on the query something like this.
    String parameter = "%"+searchString+"%";
    Then set the parameter string to the query.
    Thanks

  • Query with Tables from another Database

    Hi.
    I have a problem with a Query that executes a stored procedure that inserts data in a Table from another DataBase. The problem is when I try to execute a Query with the data related of that table using the user parameters of SBO ('[%0]'....'[%3]'). I use the following parameters for reference to the Table:
    "....FROM [-BDName-].[dbo].[-TableName-] T1..... "
    Any suggestions? Thanks a lot....
    (Suggestions in English or Spanish)

    None

  • BC4J,Setting a default Value In a View With Data From An Other View

    hi
    I'm developping A BC4J. I want to set the default value of a field By counting the number of rows in an other view.
    So I want to instanciate the view and execute the sql statement and get the result.
    Is that the right manner to do it or not.
    can someone help me to do that
    cheers
    ghassen

    There's lots of ways to skin this cat depending upon whether you mean "database view" or "view object" when you say "view", and individual requirements.
    Given database views v1 and v2 with a common key between them
    select v1.x, count(*) from v1,v2 where v1.key = v2.key group by v1.x;
    either in the database view or in expert mode for the view object ( I think it'll take group by, but never done it ). ( assumption is that v1.x is a primary key for v1 )...
    Try this from sql*Plus first to get a feel for how this works.
    The catch with the above is that it is "static"... if you can ADD rows to v2 in your application... they aren't visible in the count until saved and requeried.
    Another way ( I think... hopefully Oracle folk will kibitz... )
    Create your own attribute on the view object like "TheOtherCount".
    In the view object's RowImpl, find the "getTheOtherCount". Find the count of rows in the second view object or entity object or rowSetInfo through the method of your choice. ( If you've already set up a master detail relationship that is active you can just get the rowcount! ). Refer to earlier postings on how to get the rowcount, or to create a dynamic view query to get the count.
    The nice thing is that this should reflect your counts even if the second view has added or removed rows... but will probably move like a snail.
    Note that if you have a need where you want the row count updated in a frame for v1 whenever v2 is added to or removed from... well... then you need to set up some sort of event listener to do a redisplay of v1's frame, I'd think? Since the attribute you've created in the view object is not based on an entity object attribute, it has no way to know when it has been "updated" via an additional or removed row from the target.
    I'm posting the above because no one has responded yet... it may form a place to start from. And maybe someone in the know will go "No, No, No... KKirk... it doesn't work that way at all!" and fill us in on how this can be accomplished!
    Good Luck

  • Writing query with conditions from textbox control on a form

    i have written the following code for a query to run on a condition....
    and i want to pass the condition value from textbox not directly as i did in my code
    i want to get it from a textbox control on form
    how to do this ....?
               oConditions = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_Conditions)
               oCondition = oConditions.Add
               oCondition.BracketOpenNum = 1
                oCondition.Alias = "U_RentedAvailable"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = "Y"   ' i want to get it from a textbox control on form
                oCondition.CompareFields
                oCondition.BracketCloseNum = 1
               oDBDataSource.Query([oConditions])
                oMatrix.LoadFromDataSource()

    thanx for ur reply....
    here i'm using UDO object for my table....when i enter data on my textbox and click on find i'm not getting data
    ..here is the sample code what i have written....
    Public Sub loadMatrix()
            oitem = oForm.Items.Item("8")
            oMatrix = oItem.Specific
            oColumns = oMatrix.Columns
            oDBDataSource = oForm.DataSources.DBDataSources.Add("@VIDS_MGT")
            '' ''' setting conditions...
            '' to create the new condition collection
            Try
                oConditions = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_Conditions)
                oCondition = oConditions.Add
                oCondition.BracketOpenNum = 1
                oCondition.Alias = "U_RentedAvailable"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = DirectCast(oForm.Items.Item("7").Specific, SAPbouiCOM.EditText).Value.ToString()
                oCondition.BracketCloseNum = 1
                '' '''End of  setting conditions...
                oColumn = oColumns.Item("V_5")
                oColumn.DataBind.SetBound(True, "@VIDS_MGT", "Code")
                oColumn = oColumns.Item("V_4")
                oColumn.DataBind.SetBound(True, "@VIDS_MGT", "Name")
                oColumn = oColumns.Item("V_3")
                oColumn.DataBind.SetBound(True, "@VIDS_MGT", "U_CardCode")
                oColumn = oColumns.Item("V_2")
                oColumn.DataBind.SetBound(True, "@VIDS_MGT", "U_ShelfNumber")
                oColumn = oColumns.Item("V_1")
                oColumn.DataBind.SetBound(True, "@VIDS_MGT", "U_SpaceNumber")
                oColumn = oColumns.Item("V_0")
                oColumn.DataBind.SetBound(True, "@VIDS_MGT", "U_RentedAvailable")
                oDBDataSource.Query([oConditions])
                oMatrix.LoadFromDataSource()
            Catch ex As Exception
                SBO_Application.MessageBox(ErrorToString)
            End Try
        End Sub

  • Creating a Query with Data from 4 Tables.

    Hey guys. I'm having a small problem figuring out the best way for me to handle this query.
    I'm trying to make a query which outputs the amount of appointments a GP has furfilled, and the total amount allowed.
    I have 4 tables, for each I'm just gonna list the relevent columns:
    Appointment: ID, Patient_ID.
    Patient: ID, GP_ID.
    GP: ID, Trust_ID.
    Trust: ID, Quota.
    Appointment table has 400 entries (2 per patient atm).
    Patient table has 200 entries.
    GP Table has 30 entries (GP's can be assigned to more than one person) .
    Trust table has 6 entries.
    What I need to do is, look at the appointment table and get the number of times each patient has an appointment.
    Go through the patient table, and find out which GP the patient in the appointment belongs to.
    Add each occurance to the correct GP.
    Find out which Trust each GP belongs to, and add the total for each GP to the correct Trust.
    Check the quota in the Trust table, to see if the total is more than the allowed.
    I can't seem to think of an easy or simple way for me to do this. Can anyone help please? Many thanks.

    Hi,
    That sounds like a job for JOIN.
    To check the quotas against the total, use the SUM function; either the aggregate SUM or the analytic SUM, depending on your requirements.
    Sorry this answer is so vague, but that's the bes I can do with the information provided so far.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved. In this case, between 2 and 10 rows of data per table should be enough to show what you need to do.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.

  • Need help with writing a query with dynamic FROM clause

    Hi Folks,
    I need help with an query that should generate the "FROM" clause dynamically.
    My main query is as follows
    select DT_SKEY, count(*)
    from *???*
    where DT_SKEY between 20110601 and 20110719
    group by DT_SKEY
    having count(*) = 0
    order by 1; The "from" clause of the above query should be generated as below
    select 'Schema_Name'||'.'||TABLE_NAME
    from dba_tables
    where OWNER = 'Schema_Name'Simply sticking the later query in the first query does not work.
    Any pointers will be appreciated.
    Thanks
    rogers42

    Hi,
    rogers42 wrote:
    Hi Folks,
    I need help with an query that should generate the "FROM" clause dynamically.
    My main query is as follows
    select DT_SKEY, count(*)
    from *???*
    where DT_SKEY between 20110601 and 20110719
    group by DT_SKEY
    having count(*) = 0
    order by 1; The "from" clause of the above query should be generated as below
    select 'Schema_Name'||'.'||TABLE_NAME
    from dba_tables
    where OWNER = 'Schema_Name'
    Remember that anything inside quotes is case-sensitive. Is the owner really "Schema_Name" with a capital S and a capital N, and 8 lower-case letters?
    Simply sticking the later query in the first query does not work.Right; the table name must be given when you compile the query. It's not an expression that you can generate in the query itself.
    Any pointers will be appreciated.In SQL*Plus, you can do something like the query bleow.
    Say you want to count the rows in scott.emp, but you're not certain that the name is emp; it could be emp_2011 or emp_august, or anything else that starts with e. (And the name could change every day, so you can't just look it up now and hard-code it in a query that you want to run in the future.)
    Typically, how dynamic SQL works is that some code (such as a preliminary query) gets some of the information you need to write the query first, and you use that information in a SQL statement that is compiled and run after that. For example:
    -- Preliminary Query:
    COLUMN     my_table_name_col     NEW_VALUE my_table_name
    SELECT     table_name     AS my_table_name_col
    FROM     all_tables
    WHERE     owner          = 'SCOTT'
    AND     table_name     LIKE 'E%';
    -- Main Query:
    SELECT     COUNT (*)     AS cnt
    FROM     scott.&my_table_name
    ;This assumes that the preliminary query will find exactly one row; that is, it assumes that SCOTT has exactly one table whose name starts with E. Could you have 0 tables in the schema, or more than 1? If so, what results would you want? Give a concrete example, preferably suing commonly available tables (like those in the SCOTT schema) so that the poepl who want to help you can re-create the problem and test their ideas.
    Edited by: Frank Kulash on Aug 11, 2011 2:30 PM

  • Condition Specific or attach query with chose from list

    Hi All,
    I have developed a form with the header containing the Customer Code and Name and the Rows containing columns like SO Number, Item Code, Item Name and Quantity.
    The SO Number field has a chose from list and I want that this will show only the Open Sales orders for the customer selected in the header CUSTOMER CODE field of the form.
    Similarly The ITEM CODE choose from List will only show the items in that particular selected Sales Order in the first column of that row.
    This is very much being possible through formatted search attached. But I wish if this can be done by adding condition or query to the choose from list. Please help me in this regards with your suggestions.
    Please provide a sample code if any has already done something like this.
    Regards,
    Raj

    Hi,
    U can use a CFL with conditions. So when u tab out u can get only the required records.
    Check out the below threads for some samples for CFL conditions. Search the forum for more samples.
    CFL with conditions
    cfl conditions
    RE: CFL Conditions
    CFL Conditions and Edit Text
    Vasu Natari.

  • Update Query with Results From another Procedure

    I am not sure if you can do this or what the proper format of the command might look like.
    I have a stored procedure which insert records into a database. I want to insert the records which are returned by calling another procedure. This other procedure returns a cursor object to a variable named o_rows. Can this be done using Oracle 8i?
    Insert into MyTable
    MyStoredProcedure(oRows);

    You have a couple of options.
    1) You can turn your stored procedure into a pipelined table function. This would allow you to do something like
    INSERT INTO myTable
      SELECT *
        FROM TABLE( myStoredProcedure() );I don't believe that pipelined table functions were available in 8i, however.
    2) The other option would be to fetch rows from the cursor and insert those into your table. Something like
    LOOP
      FETCH oRows INTO col1, col2, col3, col4, ...
      INSERT INTO myTable( <<column list>> )
        VALUES( col1, col2, col3, col4 );Note that for simplicity I am omitting the declarations of the local variables col1, col2, etc. and the check to see whether the cursor was exhausted.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Query with information from SD tables

    Dears,
    I have two questions concerning the creation of a Query which reports information of sales orders and information related to these (tables VBAK, VBAP, KNA1, VBKD).
    1. I want to include for example the ship-to-party, but I only find the field in structures, so it would not be able to include... or is there another way to acces this field?
    2. I want to include the field KONWA (rate unit). It should appear showing the rate unit depending on the condition type PR00 on item level... Is this possible?
    If anybody could help me out on this topics, I would appreciate it a lot!
    Thanks in advance,
    Dominik Ley
    Chile

    Hi,
    The answer for the first question is If you want to include ship to party at
    a)Header level:Simply pass the order number in to VBPA  table and fetch for PARVW="WE" having POSNR=000000.By default header details will appear in this table.Take "ADRNR" field contents and pass to ADRC table to fetch the address.
    b)Item level:If you want ship to party address at the item level Simply pass the order number in to VBPA  table and fetch for PARVW="WE" having POSNR=000010 or 000020 like that what ever is your line item number.If it recognises any change in change at the line item then only the entry will appear in the table.otherwise you cannot find any entry in the table.Take "ADRNR" field contents for the corresponding line item and pass to ADRC table to fetch the address.
    Regards,
    Mohan.

  • Setting up a new iMac with backup from Macbook Pro -- is it possible?

    I am retiring my old Macbook Pro, and would like to change over to an iMac or Mac Pro since I am tired of hauling my work back and forth every day. I have my Macbook backed up using Time Machine -- can I use that backup to set up a new iMac?

    I would strongly recommend reading the late great Pondini's article on Setup Assistant and Migration Assistant:
    http://pondini.org/OSX/SetupLion.html

Maybe you are looking for