Poplist and displaying corresponding values from the database table

Hi
I have a poplist in a control block, the values of which are populated using a procedure. This is called in when-new-form-instance.
This part works fine and values are filled in the poplist when form is opened..
The datablock is based on a view. 3 columns from the view are selected to be displayed.
Also the databock is filled with all values (for selected columns)
Now when the poplist value is changed, I need the values in the datablock to be changed as well, but this is not happening.
In my when-list-changed trigger, I have:
go_block('datablock');
execute_query;Please tell , where and what should I add to display the datablock values as per the poplist value.
i.e, something like,
select col1,col2,col3 from <view> where col4 =:control.col4
Note:I tried in the where clause property of the block, but then nothing is displayed in the datablock
Thanks

This does not work , either..
Before, when I changed the values from the list, it was still displaying same data on datablock always(all records)
Now when I give this code,data is displayed in datablock only once(first time when the form opens)
I have defined the Query data source type property on data block as "Table" but infact this datablock is based on a view..is this correct?
Anything else I could try?

Similar Messages

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How to select alternate entries from the database table

    Hi Experts,
    can u help me, how to select alternate entries from the database table.
    Thanks

    As there is no concept of sequence (unless there is a field specifically included for the purpose), there is no meaning to "alternate" records.
    What table do you have in mind, what data does it hold, and why do you want alternate records?
    matt

  • Can I restore the deleted statistical data from the database tables?

    Hi all,
       I have deleted the statistical data from the database tables like(Ex: RSDDSTAT, RSDDSTATWHM,..) by mistake through RSA1> Tools> BW Statistics for Infoproviders--> Delete.
    Is there any way to restore the deleted data back? Thanks in advance.

    Now I'm really confused-
    Your first post said
    "<b>I have deleted the statistical data from the database tables like(Ex: RSDDSTAT, RSDDSTATWHM</b>,..) by mistake through RSA1> Tools> BW Statistics for Infoproviders--> Delete."
    but your last respsonse said
    "I have deleted the BW Statistics data, <b>not the actual data in RSDDSTAT tables</b> through
    RSA1 -> Tools -> BW Statistics for InfoProviders -> clicked 'Delete' bin to delete data."
    If you used the RSA1 -> Tools -> BW Statistics for InfoProviders -> clicked 'Delete' - <b>then you deleted the data from the RSDDSTAT tables</b>. This assumes you accepted the default date range that would have popped up after the clicking on the Delete button which specified to delete thru the current date.  If this is what you did, the data is gone.  Your only hope is be to recover from a DB backup.  
    The data in the RSDDSTAT tables is what is used to feed the BW Statistics cubes, generally on a daily basis.

  • Dynamic Column Names from one table and its corresponding values from another table

    I have 2 tables. First tables gives the specification if a column is required or not. we have the 2nd table with the same column name where we provide the actual values.
    I want to select all the required columns from the 1st table and retrieve the values for those from the 2nd table. Both this i want to achieve in a single select statement.

    This wil require a dynamic Query with a Pivot
    DECLARE @ColsPivot as VARCHAR(MAX);
    DECLARE @Query  AS VARCHAR(MAX);
    1. Retreive the ID for all required field
    SET @ColsPivot = (SELECT STUFF((SELECT  ',' + quotename(CAST([RequirementID] as varchar(3))) FROM [dbo].[Requirement] WHERE required=1 FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)') ,1,1,''));
    This will give you : [1],[2],[3],[8],[9],[14] for exemple.
    2. Build your Query
    SET @Query ='SELECT ClientID,'+@ColsPivot+''
        FROM (
            SELECT [ClientID],[RequirementID],[Value]
            FROM dbo.RequirementValue
            WHERE ClientID=@CliendID --Optional SP parameter
        )src
              PIVOT(
                MAX(Value)
                for [RequirementID] in ('+@ColsPivot+')
        ) p';
    3. Exec(@Query);

  • When i am retreiving the values from the access table i am getting null val

    hi all,
    I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
    I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
    when I am using an applet program it was giving the null value istead of the actual records.
    can anybody tell me the reason why
    thanks in advance
    and also how to connect the databse in the webserver when i installed my applet in the client side
    please give me some suggestions to do that
    thankyou
    lakshman

    Hi Krishna,
    Can you please copy the code generated by ODI for creating your C$ table ?
    i mean :- create table C$_0Entity ( from the operator log
    Regards,
    Rathish A M

  • Help on fetching values form the Database Tables

    Hi,
    I am working on fetching the values from the Oracle base tables.
    First the order will be submitted by the customer. Depending on the city name he mentioned I need to route the order details to two different queues.
    For example if I(customer) insert a list of values(order details) to a table name "X" with the with city name as "San Jose" I need to fetch the values from this table "X" and route them to a Queue"A".
    And again if I insert a list of values to a table name "X" with the with city name as "Milpitas" I need to fetch the values from the table "X" and route them to a Queue"B".
    How do I do this in ESB. I know how to use Database adapter and MQ adapter to create connections between Table and queue.
    Can any one help me on this.
    Thanks
    Ramana.

    Hi Ramana,
    Your use case may be implemented using Oracle ESB like this:
    - Specify a database adapter for reading from DB, your table X. Select an appropriate polling strategy for this. When you finish the wizard, you should have a DB service and get a Routing Service (RS) "for free". The DB service should already be wired to the RS.
    - Specify queuing services add appropriate routing rules with filters (that are based on the message content) and message transformations in your RS in order to route data to the queue of your choice.
    Hth, Sjoerd

  • Change a field value in the  database table

    Hi,
    GB01 is the database table.
    GB01-BOOLCLASS = 009
    GB01-CLASSTYPE = S
    GB01-BCLTAB = BSEG.
    GB01-BCLFIELD = GSBER.
    Upon input of above details,  will get table Record as
    BOOLCLASS    9    
    CLASSTYPE    S    
    BCLTAB       BSEG 
    BCLFIELD     GSBER
    BEXCLUDE     X   
    In the record, the field GB01-BEXCLUDE has the value “X” in it. It should be replaced by value “=.”
    Changes should be made ONLY for this record. Other Records should not be touched.
    How can we do this. Help me in doing this.
    Thanks,
    Ramya.

    Hi Ramya,
    Follow these steps :
    1. Goto the table GB01 -> Display its contents.
    2. Double click the record which you want to edit.
    3. Type /h (where you type transaction code) to go to debugging mode for that record.(Press enter twice to goto debugging mode)
    4. Click on Field CODE and give it value EDIT and then click on the PENCIL icon besides it.
    5. Now click on SAVE.
    6. Switch off the Debugging mode now.
    7. Now you can see your selected record in EDITABLE mode.
    8. Do the EDIT part and SAVE.
    Reward with points if helpful.
    Regards
    Hemant Khemani

  • Randomly selecting some rows from the database table

    Hi can some one help me in selecting some rows from a database table which has around 90,000 rows.
    Thanks.

    One thing you might try is the "sample" clause if you have 8i which is supposed to return a random percentage of the table. Say for example, you have a sequence number on your table as the pkey. Then you might try:
    select * from <table_name> where pkey in(select pkey from <table_name> sample(10));
    This should give you a random 10 percent of the rows in the table but I tried this once and the results seemed unpredictable. For example it returned a different number of rows each time even though the number of rows in the table didn't change.
    Hope this works for you.

  • To create a Crystal Report which will prompt for a value and if nothing is entered select the alternative value from the database record.

    Hi Experts,
    I am working on a report in Crystal (2008) which will prompt user to input a value, but if nothing is entered then it will select relevant database value.
    I created a string parameter prompt called "{?Pack_Qty_Overide}" and used the following formula.
    IF {?Pack_Qty_Overide} = ""
    THEN {OITM.SalPackUn}
    ELSE {?Pack_Qty_Overide}
    However, when I check the formula in editor, it says that there should be a number at the end of "Else" clause.
    What am I doing wrong?

    Hi Janos,
    OITM.SalPackUn is Numeric(19.6). When I used parameter input type as number, my formula returned error that "A number is required here" at the "if .... " statement.
    So I used the formula you provided and it worked, such that when I input a quantity in parameter prompt it would display that, but if no override value given, the field remains blank - i.e. it does not display the value stored in OITM.SalPackUn.
    What am I doing wrong?
    Thanks,
    YP

  • Get Min value and another column value from the same row

    hi all - for each customer and product, I need to grab the row that has the min value for field Value1. I could've just done group by on customer and product and min on Value1, but I also need to grab Vlaue2 from the same row where the minimum value for
    Value1 lies.
    DECLARE @Temp TABLE (CustomerID INT, ProductID VARCHAR(10), Trans_Date Date, Value1 INT, Value2 INT)
    INSERT INTO @Temp VALUES (123, 'ABC', '1/1/2013', 10, 100)
    INSERT INTO @Temp VALUES (456, 'ASD', '1/1/2013', 40, 500)
    INSERT INTO @Temp VALUES (456, 'ASD', '2/1/2013', 90, 700)
    INSERT INTO @Temp VALUES (123, 'ABC', '2/1/2013', 20, 700)
    SELECT * FROM @Temp
    The output should be
    123, ABC, 10, 100
    456, ASD, 40, 500
    I know that I can just join the table to itself and get the desired output but I am dealing with a table that has millions of rows and I was hoping there is more efficient way to do this. any help would be highly appreciated...

    Here is a correction on your DDL to make it into nearly valid table.
    CREATE TABLE Sales
    (customer_id INTEGER NOT NULL,
    product_id CHAR(10) NOT NULL,
    transaction_date DATE NOT NULL,
    PRIMARY KEY (customer_id, product_id, transaction_date),
    value1 INTEGER NOT NULL,
    value2 INTEGER NOT NULL);
    Here is the current syntax for insertion:
    INSERT INTO Sales
    VALUES (123, 'abc', '2013-01-01', 10, 100),
    (456, 'asd', '2013-01-01', 40, 500),
    (456, 'asd', '2013-02-01', 90, 700),
    (123, 'abc', '2013-02-01', 20, 700);
    WITH
    X
    AS
    (SELECT customer_id, product_id, transaction_date, value1, value2,
    MIN(value1) OVER () AS value1_min
    FROM Sales)
    SELECT X.*
    FROM X
    WHERE X.value1_min = X.value1;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Calling and displaying BAPI  values when the initial view is displayed

    hi Gurus,
    I am creating an application where I am calling a BAPI.
    Now my problem is that the values should be called and displayed when I am starting the application ie in the first view itself.
    Is there any way to execute the BAPI so as to retrieve the values from back end and get the values displayed in the initial screen/view.
    Or else is there any onPageLoad method which can be used in such cases.
    please help me how to go ahead.
    Thanks and regards,
    kris

    Hi
    Create a method in controller and insert the code,
    wdContext.current<BAPI>Element().modelObject().execute();
    And call the method in view, and check the size of BAPI's output node.If it is greater than 0, your BAPI is returning something. using any loop and get the Output
    Saravanan K

  • How to retreive and display return value from BAPI

    Hello,
    I am using SUP to create a sales order application. In my MBO I have a create operation which calls a BAPI to create a sales order. How can I retrieve the return value (saled doc number) and display it on a screen and display it as an Alert of BB application.
    Regards
    Nidhideep Bhandari

    Hi David Brandow,
    I have tried your solution where I just created a MBO for my 'operation' and I'm using sync parameters to execute the RFC.
    The problem I'm facing is, for example, if I create a record it gets saved in the MBO table and the record successfully gets created in SAP as well after a sync. But when I create another record and sync, the previously saved record in MBO table also gets executed so I'm getting duplicate entries in SAP.
    Have you or anyone faced this problem?
    Any response is appreciated. Please let me know if I'm not clear, I realized its a complicated scenario.
    Thanks,
    Sandeep

  • How to get the sequence value from the database

    Hi
    I created one sequence in the database.
    Then I want to take the current value or nextvalue of the sequence in a java program.
    How can i do this?
    can anybody please explain me?
    Thank you so much.

    Here you go ...
    Connection conn = null;
    PreparedStatement prepStmt = null;
    ResultSet rs  = null;
    int seqNo = 0;
    try {
         conn = dbConn.getConnection(); //manage your connection here
         String strSQL = "SELECT SEQ_NAME.NEXTVAL FROM DUAL";
         prepStmt = conn.prepareStatement(strSQL);
         rs = prepStmt.executeQuery();
         if(rs.next())
              seqNo = rs.getInt(1);
    catch (SQLException e)
    ...-Rohit

  • To get the input values from the dynamic tables and save in the SAPdatabase

    HI EXPERTS,
    I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.

    >
    vadiv_maha wrote:
    > HI EXPERTS,
    >
    > I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.
    hi,
    1 there is one property OnAction of the button...
    2 So, in this event handler,you have to read the context node to which ur table is binded
    3 use the code wizard
    control+f7
    , and use the method
    get_static_attribute_table
    4 now u have got the vaues in internal table,so now as pointed in the previous reply, you can use the
    Update
    or
    Modify
    statement...
    regards,
    Amit

Maybe you are looking for

  • Mac OS 10.6 question

    Hi, I would like to buy 10.6 when it comes out and i've gone to Apple's web site to see all the system requirements which I have a computer that it will work on. My questions it says the 29 dollar upgrade is just an upgrade not a full version so I am

  • Linking between pages in same article

    I'm making a report that contains only one article, that will scroll horizontally. I want to make a table of contents. Now I'm wondering what the best way is to do this. I can use the "go to page" or "navto", but if I would insert new pages before th

  • Mac book Air 2011 Serious Problem!!!!!

    I bought Mac Book Air 2011 last week in Apple Store of Australia, but I found when I visit internet at home through WIFI , it is so slow and often dropping, I often cannot open any website but other laptop(Windows System) worked fine and fast!!! I se

  • Scn in redologs and controlfile

    Hi The checkpoint scn in datafile headers are updated after checkpoint. How about redologs and controlfile? As far I read from the docs scn's are written to redo logs continuously, it should also stored in controlfile continuesly(every commit) so tha

  • Windows 7 Wireless Printing - printer attached to Mac

    I have a Canon MP600 attached to an iMac running 10.6. Have a Windows 7 laptop that I want to share this printer. When wired to network, the Windows 7 laptop can use bonjour to connect and print fine. However, will not work when the laptop is wireles