How to insert a new row in the middle of an set of rows

How to insert a new  row in the middle of an set of rows ? and How to Reset the line id after the new row added ?
Sudhir B.

just try this,
Instead of using omatrix.Addrow(1,-1) use like
omatrix.AddRow( RowCount , Position)
The number of rows to add (default is 1)
The position of the new rows (0-based; default is -1, meaning append row to the end)
After adding rows in matrix For, sno.
for i=1 to omatrix.visualrowcount
otext=omatrix.getcellspecific("columnid",i)  '--where columnid is the unique id of the sno column
next i
Hope this helps you.
Thanks & Regards,
Parvatha Solai.N

Similar Messages

  • Insert a new record in the middle of a tabular form

    I have a tabular form.
    Pressing "Add Row" button opens a new, empty row at the bottom of the page or - if I use pagination - jumps to the page with the last record and creates a new record there.
    Is it possible to open a new line in the middle of the page ?
    I mean: if I have 25 records, I am on the first page (records 1-10) and the cursor is in a field of the second record and I press the "Add Row" button there should be a new, empty second line with old second record in the third line,... the old ninth record now in line 10 and disappeared record ten ?
    Any idea ?

    You may investigate logic using UNIONs and a manual tabular form.
    Something like:
    --get all records above new row
    select apex_item... column1
    ,apex_item... column2
    from yourtable
    where <logic to limit rows above new record>
    --get the new row
    select apex_item... column1
    ,apex_item... column2
    from dual
    where :REQUEST = 'ADDROW'
    --get every row not in the top query
    select apex_item... column1
    ,apex_item... column2
    from yourtable
    where <logic to pull all records not pulled above new record>
    For this to work you'll need to add your own "Add Row" button and associate it with a branch. Notice the select between the two unions in the above query is a select against dual. This will be your new record when pressing your "Add Row" button (:REQUEST = 'ADDROW').
    The following how-to link is a reference for some of the logic you'll need when creating a manual tabular form.
    Good Luck,

  • How to insert a new field in the Report Designer

    Hi all.
    I have a query and a report, but the query evolve.
    We have a new key figure (inside rows).
    In the report designer, I check the data provider.
    The new key figure is added in the catalog field.
    Now, I would like to insert the new field in the report.
    I add a new row in the report structure but it isnt what I want.
    In this case, I add a second row inside an another keys figures block.
    I want to create a new block for my new key figure
    Thanks for your help

    Yes, key figures is in the field catalog.
    But When I do that " Insert a row ", Report designer create a " row 2 " below another key figures.
    And it isn't what I want. I want a new block .
    For exemple in the tab report structure (My new key figure is "Margin")
    I do that
    Group Level 1 : key figures
             Detail Area
                      Sales Amount
                                   row2 ( the new row added)
    But I want that:
    Group Level 1 : key figures
             Detail Area
                      Sales Amount
    Thanks for your help

  • How to insert a new page at the beginning of a chapter

    I tried to do that but not successful. Can we do that? What are the limitations of page/section adding on iBook Author?

    Hi narin1975,
    Welcome to Apple Support Communities.
    It sounds like you want to add a page in your iBooks Author project. Take a look at the iBooks Author Help webpage below, it will walk you through adding or deleting pages, chapters and sections.
    Add, reorder, or delete chapters, sections, and pages
    Add a new page
    In the Book pane (shown above), select the chapter or section you want to add pages to.
    Click Add Pages in the toolbar, and choose Pages > Option.
    Tip:  You can also add a new page by Control-clicking a page in the Book pane and choosing Insert Page from the shortcut menu. The new page uses the default layout for the chapter or section.
    I hope this helps.

  • Is it possible to split a song in 2 as a whole, and insert a new part in the middle?

    Im recording a song, and just realized id like to have an 8 bar drum part in the middle of it, before it kicks in to the other part...
    Is it possible to do this or do I have to cut and paste each track indivually?  There are 27 so it would be pretty time consuming this way.
    Thanks in advance.

    Sfreeze wrote:
    do I have to cut and paste each track indivually?
    no, split works across any number of tracks:
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Hello. I just know the muse and I need an organization of customers in alphabetical order. The problem is that you will always get new customers. I need to know how to insert a new customer (square) and it already comes in alphabetical order on the page.

    I just know the muse and I need an organization of customers in alphabetical order. The problem is that you will always get new customers. I need to know how to insert a new customer (square) and it already comes in alphabetical order on the page. The site will be like in the link below, and each client will be a window of these: I look back.
    A hug, Murilo.

    I believe you are referring to thumbnail image rectangles as customers on page ? not exactly customer database ?
    You can add rectangle with different effects with mouse rollover state and regarding adding new ones , you would need to do that manually in design mode .

  • How to insert row in the middle of a table so that the below content will move to another page?

    I'm making a huge form in LiveCycle Designer. I want to be able to add rows in the middle o the table but in a way that the content below will move down automatically in a way it doe's in Word for example.
    Sometimes I am adding a very high new row in the middle of a page and I want the content in the below rows to be moved to another page and if it is necessary I want a new page to be automatically created on the bottom of a document or something.
    Is this possible or do I have to move everything by hand if I add new row to a table?

    If you are adding the rows at the runtime by clicking a button, then you have to use the instance Manager to add rows.. It will add rows at the end and then you need to write code to move the row at the desired location by using the moveInstance method of the instanceManager.
    If you are adding a row at the design time, then you can right clcik the row and choose to add rows below.

  • How to insert a new line in MC1H(maintaining formula)

    How to insert a new line in MC1H(maintaining formula)
    Can anybody help me with  the steps

    Hi, transaction SCC4 -> press Ctrl+F4 or the button for change ->double click one the row for your client -> on the field Cross Client Object Changes select Changes to the Repository and cross-client Customizing allowed -> SAVE
    2. run MC1H and now you will have access to insert new line in the table
    Regards Vassko!
    Edited by: Vasil Pavlov on Sep 16, 2008 9:51 AM

  • Insert rows in the middle

    I'm trying to figure out how to insert rows in the middle
    row 1
    row 2
    row 3
    I need to insert 2 rows before row 2
    I know I have to use the AddRow(1, Position) however after many tries, it doesn't seem to work or at least I don't know how to
    insert the second row as if I do +1 it's not realy adequate, also, pVal.Row reports Row 2 and in the documentation it sais 0 based which is not right so I'm a bit confused on how to go about that.
    Edited by: Marc Roussel on Aug 10, 2011 8:23 AM
    Here's the whole thing, maybe you'll understand where I'm at :
    I enter an ItemCode which is a kit.  After the person enter the quantity, I pop a .NET Windows form which asks for questions and then after the questions I get back and add the lines but it seems that when I add the lines, I'm still on the line I was entering the kit and it overrides it instead of Adding the new row at the position I'm asking it to add the row.
    Even if I do pVal.Row +1 or +2 or +3, it doesn't matter
    Edited by: Marc Roussel on Aug 10, 2011 8:28 AM

    The code below adds the 2 lines all right but then, a blank line after and the line that was already there below is destroyed.  Don't ask me why and what is happening to that existing line which seems to have lost the ItemCode or I don't know what happened
    CurrentLine = pVal.Row;
    oMatrix.AddRow(1, CurrentLine);
    SAP.SetCellValue(oMatrix, SAPFramework.Enums.MARKETING_COLS.B1_ITEMCODE, CurrentLine, "01P38");
    SAP.SetCellValue(oMatrix, "U_KitSeq", CurrentLine, NewKitSeq);
    oMatrix.AddRow(1, CurrentLine);
    SAP.SetCellValue(oMatrix, SAPFramework.Enums.MARKETING_COLS.B1_ITEMCODE, CurrentLine, "03P12");
    SAP.SetCellValue(oMatrix, "U_KitSeq", CurrentLine, NewKitSeq);
    I did not know that doing a simple thing like this would be a hard business...
    Edited by: Marc Roussel on Aug 10, 2011 9:15 AM

  • How to add A single row at the middle of the table in a Webi report

         I created a Webi report using Universe(Created universe using bex query).Now i have a requirement to display a row at the middle of a report. Can you please tell me ,how to add a sigle row at the middle of a Webi report.
                                                    Thanks in advance

    Hi Monika,
    It is not really possible to add a row (I assume you mean of unrelated data) to the middle of a table in a report. You can add a new table with a single row between two tables. For instance you could add a new one row table, or even single cells which are positioned relatively between two tables. Possibly a block on top of another. But this gets tricky.
    Can you explain in more detail what you are trying to do?

  • How to insert a new page to word document

    Does anybody knows how i can insert  a new page to the opened word document ?
    I am searching for the documentation for the activex word functions and i have no idea where i can find it ?
    I am using LabWindows CVI 8.5.

    Hello Boris!
    You can use the WordRpt_NewPage function to add a new page into an opened word document.
    Here is some documentation about this function:​/toolslib/functionreference/cviwordrpt_newpage/
    You'll also find useful hints on how to use it in the sample program that ships with CVI: <samples>\activex\word\wordrpt.prj.
    Best regards!
    - Johannes

  • How to Insert a new line in a clob

    i want to create reports as multi-line clob data using PL/SQL procedures.
    is there any standard way of inserting a new line when iam generating
    this clob data based on the data i fetch from a different table.
    i short my question is "How to insert a new line in a clob?"
    i tried using the character '\n', but that was of no use.
    thanks in advance

    You could always do a:
    newLine := '
    Since PL/SQL allows a tring to span multiple lines.

  • Can I insert a new text at the cursor's position In Formatted-Text-Edit?

    Hi Everyone,
        I am doing a task to enhance Formatted-Text-Edit,
        The task's goal is: simultaneously edit/display text and image.
        I decide to use Formatted-Text-Edit and Formatted-Text-View to realize the task.
        In Formatted-Text-Edit, user can edit the text and input URL for image,
        In Formatted-Text-View, the text and image can be displayed simultaneously.
        I add a button "Insert Image" besides the Formatted-Text-Edit,
       This is the key point:
       When user click the button, I want to insert a new text(URL of the image) at the cursor's position in Formatted-Text-Edit,
       But how can I get the cursor's position, and insert a new text at the cursor's position in FTE.
       Can anyone give me some suggestion or solution?
       Many thanks in advance.
    Best Regards,

    I don't believe that you can get the cursor position yet with the FormattedTextEdit UI element. The best you could do currently is to place the insert at the end of the current text.
    Note duplicate thread/question to;
    Set cursor on the table column inherited with text edit UI element
    Please don't double post your questions in the forum.

  • How can I write new objects to the existing file with already written objec

    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    at Source)
    at Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
  , 0, mode);
            out.write(buf, 0, mode);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            long pointer = raf.readLong();
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            int length = raf.readInt();
            pointer = pointer - length - 4;
            byte[] b = new byte[length];
   + 4);
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            pointer = raf.getFilePointer() - 4;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;

  • How to add a new tab for the project?

    Dear All Experts,
        Could you tell me how to add a new tab for the project?
        Pls refer to the screenshot as below:
    Xinling Zhang

        The new tab in cj20n , and the new tab can only be displayed in the highed level.Pls refer to below
        And in cj02, there is no this tab also in the wbs detailed screen,

Maybe you are looking for

  • Memory overloaded?

    I've recently installed the new version of 7.1 (but this may be a red herring as I had a previous version of iTunes 7.-something) with Windows XP. iTunes is not working properly - the mouse is very unresponsive, "sticks", won't play, you have to clic

  • The JNLP nightmare - a summary

    our application has the following preconditions: * one EAR should work on the lab, the validation and the production environment with no security warnings * we have to use 2 jnlp files * we use native libraries the conclusion we've drawn: this isn't

  • Page Index in the first page of sapscript print out

    Hi Can anyone tell me how will I create an Index with section and page numbers in the first page of the sapscript about various sections that I will create dynamically in various page numbers during sapscript processing. Thanks and Regards Panda

  • Query not converted in to change mode

    Hi all i have an issue i have created a query in bex in     development system and saved the query, at the time of saving the query it didn't ask    any request but it saved in favorites on save window. second time i try to open the query it opened b

  • Remove Padding from Header in DW5.5?

    Can anybody help me with a pickle? I'm trying to create our headers in HTML only and I can't figure out how to get the padding off below the header so it touches the border. Here's the code: HARD CODE: <table width="93%" align="center" cellpadding="0