How to retreive multiple rows on a tabbed page

Dear Gurus,
I am new to Forms Programming. I have 4 tab pages on the canvas. On one of the tab page I am trying to retrieve multiple rows from the database. I want that the data should be automatically displayed as user changes to that tab page.
The problem which I think is that the cursor is not moving from the first tab page to the new tab page. When I am trying to use go_item, it is not allowing me to change the tab page as all the items on this tab page is display item. Even go_block is not working. I am writing both the functions on When_Tab_Page_Changed trigger.
Please Help!!!!!!!!

Hi
Try this one. Check the logic. I didn't have much time to program. With this draft you can begin to do what you need.
Bye, Aron
create or replace package testpkg is
        type TYPE_TESTNAMES IS TABLE OF testnames%rowtype index by binary_integer;
        procedure getByStatus(countToReturn in NUMBER,status in NUMBER,newStatus in NUMBER, records in out TYPE_TESTNAMES);
end testpkg;
create or replace package body testpkg IS
procedure getByStatus(countToReturn in NUMBER,status in NUMBER,newStatus in NUMBER, records in out TYPE_TESTNAMES)
is
        selectedIds MESSAGE_ID_TABLE;
        cursor select_messages_by_status (currentStatus NUMBER) is
                    select id
                 from testnames
                 where status= currentStatus
                 for update;
        cursor t (currentStatus NUMBER) is
                    select *
                 from testnames
                 where status= currentStatus
                 for update;
        r testnames%rowtype;
        i int := 0;
begin
      open select_messages_by_status(status);
      fetch select_messages_by_status bulk collect into selectedIds limit countToReturn;
      for selectedId in selectedIds.first..selectedIds.last loop
            update testnames set status = newStatus where id = selectedId;
      end loop;
      open t(status);
      loop
            fetch t into r;
            exit when t%notfound;
           records(i) := r;
           i := i + 1;
      end loop;
end getByStatus;
end testpkg;
-- Test program
declare
r testpkg.TYPE_TESTNAMES;
begin
testpkg.getByStatus(2, 0, 3, r);
dbms_output.put_line(r(1).id);
end;

