Create a new row in a table without using add new row button

I want to add a new row to the table without using the add new row button of the table. I'm not able to display default row in the table. Though if click on apply the record appears after saving in the database. Any thoughts how to implement this functionality.

Here is what you have to do.
1) You have to handle this in processRequest()
2) In the AM code , u need to check if there is already a row exisit or vo is blank
if (vo.getFetchedRowCount() == 0)
// first time
vo.setMaxFetchSize(0); // THIS IS REQUIRED.
Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
else
//If already rows are there then you suppose to insert in the end
// i assume you would have execute your vo
YourVORowImpl row= (YourVORowImpl)vo.getRowAtRangeIndex(0);
vo2.insertRowAtRangeIndex();
It should work.

Similar Messages

  • Add / Delete a row in a table without using a button

    Hi,
    I was just wondering if it was possible to remove or add a row in a table without using the button?  I noticed that in all examples, it always involve putting code in the button click event but I wanted to add or delete a row in a table based on the fact if the row contains a certain value or not.  Is that possible?
    Much appreciated,
    Vincent

    Vincent,
         Here is the updated file..
    https://acrobat.com/#d=bVDBNM0pnS2IpfE58V01Tg
    You have checked the checkbox "Repeat subform for each Row" for Header Row under IndTable1. You need to do at Row1 level of Table1.
    I bound the Row1 of Table1 to <Row1> tag in your XML which can repeat multiple times.
    I wrote the code in the Doc Ready event of the Test1 field to check whether the value is existing or not. If it does not have a value, then I am removing the instance of the Row1 by passing the current index.. (You can check the code)..
    While creating a data connection using XML you need to make sure that the below structure is repeated atleast 2 times. And while previewing you can use make a copy of this same XML and remove Row1.
      <Row1>
        <Test1>Individual Name 1</Test1>
      </Row1>
    Thanks
    Srini

  • Display distinct rows from Oracle table without using "DISTINCT" keyword.

    How to retrieve distinct rows from oracle table without using 'DISTINCT' keyword in SQL?
    Thanks in advance.
    Mihir

    Welcome to the forum.
    Besides GROUP BY you can use UNIQUE instead of DISTINCT as well, but that's probably not wanted here ;) , and the ROW_NUMBER() analytic:
    SQL> create table t as
      2  select 1 col1 from dual union all
      3  select 1 from dual union all
      4  select 2 from dual union all
      5  select 3 from dual union all
      6  select 4 from dual union all
      7  select 4 from dual;
    Table created
    SQL> select col1 from t;
          COL1
             1
             1
             2
             3
             4
             4
    6 rows selected
    SQL> select distinct col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select unique col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select col1 from t group by col1;
          COL1
             1
             2
             3
             4
    SQL> select col1
      2  from ( select col1
      3         ,      row_number() over (partition by col1 order by col1) rn
      4         from   t
      5       )
      6  where rn=1;
          COL1
             1
             2
             3
             4

  • Add a new record in database table without using table maintance generator

    Hi Expart ,
                  Plz. tell me how to add new record in database table without using table maintance ganerator ....give me one ex.
    Regards
    Bhabani

    Hi,
    The other way to safely handle the modification of tables is through is by programs that can be done with SE38 or SE80.
    To insert into database table we use INSERT statement :
    1. To insert a single line into a database table, use the following:
    INSERT INTO <target> VALUES <wa>.
    INSERT <target> FROM <wa>.
    2. To insert a several lines into a database table, use the following:
    INSERT <target> FROM TABLE <itaba>.
    Or even we can use MODIFY statementas this single statement is used to insert as well as update the records of database table.
    MODIFY <target> FROM <wa>.
    or MODIFY <target> FROM TABLE <itab>.
    thanx.
    Edited by: Dhanashri Pawar on Sep 10, 2008 12:25 PM
    Edited by: Dhanashri Pawar on Sep 10, 2008 12:30 PM

  • I want to create an internal table without using header line and occurs 0?

    hi experts,
    Can anybody help me to declare an internal table without using headerline and occurs 0 options but still i have to use the functionalities that occurs 0 and header line options provide.

    Hi Saisri,
    You can use the internal table without headerline and create a header for then internal table with the same structure. We need to use the header while manipulating with the data of the internal table.
    example:
    types: begin of ty_afpo,
                 kdauf type kdauf,
                 kdpos type kdpos,
                 ltrmp   type ltrmp,
               end   of ty_afpo.
    data : t_afpo type standard table of ty_afpo,  " internal table declaration
             wa_afpo type ty_afpo.                        " work area declaration
    <after populating the data into the internal table>
    loop at t_afpo into wa_afpo.
    write:/ wa_afpo-kdauf, wa_afpo-kdpos, wa_afpo-ltrmp.
    endloop.
    This I think shall give you a basic understanding of how things work.
    <b>Reward points if this helps,</b>
    Kiran

  • How to reference a class without using the new keyword

    I need to access some information from a class using the getter, but I don't want to use the new keyword because it will erase the information in the class. How can I reference the class without using the new keyword.
    ContactInfo c = new ContactInfo(); // problem is here because it erases the info in the class
    c.getFirstName();

    quedogf94 wrote:
    I need to access some information from a class using the getter, but I don't want to use the new keyword because it will erase the information in the class. How can I reference the class without using the new keyword.
    ContactInfo c = new ContactInfo(); // problem is here because it erases the info in the class
    c.getFirstName();No.
    Using new does not erase anything. There's nothing to erase. It's brand new. It creates a new instance, and whatever that constructor puts in there, is there. If you then change the contents of that instance, and you want to see them, you have to have maintained a reference to it somewhere, and access that instance's state through that reference.
    As already stated, you seem to be confused between class and instance, at the very least.
    Run this. Study the output carefully. Make sure you understand why you see what you do. Then, if you're still confused, try to rephrase your question in a way that makes some sense based on what you've observed.
    (And not that accessing a class (static) member through a reference, like foo1.getNumFoos() is syntactically legal, but is bad form, since it looks like you're accessing an instance (non-static) member. I do it here just for demonstration purposes.)
    public class Foo {
      private static int numFoos; // class variable
      private int x; // instance varaible
      public Foo(int x) {
        this.x = x;
        numFoos++;
      // class method
      public static int getNumFoos() {
        return numFoos;
      // instance method 
      public int getX() {
        return x;
      public static void main (String[] args) {
        System.out.println ("Foo.numFoos is " + Foo.getNumFoos ());
        System.out.println ();
        Foo foo1 = new Foo(42);
        System.out.println ("Foo.numFoos is " + Foo.getNumFoos ());
        System.out.println ("foo1.numFoos is " + foo1.getNumFoos ());
        System.out.println ("foo1.x is " + foo1.getX ());
        System.out.println ();
        Foo foo2 = new Foo(666);
        System.out.println ("Foo.numFoos is " + Foo.getNumFoos ());
        System.out.println ("foo1.numFoos is " + foo1.getNumFoos ());
        System.out.println ("foo1.x is " + foo1.getX ());
        System.out.println ("foo2.numFoos is " + foo2.getNumFoos ());
        System.out.println ("foo2.x is " + foo2.getX ());
        System.out.println ();
    }

  • Check 2 tables(Table A and Table B) and figure out new columns present in Table A and add these new columns to Table B

    How to check 2 tables(Table A and Table B) and figure out new columns present in Table A and add these new columns to Table b.
    DDL-
    Create table A
    ( A INT,
    B INT,C VARCHAR(2)
    Create table B
    A INT,
    B INT
    Any advice on the best approach or method to achieve this.
    I understand that I need to check the schema of the columns and then do a match between 2 tables and find new columns and then alter my target table
    Mudassar

    Can you try this..
    CREATE TABLE A ( A INT, B INT, C VARCHAR(2) )
    CREATE TABLE B ( A INT, B INT )
    Declare @ColumnVar nvarchar(128),@DatatypeVar nvarchar(128)
    SELECT @ColumnVar=x.COLUMN_NAME, @DatatypeVar=x.DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS AS x
    WHERE TABLE_NAME = 'A'
    AND NOT EXISTS ( SELECT *
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'B'
    AND COLUMN_NAME = x.COLUMN_NAME )
    Declare @SQL VarChar(1000)
    SELECT @SQL = 'ALTER TABLE B ADD ' + @ColumnVar + ' '+ @DatatypeVar
    Exec (@SQL)
    select * from B
    Please Mark This As Answer if it helps to solve the issue
    http://stackoverflow.com/questions/2614101/alter-table-my-table-add-column-int

  • Note:304522.1 How to Move Queue Tables without using export import

    Trying to use the pkg available in Metalink "Note:304522.1 How to Move Queue Tables without using export import"
    Using the 10.1.0.x and upwards Package, I'm getting the following error on a single consumer queue table with an xmltype payload:
    SQL> exec move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK');
    BEGIN move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK'); END;
    ERROR at line 1:
    ORA-20000: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.MOVE_AQT", line 652
    ORA-06512: at line 1
    We've tried in multiple environments, always with the same results.
    Trace file shows:
    *** 2006-11-08 10:06:47.154
    *** SERVICE NAME:(SYS$USERS) 2006-11-08 10:06:47.147
    *** SESSION ID:(379.954) 2006-11-08 10:06:47.147
    qtable move procedure starting execution at 08-11-2006 10:06:47 for queue table XFORM_TEST_INT.INTERFACE_XML_QUEUE
    qtable move procedure experienced an exception at 08-11-2006 10:06:47
    qtable move error message ORA-06502: PL/SQL: numeric or value error
    qtable move procedure ended execution at 08-11-2006 10:06:47
    Can anyone help with this? Has anyone used this before successfully (or not successfully). We urgently need this working today to test moving our queue table into a tablespace with a smaller block size for performance reasons in production.
    Thanks for the help!
    Tony

    Thank you,
    Yes we've done that. They've confirmed a problem with the links/scripts on the note. The 10.1 and up version was not really 10.1 and up.
    As they would not have a new version available in time for the move we needed to perform, we switched our approach to using dbms_redefinition instead.
    Thanks for the reply,
    Tony

  • Set up new sales org/plant but without using Finance - is this possible?

    Hi,
    I was asked if the following is possible.
    Set up a new sales org/plant but without using Finance.
    It should be possible to create purchase order with goods in
    and sales orders with delivery and goods issue.
    But the invoice will be done in an external system.
    So, all what has to do with finance will be done in an external system
    also the goods in/goods out values.
    So the stock and stock movements should be visible in SAP, but the values for this stock
    will be posted in the external system manually.
    So the question is: Is it possible to set up a new sales org/plant
    but without using Finance?
    Thanks
    Regarfds
    Dieter

    Hi,
    really nobody has a hint?
    Most important: the stock movements should only consider only quantity no values?
    Isn´t there any way to say for a certain material it only consider quantities but no values?
    Regards
    Dieter

  • Created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows

    created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows

    You are using an older version of firefox, upgrade your browser to Firefox 8 and try
    * getfirefox.com

  • Using Pages, I have created a document and inserted a Table for use in logging an inventaory. When I came to print this off however the lines for the table were missing but the text was in the Table format, weird! How do I print the Table?

    Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?

    Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?

  • How to create Users/Roles for ldap in weblogic without using admin console

    Is it possible to create Users/Roles for ldap in weblogic without using admin console? if possible what are the files i need to modify in DefaultDomain?
    or is there any ant script for creating USers/Roles?
    Regards,
    Raghu.
    Edited by: user9942600 on Jul 2, 2009 1:00 AM
    Edited by: user9942600 on Jul 2, 2009 1:58 AM

    Hi..
    You can use wlst or jmx to perform all security config etc.. same as if it were perfomred from the admin console..
    .e.g. wlst create user
    ..after connecting to admin server
    serverConfig()
    cd("/SecurityConfiguration/your_domain_name/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator")
    cmo.createUser("userName","Password","UserDesc")
    ..for adding/configuring a role
    cd("/SecurityConfiguration/your_domain_name/Realms/myrealm/RoleMappers/XACMLRoleMapper")
    cmo.createRole('','roleName', 'userName')
    ...see the mbean docs for all the different attributes, operations etc..
    ..Mark.

  • How to create apple id for mac app store without using credit card and there is no any option for payment none. please tell how to download free apps from mac app store

    how to create apple id for mac app store without using credit card and there is no any option for payment none. please tell how to download free apps from mac app store

    my problem solve by me
    first create apple id
    fill credit card details
    and complete your account creating  process.
    than go to app store or itune store
    login your acount
    click right side  - account button
    than again login for account setting
    next go to payment information and click edit button
    when u enter payment infomation
    click none button in payment method and click done button.
    than ur credit card has been removed.
    but rs. 60 will deducted in your account when u doing this process.

  • Updating ARDT table without using direct update statement

    hi,
        can any one guide me how to update REMARK field in the ADRT table without using direct UPDATE statement. It would be helpful if any one can tell me the bapi or a function module with a sample code.

    Hi                                                                               
    <b>SZA0                           Business Address Services (w/o Dialog) </b> ADDR_PERSONAL_UPDATE                                                          
    ADDR_PERSON_UPDATE                                                            
    ADDR_PERS_COMP_UPDATE                                                         
    ADDR_UPDATE                                                                   
    these are the four function modules which will update the (Business Address Services) reward if usefull
    check these is there any  help ful for u or not

  • HT4009 I let a child use my iPod and she purchased a lot of doeses for idoser and I did not have the money on my card. Now I can't download anything at all without using a new credit card or paying for it. How do I cancel it

    I let a child use my iPod and she purchased a lot of doeses for idoser and I did not have the money on my card. Now I can't download anything at all without using a new credit card or paying for it. How do I cancel it

    First, to prevent this from happening again, turn off "In App purchases" in the Restrictions settings on your iPod. You may also want to turn off the ability to install apps, to prevent purchases in case the child gets hold of your iTunes Store account information, and set the password to be required immediately. For more information, see:
    http://support.apple.com/kb/HT4213
    As to a refund, that's not automatic since the terms of sale for the iTunes Store state that all sales are final. You can contact the iTunes Store, explain the reason for your request, and ask, though:
    http://www.apple.com/support/itunes/contact.html
    They're usually pretty lenient in the case of inadvertent purchases by children. No guarantees, though, just as if your child was in a store and ate a bunch of food (in other words, something that can't just be returned).
    Good luck.

Maybe you are looking for