Add new row in table between two rows - OATableBean

Hi,
I have a requirement where I need to add a new row between two rows. Lets say I have a table with 5 rows. I am envisioning having an icon (table switcher) on the row #1, which when clicked will insert/create a new row between rows #1 and #2 like #1.5, something that can be achieved in core forms. In core forms, when we click the add button, it immediately creates a new row before the current row ( and pushes other rows down). Is that possible with OATableBean. Please let me know if you have any ideas.
Thanks,
Ravi.

Hi,
I used following code to insert the row in the end
public void createNewRow()
XXEGASRLinesVOImpl vo =getXXEGASRLinesVO1();
Row row1 ;
int i;
Row row[] = vo.getAllRowsInRange();
row1 = vo.createRow(); //vo.createRowSet("10");
vo.insertRowAtRangeIndex(row.length,row1);//.insertRow();
row1.setNewRowState(Row.STATUS_INITIALIZED);
Check if it works for you, you have to modify it to meet your requirement.
Regards,
Reetesh Sharma

Similar Messages

  • I need to retrieve the a set of rows in between two rows from a table.

    consider employees table and primary key employee_id.
    With out using EMPLOYEE_ID column in the where clause or between clause, I need to get the records between 104 and 116 or a set of records between two rows.
    Can any one help me in this... i know this is simple but am just a fresher to oracle development... help me grow....
    Thanks,
    Arun

    ya at last i got the out put... thank guys for thinking with me....
    SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id)
    WHERE ROWNUM <=8
    MINUS
    SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id) WHERE ROWNUM <= 4

  • Add space between two rows

    Hello,
    I need to add space between rows. Please let me know how to go about.
    I have a messgeComponentLayout Region, i am trying to create a space between two rows.
    Presently it is as follows:
    Vacation Plan
    Sick Plan
    I need as follows:
    Vacation Plan
    Sick Plan
    Please let me know how to go about.
    Thanks!

    The foll. is the region, how do i incorporate the rowLayout as suggested in the discussion. Please let me know.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!-- dbdrv: exec java oracle/jrad/tools/xml/importer XMLImporter.class java &phase=dat+24 checkfile:~PROD:~PATH:~FILE &fullpath:~PROD:~PATH:~FILE -username &un_apps -password &pw_apps -dbconnection &jdbc_db_addr -userId "1" -rootPackage /oracle/apps/~PROD -rootdir &fullpath:~PROD:mds:directory -->
    <oa:header version="9.0.3.8.12_1330" xml:lang="en-US" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:jrad="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:user="http://xmlns.oracle.com/jrad/user" xmlns="http://xmlns.oracle.com/jrad" file-version="$Header$" text="Year to Date Accruals and Time Taken (total hrs.):" amDefName="xbol.oracle.apps.xbol.selfservice.loa.server.YtdAM">
    <ui:contents>
    <oa:messageComponentLayout controllerClass="xbol.oracle.apps.xbol.selfservice.loa.webui.MainRNCO" rows="7" columns="2" amDefName="xbol.oracle.apps.xbol.selfservice.loa.server.YtdAM" id="Main">
    <ui:contents>
    <oa:messageStyledText id="VaPlCo" prompt="US Vacation Carry Over" viewName="VacPlAcVO1" viewAttr="VacationCarryOver" styleClass="OraDataText"/>
    <oa:messageStyledText id="VaPlAc" prompt="US Vacation Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsVacationPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="VaTk" prompt="Vacation Taken" viewName="VacPlAcVO1" viewAttr="VacationPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="FlPlAc" prompt="US Floating Holiday Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsFloatingHolidayPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="FlTk" prompt="Floating Holiday Taken" viewName="VacPlAcVO1" viewAttr="FloatingHolidayPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="AcBaTk" prompt="Accrual Bank Taken" viewName="VacPlAcVO1" viewAttr="AccrualBankPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="item2"/>
    <oa:messageStyledText id="SiPlCo" prompt="US Sick Plan Carry Over" viewName="VacPlAcVO1" viewAttr="SickCarryOver" styleClass="OraDataText"/>
    <oa:messageStyledText id="SiPlAc" prompt="US Sick Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsSickPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="SiTk" prompt="Sick Taken" viewName="VacPlAcVO1" viewAttr="SickPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="item1" rendered="true"/>
    <oa:messageStyledText id="PePlAc" prompt="US Personal Leave Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsPersonalLeavePlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="PeTk" prompt="Personal Taken" viewName="VacPlAcVO1" viewAttr="PersonalLeavePlan" styleClass="OraDataText"/>
    </ui:contents>
    </oa:messageComponentLayout>
    </ui:contents>
    </oa:header>

  • Calculate the variance between two row

    Post Author: jane
    CA Forum: WebIntelligence Reporting
    Hi,
    I'm new to BO and wondering whether there is a way to calculate the variance between two rows. I'm working on a report which requires to display the change of two day's data. For instance, I have a table in a format as
    Date
    Sales Amount
    3/12/2008
    2300.00
    2/12/2008
    1280.00
    Changed
    1020.00
    I'd like to display the "Changed" column. Is there a way to do that in BO InfoView? In Excel, you can use the formular by identify the two cells.
    Thanks!

    Post Author: Vinl
    CA Forum: WebIntelligence Reporting
    I am having the same problem and am steping outside of the box and cannot progress.
    Seems to me that you are kind of saying that the only way to get around this is to create an individual object in Designer? I cannot find a way of cementing values as a variable in order for a variance to be created.
    I am trying to do it at column level mind you, which should not make that much difference....
    Simple SQL database. I have created an object called "Year" which takes a date and converts it to a year. I then have another object created "Total sales", put the 2 in a table get the right results...try and create a year on year variance from that...no chance...
    Used to work ok...?

  • Dont want to show the divided line between two rows in a Grid.

    Hello Friends,
    I want a Grid in which I want multiple rows but i dont want to show the divided line between two rows.
    It is just like a grid on Territories form(Administrator->SetUp->General->Territories)
    Thanks.

    Mithun,
    The component you're talking about is not a grid, and that component is not exposed by the UI API so you cannot use it.
    Regards,
    Vítor Vieira

  • Including a JDialog or JFrame between two rows in a JTable

    Hello,
    Is it possible to include a JFrame or JDialog between two rows in a JTable?
    I would like two have a JFrame or JDialog which shift all the rows below the row that I want in order to include a JFrame between them.
    Thank in advance

    [http://forums.sun.com/thread.jspa?threadID=5331582]

  • Bridge Table between two fact tables

    Hello everybody,
    From what I have read on the BI Administration tool help and on this forum, bridge tables are used to define many-to-many relations between dimension sand fact tables. Is it possible to have a bridge table defining a many-to-many relation between two fact tables?
    Here is my senario:
    1. We have a fact table called fact_Orders describing orders for some products.
    2. We have a fact table called fact_Sales describing sales og these products.
    3. We have a table describing the transformation from order lines to sales lines which is a many-to-many relation, because it is possible to transform an order in more than two steps.
    I was thinking of connecting the two fact tables with a bridge table.
    If bridge tables are inappropriate for this case, what could be a better model for my senario?
    Thanks for your time.

    Hi,
    Well a conformed dimension is a bridge table between two facts, so not sure why you need anything else. If there is a one to many from D1 to F1 and a one to many from D1 to F2 then effectively there is a many to many join from F1 to F2 through the D1 dimension.
    Sounds to me like all you need is an order dimension table, rows in the orders fact table will join to this dimension and so will rows in the sales fact table. You can then do calculations like number of sales per order, total sales revenue per order, # of order items per order etc etc.
    Regards,
    Matt

  • I would like the row color to alternate in pairs - for example, two rows of grey then two rows of white.  How do I achieve this format?

    I would like the row color to alternate in pairs - for example, two rows of grey then two rows of white.  How do I achieve this format?

    Hi OldRailroadMan,
    Here is one way. Start with a table with no fill (or white).
    Change the fill of the first two rows.
    Select cells in the first four rows.
    Drag the yellow Fill Handle down.
    For some reason this does not work if you select whole rows (by clicking on the row numbers at the left).
    When you are happy with the result, Menu > File > Save As Template.
    Regards,
    Ian.

  • Reg: How to automate updation of tables between two oracle DB Instances

    Hi All,
    I have a requirement to auto update the tables between two oracle database instances. What are the possible solutions to handle this kind of situations.
    Please help me out in identifying the correct solution.
    Thanks in advance :)

    The possible solutions are outlined in the distributed database documentation
    They are
    a) trigger (6.0 and higher)
    b) advanced replication. Creates triggers on every table. Requires every table to have a primary key (8.0 and higher)
    c) Streams (Uses logminer, has no impact on table. Requires every table to have a primary key, or supplemental logging will be used. (9.0 and higher)
    d) Change Data Capture: superset of Streams (9i and higher).
    If you don't require realtime updates you don't need c or d. b is difficult to manage. Using a) the source db can potentially have to wait for the target db to complete it's transaction.
    Sybrand Bakker
    Senior Oracle DBA

  • Insert table in between two rows of the table in Web dynpro abap.

    Hi All,
    I have a requirment like this,
    while click on a hide/show button from the first row and last column of the table, want to display  a table(or add some rows to insert data) in between the  rows of the table and insert data in the new table .
    please help me wheather it is possible or not?
    Thanks,
    Raju.

    hi raju....
           if you want to insert rows.... then read the index of the row clicked and then read the node that is bound to the table and insert an empty row at that index and bind it back again....
           if you want another table then make use of table popin.
    --regards,
      alex b justin

  • Difference between two rows of a table.

    Hi All,
    I have a requirement where I need to calculate the difference of a column, but the values are in two rows.
    Its exactly like this, I am having a table where in I have stored incidents with their status and their modified dates
    example:
    Incident_Id : Status : Modified_Date(in seconds from a specific date)
    1 : 1 : 9080890
    1 : 2 : 9080999
    1 : 3 : 9081900
    2 : 1 : 10000900
    2 : 2 : 10001000
    2 : 3 : 10002000
    Now the requirement is I have to show the time spent by each incident in each status.
    ie for status 1 I need the difference between modified date of status 2 and modified date of status 1 likewise
    for status 2 need the difference between modified date of status 3 and modified date of status 2 and so on.
    the actual result I need is like this
    Incident_Id : Status : Timespent
    1: 1: (modified_date(status2) - modified_date(status1))
    Please help me to write the query for this.
    Regards,
    Tauceef

    if only you have incremental status (example = 1,2,3, ... )
    WITH t (Incident_Id ,Status , Modified_Date) AS (
    SELECT 1 , 1 , 9080890 FROM dual UNION ALL
    SELECT 1 , 2 , 9080999 FROM dual UNION ALL
    SELECT 1 , 3 , 9081900 FROM dual UNION ALL
    SELECT 2 , 1 , 10000900 FROM dual UNION ALL
    SELECT 2 , 2 , 10001000 FROM dual UNION ALL
    SELECT 2 , 3 , 10002000 FROM dual )
    SELECT t1.Incident_Id, t1.Status, t1.Modified_Date , t2.Modified_Date-t1.Modified_Date
    FROM t t1
    LEFT JOIN t t2
    ON t2.Incident_Id = t1.Incident_Id
    AND t2.status = t1.status+1
    ORDER BY 1,2or
    there is no need to know what is the next status number :
    WITH t (Incident_Id ,Status , Modified_Date) AS (
    SELECT 1 , 1 , 9080890 FROM dual UNION ALL
    SELECT 1 , 2 , 9080999 FROM dual UNION ALL
    SELECT 1 , 3 , 9081900 FROM dual UNION ALL
    SELECT 2 , 1 , 10000900 FROM dual UNION ALL
    SELECT 2 , 2 , 10001000 FROM dual UNION ALL
    SELECT 2 , 3 , 10002000 FROM dual )
    SELECT t1.Incident_Id,
           t1.Status,
           t1.Modified_Date ,
           (LEAD(t1.Modified_Date) OVER (PARTITION BY t1.Incident_Id ORDER BY t1.status)) - t1.Modified_Date
    FROM t t1Edited by: Ramin Hashimzadeh on May 15, 2013 1:32 PM

  • Replacing one column value between two rows..help??

    HI,
    I have table T
    it has five columns, all are in number data type
    Col1 and col2 are jointly primary key i.e. they cannot be repeated combined
    when i run this query..
    SQL> Select * from t
    it shows me the data like this
    Col1        Col2              Col3       Col4           Col5
    1             1               78          58            12.76
    2             1               128         446           32.10
    3             1               468         566           52.10
    4             1               878         58            52.05
    5             1               987         348           22.02
    ... so on.
    my requirement is that i want to update this table by replacing the col1 value between any two rows
    suppose this is the first row
    Col1        Col2          Col3        Col4         Col5
    1             1             78          58        12.76
    and this is any 2nd row
    Col1        Col2          Col3        Col4        Col5
    5             1            987         348       22.02
    now i want that for first row the value of col1 replaces the value of col1 of 2nd row
    and for 2nd row the value of col1 replaces the value of col1 of 1st row
    i.e.
    Col1        Col2          Col3        Col4         Col5
    5             1            78           58         12.76
    Col1        Col2          Col3        Col4         Col5
    1             1            987        348          22.02
    please tell how to achieve this in single query/procedureregards,
    Ramis

    SQL> create table t (id1 number, id2 number, name varchar2(1));
    Table created.
    SQL> alter table t add primary key (id1,id2);
    Table altered.
    SQL> insert into t values(1,1,'A');
    1 row created.
    SQL> insert into t values(5,1,'B');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t;
           ID1        ID2 N
             1          1 A
             5          1 B
    SQL> var val1 number
    SQL> var val2 number
    SQL> exec :val1 := 1;
    PL/SQL procedure successfully completed.
    SQL> exec :val2 := 5;
    PL/SQL procedure successfully completed.
    SQL> update t set id1 = (:val1 + :val2) - id1 where id1 in (:val1,:val2);
    2 rows updated.
    SQL> select * from t;
           ID1        ID2 N
             5          1 A
             1          1 B
    SQL> rollback;
    Rollback complete.
    SQL> select * from t;
           ID1        ID2 N
             1          1 A
             5          1 B
    SQL> commit;
    Commit complete.
    SQL> update t set id1 = decode(id1,:val1,:val2,:val1)
      2  where id1 in (:val1, :val2);
    2 rows updated.
    SQL> select * from t;
           ID1        ID2 N
             5          1 A
             1          1 BRgds.

  • Interchange of data between two rows.

    I have a table Test. In it there are 2 rows.Primary key of first row is A and primary key of second row is B.
    I want to interchange the data.
    I mean data of A in B and data of B in A.
    Pls help..

    Hi,
    I would write a stored procedure in pl/sql that takes in input the two Id issues two select and create a record of type and use the local variable as swap area.
    something like
    create table cod_test(id varchar2(10), value varchar2(20));
    create or replace procedure swap(id_1 in varchar2, id_2 in varchar2) is
           rec_1 cod_test%rowtype;
           rec_2 cod_test%rowtype;
           rec_swap cod_test%rowtype;
    begin
      select * into rec_1 from cod_test where id=id_1;
      select * into rec_2 from cod_test where id=id_2;
      rec_swap.id:=rec_1.id;
      rec_swap.value:=rec_1.value;
      update cod_test set value=rec_2.value where id=id_1;
      update cod_test set value=rec_swap.value where id=id_2;
    end swap;
    insert into cod_test (id,value) values('1','one');
    insert into cod_test (id,value) values('2','two');
    exec swap('1','2');
    select * from cod_test;it's a simple test, take it as a starting point (add exception management for example).
    ciao,
    Giovanni

  • How to hide the grid lines between two rows in a ALv? Please help!

    Hi Experts,
             I have a ABAP ALV(reuse alv grid FM) report.
    The last field in the ALV is "Description" which can contain data of size more than 130 chars.
    Since the max field length in ALV grid is 130 chars hence I am splitting this field value whenever the field length is more than 130 chars.
    After splitting I am generating duplicate rows but with different "Description" field values ( each contains the splitted values".
    For example:
    Name| City | Description                             |
    Hari|HK    |Employee responsible for time management |
    Hari|HK    |and issue resolution                     |
    Now I want to hide the grid line between these two rows
    and just for Description field.
    In other words I want ALV to display like this:
    Name| City | Description                             |
    Hari|HK    |Employee responsible for time management |
    Hari|HK    |and issue resolution                     |
    How can I acheive this?
    Please provide some sample code.
    Please help. I will be really greatfull to your help.
    Thanks
    Gopal

    Hi Rich,
          If that is the case then atleast how can I hide the complete row grid line?
    Please give some sample code.
    Thanks
    Gopal

  • How to get difference between two rows for a column field?

    hi, all,
    Could anyone show me what query statement is to get the difference betweem two rows for two column fields?
    The tables and its records are like this:
    id,      begin,      end
    p1         21          30
    p2          45          60
    p3          120          150
    I would like to have the query result like this
    id,    diff
    p1     15    --- which is 45 minus 30
    p2     60    --- which is 120 minus 60
    and so on...
    thank you in advance.
    Raffy

    You can use the LAG function to access values from previous rows:
    with q as (select 'p1' id, 21 v_start, 30 v_end from dual
    union all
    select 'p2', 45, 60 from dual
    union all
    select 'p3', 120, 150 from dual)
    select id, v_start, v_end, v_start - lag (v_end, 1, 0)
      over (order by id) v_diff from q
    ID,V_START,V_END,V_DIFF
    p1,21,30,21
    p2,45,60,15
    p3,120,150,60
    See the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions075.htm

Maybe you are looking for

  • IPhone no longer synchronizes with iTunes

    I upgraded to the latest version of iTunes (7.7). Now I do not see my iPhone in iTunes and the phone no longer synchronizes. Need help!

  • Can't open photos - needs MIME plug-in?

    I'm using Safari 2.0.4 and am trying to view photos on a website, but have encountered this error message: +The page "Browser Express" has content of MIME type "application/x-oleobject". Because you don't have a plug-in installed for this MIME type,

  • Why can't I open new tabs?

    When I click on a new tab, or go to 'File', 'New Tab' nothing happens. If I click on a link a new tab will open up, but I cannot get a blank one to open so I can type in a new website.

  • Can a flash website launch quicktime files?

    Hi I am not really familiar with what options are available for video but would appreciate some advice on what is achievable. Does the server always need to be enabled in some way to run any type of flash video, if so can flash launch quicktime files

  • What kind of video file should I import to FCP?

    I am trying to digitize some footage into FCP but for some reason I'm getting a weird error where, during import, the tape keeps rolling and the sound keeps coming but the picture freezes for a few seconds and then "jump cuts" to where the tape is an