Similar Messages

  • How to select multiple row in ALV report

    Hi friends,
    1. How to select multiple row in ALV report
                   ( How to set tab in ALV report and want to select multiple line.)
    Thanking you.
    Subash

    Hi Sahoo,
    If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
    in layout structure you will find field SEL_MODE
    pass :
    LS_LAYOUT-SEL_MODE = 'A'.
    In PAI.
      CALL METHOD GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = T_ROWS
          ET_ROW_NO     = T_ROWID.
    Hope these will solve your problem.
    Regards,
    Kumar M.

  • Retreiving multiple rows with stored procedures

    Hi,
    I'm having a little problem over here. I need to retreive some data (from an oracle db) via stored procedures. But I don't know how I can retreive multiple rows because when I execute a stored procedure which gives more dan 1 row back, Jave throws an exception.
    If someone could show me an example (or url) from how it should be done, it will be very much appreciated :-)
    Thanks in advance.

    A collection of (mostly) fully working example programs is provided by Oracle.
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/index.html
    I think what you're looking for it the RefCursor example, under "JDBC Basic Samples"

  • How to update multiple rows in one query using php

    i am new to this can any one help me how to update multiple rows at a time i am doing an school attendance page

    Often the situation is such that you have multiple courses across a range of dates.So students may take more than one course, and you need to track attendance for each course date. The following graphic demonstrates this:
    In such a situation, you need four database tables as follows:
    students (student_id, student_name, etc.)
    courses (course_id, course_name, etc.)
    students_courses (student_id, course_id)
    attendance (student_id, course_id, dater)
    A fifth table may also be needed to define the dates of courses, but you may also be able to build this array programmatically by using PHP's robust date functions, which can give you, for instance, all the Tuesdays and Thursdays between a start date and end date.
    The students_courses table simply keeps track of which students are taking which courses, so it has just two columns for the primary keys of both of the main tables. The attendance table is similar, but it also includes a date field. The following view of the attendance table demonstrates this:
    So if David's solution does cover your needs, consider yourself lucky, because this could quickly grow from a beginner-appropriate project to a moderately advanced one.

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How to avoid multiple copies of data in page refresh

    How to avoid multiple copies of data in page refresh

    If you are talking about a page with an insert query, ignore the fact that it's a page refresh.  It's just another way that someone can insert duplicate records.  I like to handle this in my insert query.
    insert into thetable
    (f1, f2, etc)
    select distinct
    value1, value2, etc
    from some_small_table
    where you don't already have that record

  • How to put multiple photos on 1 A4 page

    Hi
    Can someone tell me how to put multiple photos on 1 A4 page,
    many thanks

    Try this:
    File >> New
    Set your width and height dimensions of A4 in mm.
    Set resolution e.g. 72 for web use/email or 240-300 for printing.
    Set background color to white (or whatever you prefer) and click OK
    Now get your first image
    File >> Place Embedded
    Select your first image and click place
    Drag to position and scale with the corner handles whilst holding down Shift.
    Click the check-mark to commit.
    Repeat for each of your other images.

  • How to select multiple rows from List Of Values

    Hello,
    I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't.
    so how i can select many rows to set them in my adf table.
    Thank in advance

    Hi,
    LOV is map to an attribute in the viewObject so it will return only one value or more values from selected row. You can't select multiple rows from LOV.
    But you can do this by using popup which you can select multiple rows and insert the selected rows to another table.
    This blog post explain how to achieve this :
    http://husaindalal.blogspot.com/2009/11/search-from-popup-and-add-to-new-table.html#comments
    Sameh Nassar

  • How to get multiple Rows in UCCX DB

    Hi All,
    Here is the scenario. One of customer has DB which return the multiple rows of data by querying against one Field.
    suppose there is a Field "National ID Number"  which fetches cutomers' more than one account like post paid customer , prepaid customer, corporate customer etc in different Rows then how could i check this if the customer has more than one Account system should ask about the particular Account Number.
    any help would be grateful for me.
    Thanks

    Is the following way seem correct to store values in an array var
    db read
      successful
        label get_next_record
        db get
          successful
            /* Action to store values in Array variable */
                        Array[c]=accno
    /* “accno” is a variable with Big Dec Type having all possible values fetched by multiple rows */
                        c=c+1 /* where “c” is an index var */
                        goto get_next_record
          no data
            goto no_more_records
    label no_more_records

  • How to get multiple rows at one time in a table?

    hi
    I have a JTable bound with ViewObject and i use multiple selection mode setting to get selection row.
    My question is when i select more then one row at one time i only can get those index from JTable but can't get those rows from ViewObject.is it possible to get rows from ViewObject? or how to use JTable row index to get row from ViewObject?

    repost

  • How to process multiple rows of data into a single string

    Hello,
    I am trying to process multiple rows of text from an Oracle database into one field to display on a report as continuous text. Below is sample data. The text field is 55 characters wide so anything longer is broken into multiple rows. I need to recombine it for display.
    line          text
    1             IN THE N.E. QUADRANT OF THE INTERSECTION OF THE FAIRFAX
    2              COUNTY PARKWAY AND THE DULLES AIRPORT ACCESS AND THE T
    3             OLL ROAD AND SOUTH OF SUNSET HILLS ROAD
    I tried creating a formula field but it did not work, below is the code in Visual Basic syntax. I also tried using the Maximum() and UBound() functions without luck. I don't quite understand how to make the UBound() work; it threw a lot of errors.
    Dim i As Number
    Dim strLocDesc As String
    For i = 1 To count({LDS_AR_RL_COMM.ART_LINE_NUM})
        strLocDesc = strLocDesc & {LDS_AR_RL_COMM.ART_COMM_RMK}(i)
    Next i
    formula = strLocDesc
    Any ideas on how to solve this?

    Hello Allison,
    You can try this:
    Create a formula called @StoreText, place it in the details and have the following code in it:
    WhilePrintingRecords;
    Global StringVar Text1;
    Global StringVar TextRest;
    if {field.line} = 1 then
    Text1:= {field.text} else
    if {field.line} >= 2 then
    TextRest := TextRest+" "+{field.text};
    In the Group Footer you can have a formula called @GetStoreText with the following code in it:
    WhilePrintingRecords;
    Global StringVar Text1;
    Global StringVar TextRest;
    Text1+varTextRest;
    See how that works out for you.
    Regards,
    Zack

  • How to insert multiple rows in same table at once

    hi ,
    How can I insert more than one row in the same database table on single submit button.
    (i am using the ADF , EJB and Toplink for this example.)
    EMPLOYEEand DEPARTMENT tables will hold a common coloum deptno
    The method I have tried is as follows.
    I have created the UI that holds EMPLOYEE(DETAIL) details and a DEPARTMENT(MASTER) table and I have created two separate bean classes which hold the getters and setters for the corresponding tables.
    I have created a method in Department bean which will be called when we add the employee details
    public String addEmpdetails() {
    this.employeedetailslist.add(empdetails);
    return null;
    where employeedetailslist is a Arraylist and I want to pass the reference of employeebean in the array list.
    But this method will fail as I need to create the new employee bean object every time when ever I need to pass.
    How can I store values of multiple rows in bean.
    In the EJB session bean how can I commit multiple EMPLOYEE rows and DEPARTMENT values at once.

    The use of &variable in a script is actually syntax for a "substitution variable" in the SQL*Plus tool (other tools may also do the same), not an inherent part of SQL or PL/SQL itself.
    Whenever SQL*Plus is given a script it parses through it and if it encounters one of these it prompts for a value. This value is then substituted into the script before the script actually get's sent to the SQL or PL/SQL engine (process) on the database server. Once the script has gone to the database server it executes there and the results are passed back for SQL*Plus to display. However, the SQL and PL/SQL processes on the database server have no way to interface to the client machine, so they themselves cannot prompt for input from the client and you can't expect to prompt inside a loop as you are doing.
    What you need is a user interface on the client that can prompt repeatedly for values and then re-send the script, or call a procedure on the database each time. This can be done using shell scripts or dos batch files (depending on your client being unix/dos based) or using a front end application tool such as Java, .NET, Powerbuilder, PHP, Application Express (APEX) etc.

  • How to update multiple rows in ADF Tble

    Hi,
    I have created a search form and ADF table. This ADF table is having column of Select Boolean check box along with actual table columns.
    When I click on Search button it should show the result in ADF table. I will be able to select the check box in multiple rows.
    Finally when I click on Submit button status column should be updated against the rows for which Boolean check box is selected.
    Here the thing that I would like to know is how to identify the rows whichever are selected when I click on Submit button.
    Could you please help.
    Regards
    Vinod.

    http://sameh-nassar.blogspot.de/2009/12/use-checkbox-for-selecting-multiple.html shows how to use a checkbox via a transient attribute on the EO. To get the selected row you check the transient attribute of each row.
    Timo

  • How to select multiple row of table using check box?

    hi,
             i am having table on view having first field as checkbox. what i want, when i click on checkboxes in multiple rows, and i click on any button i need to use those content to next view...
              my problem is if i select only one row , i can use onlead select property of table..but when i select multiple rows  through check box how should i read contents of table....?
    Plz solve it.
    Thanks,
    Saurin Shah

    Hello Saurin,
    You are right using LeadSelection you can select only 1 row at a time. You will have to make use of Selection for achieving this. First you will have to change the selection mode of the table to multiple & also change the selection property for the related context to 0..n . Please find a code extract which might help you. (However this facility is only available from SP 14.) The main part is using the set_selected method of if_wd_context_node.
    data: node_zcourse_details type ref to if_wd_context_node,
             node_course_assign type ref to if_wd_context_node,
             elem_course_assign type ref to if_wd_context_element,
             stru_course_assign type if_v_details=>element_course_assign ,
             item_popin_selected like stru_course_assign-popin_selected.
    "     navigate from <CONTEXT> to <ZCOURSE_DETAILS> via lead selection
    node_zcourse_details = wd_context->get_child_node( name = if_v_details=>wdctx_zcourse_details ).
    "     navigate from <ZCOURSE_DETAILS> to <COURSE_ASSIGN> via lead selection
    node_course_assign = node_zcourse_details->get_child_node( name = if_v_details=>wdctx_course_assign ).
    "     @TODO handle not set lead selection
    if ( node_course_assign is initial ).
    exit.
    endif.
    data elem_set type wdr_context_element_set.
    field-symbols <wa_elem> like line of elem_set.
    elem_set = node_course_assign->get_elements( ).
    loop at elem_set assigning <wa_elem>.
       <wa_elem>->set_selected( TRUE OR FALSE ). " Supply either TRUE/FALSE in here
    endloop.

  • *a bit urgent * How to take multiple rows of same input?

    Hi,
    I need to make an user interface which takes multiple rows of same input.
    For eg.. online eGreetings sites..
    You select the the number of eCard receipents froma drop down and the page refreshes and that many number of text fields appear.. where you can put in multiple addresses..
    Its like a dataTable.. but instead of showing the data it should input data...in each row
    I hope I could clarify myself..
    I would like to know
    - how to map the fields to the managed bean
    - how to create the user interface
    Some could be appreciated..
    Thanks and regards

    arijit_datta wrote:
    Its like a dataTable.. but instead of showing the data it should input data...in each rowThen just change h:outputText by h:inputText?

Maybe you are looking for

  • Sql query using union

    hi i need the query to fetch the data ... i have two table 1. plan 2. voidplan each table has id uniquely, and each table has rep_id but it is not unique. i retrieved the data from both table using union. now i need the data for the rep who is in bot

  • My system cannot allocate enough colormap entry. How to set Firefox uses less colormap entry?

    I have to use depth 8 and PseudoColor becuase a old program requests. If I run Firefox and my old program, I will get a error "Cannot allocate colormap entry for default background". Can I set Firefox to use less Colormap entry? Nvidia 450 Thanks. Je

  • Building pidgin with meanwhile support from ABS failing

    I've been building pidgin manually from ABS in order to incorporate meanwhile support for use on IBM Lotus Sametime. This entails editing pidgin's PKGBUILD and removing this line: --disable-meanwhile \ Then I simply run `makepkg -si`. Recently (last

  • HELP what has happened to email

    His just gone into my emails this evening and the look of them has changed!! they were as normal this morning, anyone help as to what has happened!!! Also have an email that I cannot delete there is no box to tick? Also unable to reply to an email, w

  • Would the last upgrade to 10.9.3 OXS change my internet settings?

    Can the new upgrade to 10.9.3 change my internet settings?  I cant get my email on my Mac Air but I have no problem getting it on the IPad?