How to populate only the first record by default when the page opens?

Dear Members,
I am using OAF R12 and my requirement is as follows:-
When the user opens the custom OAF R12 page, I just want to query the first record from the underlying VO.
For example, If the table has 10 rows, I just want to query the first row as soon as the page opens.
I have written the below code:-
Process Request Method of the CO:-_
am.invokeMethod("initHeaders");
Code in AM_
public void initHeaders()
HeadersVOImpl hVO = getHeadersVO1();
hVO.initQueryHeaders();
Code in VO_
public void initQueryHeaders()
executeQuery();
As it is very clear that with the above code all the records will be queried. I have to add something before the executeQuery() method in the VO to just query the first record.
Can any one please help me by guiding me what I should add before the executeQuery() method in the VO?
Many thanks in advance.
Regards,
R4S.

Hello Gyan,
Many thanks for your reply.
The below line in your code is throwing incompatible type error:
OARow row = vo.first();
Can you please help me.
Regards,
R4S

Similar Messages

  • How do I show the first record as selected on the first load of a Master/Detail html page?

    I have been looking for any reference to setting a selectrow onload or defaultrow and it seems all references to answers lead to missing pages or examples.
    I have created a master detail page using the insert spry function in DW5. I have had no trouble making it work or changing the css to show a selected column 0 (master) after the first click, but I would like to see the default first row shown as selected.
    I am such a javascript noob I need an example if possible.
    I followed Greg Rowis's example on AdobeTV "Creating A Progressive Enhancement" but this was not addressed.

    Thank you for the reply but it was not quite what I needed.
    My html div was/is
    <div spry:region="ds1" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected" >{Industry}
        </div>
    </div>
    With the col0 renamed Industry and this works when I click (select) an Industry I get a change in my display to show which row is selected.
    See http://dev.workway.com/
    What I want is to have About Workway selected on page load. It is the default display but is not shown selected.
    Thanks again for your help.

  • ERROR:Receiver Partner record in the control record  is default

    Hi,
    When I am trying with WS t Idoc scenario the followinw error is getting
    "Receiver Partner record in the control record  is default" when I am checking in we05
    Please clarify.
    Thanks,
    Srinivas

    Hi,
    Check the partner profile settings in we20.
    Regards,
    Smitha.

  • How to take a value of the first record/occurrence and the last record?

    Hi experts
    Can anyone help me to tell me:
    How to make IP can take a value of the first record/occurrence and the last record in CSV file?
    I need to take the first and last to put StarTime of first record y StopTime of last record in the target file
    This is my Original CSV File
    20110820,220DNE0220,140.13 ,0.000 ,E01,0
    20110820,240FGC4280,103.80 ,0.000 ,E01,0
    20110821,220DNE0220,142.58 ,0.000 ,E01,0
    20110821,240FGC4280,88.70 ,0.000 ,E01,0
    20110822,220DNE0220,151.92 ,0.000 ,E01,0
    20110822,240FGC4280,91.47 ,0.000 ,E01,0
    Where:
    The firts field is date.
    I require it so my Target File
    20110820,20110822,140.13 ,0.000 ,E01,0
    20110820,20110822,103.80 ,0.000 ,E01,0
    20110820,20110822,142.58 ,0.000 ,E01,0
    20110820,20110822,88.70 ,0.000 ,E01,0
    20110820,20110822,151.92 ,0.000 ,E01,0
    20110820,20110822,91.47 ,0.000 ,E01,0
    Thaks..

    Hi lizcam,
    A. Use FCC at sender side, it will convert CSV to XML like this
    Input XML
    <documentName>
    <recordset>
    <record>
      <Time>20110820</Time>
      <ID>220DNE0220</ID>
      <Quan>140.13</Quan>
      <Volume>0.000</Volume>
      <Auc>E01</Auc>
      <No>0</No>
    </record>
    </recordset>
    </documentName>
    Create a target DT like this
    Output XML
    <recordset>
    <record>
      <StartTime>20110820</StartTime>
      <EndTime>20110822</EndTime>
      <Quan>140.13</Quan>
      <Volume>0.000</Volume>
      <Auc>E01</Auc>
      <No>0</No>
    </record>
    </recordset>
    In MM,
    1.Time -> CopyValue[0] -> StartTime
    2.Time -> below UDF -> EndTime
    3.Quan -> Quan
    4.Volume -> Volume
    5.Auc -> Auc
    6.No -> No
    UDF u2013 Execution type u2013 All values of Queue
    public void getLastTimeValue(String[] inputEndTime, ResultList result, Container container) throws StreamTransformationException{
    result.addValue(inputEndTime[inputEndTime.length-1]);
    B. At receiver use again FCC to convert XML to CSV.
    FYI. If you want to optimize more, you can use
    1.globalContainer concept OR
    2.u201CAttributes and Methodsu201D, declare are String. Store the EndTime using one UDF and write another UDF to retrieve it.
    Regards,
    Raghu_Vamsee

  • Master-Detail only shows the first record of the Master's data

    I have an ADF Master Table, Detail table. I use ExcuteWithParams on the Master Table. When executed from a button (Button has partial submit = true for button, Master Table has PartialTrigger on button, and Detail table has PartialTrigger on Master table and button), it works fine. However, I want to pass the parameters in pageFlowScope variables, and have the ExecuteWithParams invoked upon page load. When I try to do this, the Detail table only shows the first record of the Master's data, no mater what row is clicked on the Master table.
    Master table now has no PartialTrigger, and Detail table has PartialTrigger on Master table. In my pageDef, I used an invoke action as follows:
    <invokeAction Binds="ExecuteWithParams" id="invokeExecuteWithParams"
    Refresh="always"/>
    What am I missing? I am using verion 11.1.1.3. Any help would be much appreciated.
    Thanks,
    Jessica

    Yes, it works when I drag the data control as a master detail without filtering any data. I want the user to be able to set search criteria to filter the data in the master table (For example, only pull back data with a transaction date between :startdate and :enddate). I can get it to work if I execute from an executewithparams button on the page, but not if I want to invoke the executewithparams upon page load with the parameter set by pageflowscope variables.
    Thank you for responding.
    Jessica

  • How to return to the first record of a multiple row cursor (Forms 6i)

    Hi all,
    I had a bit of a search through here, but couldn't quite find the answer I'm after.
    I have a multiple row cursor, which I feed into a multi-row block in Forms 6i. I have the following code:
    OPEN CURSOR;
    LOOP
       FETCH CURSOR INTO :FIELD1, :FIELD2, :FIELD3, :FIELD4;
       ... do other code not related with cursor
       EXIT WHEN CURSOR%NOTFOUND;
       NEXT_RECORD;
    END LOOP;Now, I use the Forms built-in NEXT_RECORD to move down through the records on the form and fill in each row from the db. However, once the block loads (this works correctly), the current item (ie where the typing cursor is left) is on the last record.
    Obviously, I need the current item (after loading) to be on the first record. I tried using the Forms built-in FIRST_RECORD after the END LOOP command, but that gives me an ORA-06511 error (An attempt was made to open a cursor that was already open).
    Does anyone know how I might be able to return to the first record of the block correctly?
    Thanks in Advance,
    Chris.

    Ok, I feel like a bit of a dolt.
    I found that all cursors had to be closed before navigating back to the first record.
    Case closed! :)

  • How to select the first record?

    Hi,
    Could anyone tell me how to select the first record of every
    group?
    ex, I want to find out every customer their first purcaseDate.
    CustomerID PurcaseDate Region
    A00000001 2001/01/01 AA
    A00000001 2001/02/02 AA
    A00000002 2001/03/01 AC
    A00000002 2001/05/07 AC
    A00000003 2001/03/05 DD
    result:
    A00000001 2001/01/01 AA
    A00000002 2001/03/01 AC
    A00000003 2001/03/05 DD
    Thanks

    Vincent,
    You could do it as Carl suggested, with a couple of
    corrections.  You would need to include the CustomNo column in
    the order by clause of your cursor.  You would also need to add
    a where clause to your update statement, otherwise everywhere
    Region in the table would be updated with the same value of the
    last CustomNo in the cursor, regardless of the CustomNo in the
    table.  See corrected code below:
    DECLARE
      CURSOR     cust
      IS
      SELECT     DISTINCT CustomNo, Region, Purchase_Date
      FROM       my_table
      ORDER BY   CustomNo, Purchase_Date, Region;
      c_customer VARCHAR2 (9) := '...';
      c_region   VARCHAR2 (2) := '..';
      cntr       NUMBER := 0;
    BEGIN
      FOR x IN cust
      LOOP
        IF x.CustomNo != c_customer
        THEN
          c_customer := x.CustomNo;
          c_region := x.Region;
        ELSE
          UPDATE my_table
          SET    Region = c_region
          WHERE  CustomNo = c_customer;
          cntr := cntr + 1;
          IF cntr = 25
          THEN
            COMMIT;
            cntr := 0;
          END IF;
        END IF;
      END LOOP;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN 
        NULL;
    END;
    Another option is that you could just use one update statement,
    like this:
    UPDATE my_table a
    SET    Region =
           (SELECT DISTINCT Region
            FROM   my_table b
            WHERE  (CustomNo, Purchase_Date) IN
                   (SELECT   CustomNo, MIN (Purchase_Date)
                    FROM     my_table
                    GROUP BY CustomNo)
            AND    a.CustomNo = b.CustomNo)
    Barbara

  • Display only the first record

    I have report in BEx where we want to find the first time a customer ordered Quantity of more than 500 in a data range (For Ex: From April 10 to April 30). In a particluar date range the customer may order more than once (Qty > 500). The catch is we want display only one first time he ordered qty > 500.
    Customer    Date         Qty > 500.
    ABC         4/21/2005        2,035 CA
              4/22/2005        12,290 CA
              4/23/2005        4,826 CA
              4/26/2005        6,397 CA
              4/27/2005        1,538 CA
              4/28/2005        4,849 CA
    XYZ         4/25/2005        2,000 CA
              4/26/2005        12,000 CA
              4/27/2005        4,500 CA
              4/28/2005        6,300 CA
    In the output report we want to display the first record for each customer as:
    Customer    Date         Qty > 500.
    ABC         4/21/2005        2,035 CA
    XYZ         4/25/2005        2,000 CA
    Your help is really appreciated. Thanks.

    jayant,
    i think, you could use your date as a condition to filter by in your report... try looking that the properties of your KF and, under Calculations, set the 'Calculate Result as...' to the first value only.
    hope this helps - don't forget to give out points. =)
    ryan.
    ps. i've tried this, and it sort of works - just need a bit more of tweaking around. =)
    Message was edited by: Ryan Kristoffer Tan

  • The detailRegion is always forced to populate the first record from the Master region

    Hi fellow Spry enthusiasts,
    My question is in regards the undesirable data population of
    the regiondetail on initial load. I have 2 sections, one which is
    my master region (which goes out and retrieves a bunch of records),
    and a related detailregion which reacts based on the master.
    However, every time I initiate a query of the master region to
    retrieve records, the detail region also responds and automatically
    grabs the FIRST record of the master region (which is undesirable
    in my case because I do not want the detail region to react UNTIL I
    select a record in the master region). Let me know if this makes
    sense.
    Psuedo Code:
    var moveRequestor = new
    Spry.Data.XMLDataSet("cfc/QueryThatReturnsABunchOfEmployeeRecords")>
    <span spry:region="moveRequestor">
    {EM_ID}
    {NAME}
    <span spry:detailregion="moveRequestor">
    {EM_ID}
    {NAME}
    {PHONE}

    This question was posted a while ago, and was one of the
    search results that came up when I was looking for my own answer. I
    had a nearly identical question and answered it here:
    Disabling
    default linked region and detailregiondisply until click
    Hopefully it will help others too!

  • How do I blank my BI Pub report parameter from returning the first record when output to HTML?

    Hi all.
    I have a report that has several parameters A, B, C D.
    I include these at the head of the rtf report.
    I run the report WITHOUT entering anything for parameters A & B.
    When the report generates (returning all the expected correct records), it enters into parameter fields A & B at the top of the report the first records’ A & B fields when they should be blank.
    IS there something I need to do in the rtf form field Help text along with the field name?
    ThanksForLoooking..
    Malc

    within the rtf of the report, within the form-field-help-text, this should work..
    <?xdofx:decode(<parameter name>,'','',<parameter name>)?>
    if the parameter is left blank, then don't put anything in the rtf field, otherwise put in anything that is selected in the parameter.
    or this..
    <?xdofx:if <parameter name>='' then 'All Params Included' else <parameter name> end if?>
    ..yet, when the parameter is left blank, the parameter field in the report generated is populated with whatever is in the first line of the parameter in the report.
    I also can't find anything in the old rdf that is causing this either.  Help!

  • How to use the first row function value for the rest of records

    Hi all,
    I am having a select statement like this. We are calling function enabled for each row. So it is taking
    time. As per our bussiness logic, we can use what the function 'enabled' will give for the first row to
    other rows also. so that we can avoid calling the function 'enabled' next row onwars.
    Before
    SELECT
    decode(enabled(col1, col2, col3),'TRUE','xxx', col4),
    decode(enabled(col1, col2, col3),'TRUE','xxx', col5),
    decode(enabled(col1, col2, col3),'TRUE','xxx', col6),
    decode(enabled(col1, col2, col3),'TRUE','xxx', col7),
    decode(enabled(col1, col2, col3),'TRUE','xxx', col8),
    from
    table1 t1, table2 t2 where t1.col1 = t2.col1
    After
    SELECT
    decode(enabled(col1, col2, col3),'TRUE','xxx', col4),
    decode('true/false','TRUE','xxx', col5), --Here 'true/false' is the first row value after calling the function 'enabled'
    decode('true/false','TRUE','xxx', col6),
    decode('true/false','TRUE','xxx', col7),
    decode('true/false','TRUE','xxx', col8),
    from
    table1 t1, table2 t2 where t1.col1 = t2.col1
    Any thoughts on this, how to implement this logic
    Thanks,
    Pal

    It's not clear where col1, col2, col3... etc. come from, so I've assumed they're in table1.
    with table1_X as (select enabled(col1, col2, col3) as enbl
                            ,col1, col2, col3, col4, col5, col6, col7, col8
                      from   table1)
    SELECT decode(t1.enbl,'TRUE','xxx', col4)
          ,decode(t1.enbl,'TRUE','xxx', col5)
          ,decode(t1.enbl,'TRUE','xxx', col6),
          ,decode(t1.enbl,'TRUE','xxx', col7),
          ,decode(t1.enbl,'TRUE','xxx', col8),
    from   table1_x t1 join table2 t2 on (t1.col1 = t2.col1)p.s. you'd be better leaving out the enabled function altogether and incorporating the logic of the function directly in the SQL, and then you would be avoiding any context switching which will clearly impact performance on any large amount of data.
    Edited by: BluShadow on 14-May-2013 08:26

  • Data Loader - Only imports first record; remaining records fail

    I'm trying to use Data Loader to import a group of opportunities. Everytime I run the Data Loader it only imports the first record. All the other records fail with the message "An unexpected error occurred during the import of the following row: 'External Unique Id: xxxxxxx'". After running the Data Loader, I can modify the Data file and remove the first record that was imported. By running the Data Loader again, the first row (previously the second row) will import successfully.
    Any idea what could be causing this behavior?

    W need a LOT more information, starting with the OS, and the version of ID, including any applied patches.
    Next we need to know if you are doing a single record per page or multiple records, whether the placeholders are on the master page, how many pages are in the document and if they all have fields on them (some screen captures might be useful -- embed them using the camera icon on the editing toolbar on the webpage rather than attaching, if it works [there seem to be some issues at the moment, though only for some people]).
    What else is on the page? Are you really telling it to merge all the records, or just one?
    You get the idea... Full description of what youhave, what you are doing, and what you get instead of what you expect.

  • Data merge only prints first record

    Help, please: I've done it over and over, checked my .cvs file, replaced prefs...
    BUT data merge will only print the first record either in create merged document or export to pdf.
    It WILL preview all records.

    W need a LOT more information, starting with the OS, and the version of ID, including any applied patches.
    Next we need to know if you are doing a single record per page or multiple records, whether the placeholders are on the master page, how many pages are in the document and if they all have fields on them (some screen captures might be useful -- embed them using the camera icon on the editing toolbar on the webpage rather than attaching, if it works [there seem to be some issues at the moment, though only for some people]).
    What else is on the page? Are you really telling it to merge all the records, or just one?
    You get the idea... Full description of what youhave, what you are doing, and what you get instead of what you expect.

  • Oracle Forms returns the first record in the database when performing query

    Once in a while when we query for a record on a form, say by first name Tom, then it returns the first record in the database. Other times it return the Tom's record. It only happens once in a while and if you close the form and reopen it and requery for Tom, then it brings Tom's record.
    Does anyone know the issue what could be happening. It just happens every now and then that it's hard to reproduce.
    ORacle Forms 10GR2
    ORacle Application Server 10.1.3
    thanks

    then it returns the first record in the databaseI'm not sure if i understand you correctly. Do you mean forms ignores the searc-condition you entered? I would check SYSTEM.LAST_QUERY at the moment this happens to check if the condition gets somehow lost.

  • How to mark first record by default in oo ALV

    Hi Experts,
    I am using OO ALV to display ALV Grid in Custom Container. How to mark the frst record by default in ALV Grid.!
    Please help.
    Thanks in Advance,
    Regards,
    Priya

    Hi.,
    Using  set_selected_rows() method you can achieve this.,
    First Call ALV using  o_grid->set_table_for_first_display
    Then call  o_grid->set_selected_rows    " here o_grid is reference to cl_gui_alv_grid
    You have to pass parameter index 1 to it_row_no.
    Also you can pass the row numbers which you want to select by default .,
    hope this helps u.,
    Thanks & Regards,
    Kiran

Maybe you are looking for

  • Cursor For Problem

    Hi, i have a problem with my loop and can't find a solution. The in-line "select"-query is working fine and returns the value I need. But somehow the "update" is not working. If I change the record-index to a static value, the update is also working

  • User exit for four quaters of a year

    Hi All, I need to write an user exit to fetch the Quater1(3 months) to Quater4 from a Calyear. If the user enters 2008 then i want to get the sales for the 4 quaters for  an year in separate columns. I think of creating 4 restrcited KFs with the sale

  • "Base" application improvements needed

    I have an E90, and the included Apps need the following: Contacts Allow me to enter phone numbers as: (213)555-1234 or 1(213)555-1234 ASCII ".txt" files How do I "copy" from "Notes" to aa.txt {E.g. "punch or Export to ASCII} I need to be able to open

  • Spotify on Lumia 1020 (Denim) extremely slow and buggy

    Hi, Does anyone have the same problem and got rid of it? I just got the Lumia 1020 with the Denim Update (previously Samsung Galaxy S4) and it is so slowly - it needs 20-30 seconds to open the app. Moreover, changing between Playlists needs more time

  • Portal Tab Pages

    Hi, Is there a way to programatically enable and disable tab pages other than via someone's role? If so, how? Thanks.