Insert new row in a table (in a program)

Hi,
It's possible to add a row to a table in an ABAP program ?
Like an ALTER TABLE or what ? or the user must go to SE11 ?
Thanks !

Hi
I don't know your issue, but it doesn't seem to be a good idea to do it, you risk to have misalignments between development, quality and production system.
A table should be created by a developer only, not a user
Why the user doesn't have to use SE11?
Max

Similar Messages

  • Insert new row in Data Table

    Hi All,
    Based on "Insert, Update and Delete" tutorial it's easy to perform insert by addidng new row in forms.
    Then I tried to do the myRowSet.moveToInsertRow() having a the RowSet bound to a Data Table and no new record appears :( !
    Any workaround ?

    My guess is that you are not refreshing the datatable - you must call execute on the datatable model object again.
    Unless you are expecting a new "inserted" empty row to be created on the datatable itself when you call moveToInsertRow - the JSF standard datatable doesn't support that operation. See the AppModel sample application to see another option to handle that scenario.
    v

  • Insert new row in af:table

    Hi all,
    I have on a page
    <af:table … id="t1">
    </af:table>
    and <af:commandButton actionListener="#{bindings.Create.execute}"
    text="Create" disabled="#{!bindings.Create.enabled}"
    id="cb2" partialTriggers="t1"/>
    where Create is a method of above table iterator.
    The problem is that new record does not appear after button click. It appear only after another click or click of any another button. What should I do to see new record immediately after clicking Create?
    Thanks,
    SNikiforov
    My JDeveloper version is 11.1.1.2.0

    Use CreateInsert instead of Create

  • About  inserting new rows in database table

    Hi to all,
      I recently installed SAP 4.7 on my system.Everything is going on smoothly .
    But, I created a table "zemp"  and created columns for it .And i tried to enter data into the table by
    se16(data browser) ---> create entries (F5)
    But system is displaying error message
    "The System settings do not allow any changes "
    and its not accepting any data .What i have to do .
    Please help me in this regard .
    thanks in advance.

    You need to create the table maintenance generator for the table
    Please check the following links
    Re: Table maintenance generator
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    Re: Regarding Table Mainantance Generator
    Re: table maintenance
    For further help look into these links
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21eb6e446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    Table
    Message was edited by: Dominic  Pappaly

  • Data pump + inserting new values in a table

    Hello Everybody!!
    My question is : is it possible to insert new row into a table which is included in running DataPump process (export data) ?
    Best regards
    Marcin Migdal

    Have a look here, never done it myself but seems kind of cool :)
    http://www.pythian.com/blogs/766/oracle-data-pump-11g-little-known-new-feature

  • Inserting new row in Table in 11.1.2 from 11.1.1.3 not rendering table!!!!!

    Hey Guys, my status might say noob but i am well seasoned in ADF. We migrated from 11.1.1.3 to the new JDEV 11.1.2. We are doing a test run before we commit to it.
    I noticed the following:
    We have master detail forms that work flawlessly in 11.1.1.3 when we ran the app under 11.1.2 we noticed that any time you try to add a new row to a table the table does not render. The server logs show the action going through and the count goes up one but the table is not rendered anymore it disappears!!!!!!!!!!!!!!
    Now all of this was imported from the 11.1.1.3. all of our tables that have createInsert actions on them are doing this.
    If i drag the tables again and set them up from scratch it seems to work fine. Our issue is we have a good 300 of these tables in different panels and panel collections. we have to do all of that work all over again.
    No errors show in the log. IS THIS A BUG???????????????
    UPDATE: REFRESHING THE PAGE using the Browser Refresh Button Will show the new ROW....... THIS IS NOT GOOOD!!!
    Edited by: user8333408 on Jul 7, 2011 9:23 AM
    Edited by: user8333408 on Jul 7, 2011 9:24 AM
    Edited by: user8333408 on Jul 7, 2011 10:08 AM

    Thanks for the reply.
    The Project was in version 11.1.3 before I migrated. I had the issue above so I migrated to 11.1.1.4 then to 11.1.1.5 then to the New GREAT 11.1.2 to go by the matrix of support The issue is still there.
    Basic Page layout:
    SEARCH-MASTER-PANELTABBED LAYOUT (Hold all the CHILDREN RECORDS)
    PANEL TAB is made of ; SHOW DETAIL ITEM- PANEL COLLECTION- TABLE.
    the panel collection has a toolbar with 2 buttons in it.
    My issue varies:
    Hit create insert==> record count goes up one but the table does not render (it goes all blank even if records existed in it)
    Hit undo budo ==>table still not rendering. (click next on master record then click previous to come back, the table renders correctly.)
    other tables do the following:
    Hit Create insert == > table shows normally and I can enter new record.
    Hit undo ==> table count goes down but table does not render at all anymore.
    for this issue i noticed if i set cache results to false the table works after hitting undo
    IF I CREATE A NEW SHOW DETAIL ITEM and put exactly what the other tabs have in them and use the same layouts and buttons the new table works great!!!!!!!!!!!!???????????????????? WTF?!?!?!?!
    NO ERROR MESSAGES even at finest level are thrown.
    I HAD NO ISSUES IN THE PREVIOUS VERSIONS OF JDEV IS THIS A JSF 2.0 BUG????
    BY THE WAY JDEV 11.1.2 sometimes CRASHES or Hangs when viewing the Binding of Page when you click on Binding straight from the Design view. I have to open the Binding Page separate to view it. FYI
    Edited by: Nottallah on Jul 11, 2011 9:48 AM
    Edited by: Nottallah on Jul 11, 2011 9:51 AM

  • Insert new row in table

    hi,
    im using aqualogic dsp2.5 . i have a requirement wher ei have to insert a new row in the table through data services. i tried the method executeUpdate() but i got an error saying this function is not supported. is there any method to insert a new row in a table through data services.
    thank you in advance,
    rahav.

    http://e-docs.bea.com/aldsp/docs21/appdev/ejbclt.html#wp1083367
    queryPlansDataServices.customer.CUSTOMERDocument customerDocument= queryPlansDataServices.customer.CUSTOMERDocument.Factory.newInstance();
    queryPlansDataServices.customer.CUSTOMERDocument.CUSTOMER customer=customerDocument.addNewCUSTOMER();
    customer.setLASTNAME("KAY_99");
    customer.setFIRSTNAME("JOHN_99");
    customer.setCUSTOMERID("CUSTOMER_99");
    customer.setCITY("SAN JOSE");
    customer.setCUSTOMERSINCE(Calendar.getInstance());
    customer.setEMAILADDRESS("[email protected]");
    customer.setTELEPHONENUMBER(new BigInteger("4085708612"));
    customer.setZIPCODE(new BigInteger("95131"));
    customer.setSTATE("CA");
    customer.setSTREETADDRESS1("2413 N First St");
    customerDs.submit( customerDocument );

  • I can't insert new row in database when there is a secondary key.

    hi experts. I am using Jdeveloper since a while. I would like to know If there is a way to insert a new row with secondary key attribute in database. As example if we have a sessionEJBLocal data control can't we add new row by using single selection choice item for secondary key attributes? I tried to use single selection even jdbc with sql queries in a managed bean but nothing. Can you help me please?

    would this solve your problem
    http://kohlivikram.blogspot.com/2008/10/add-new-row-in-adf-table-on-button.html

  • 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.

  • Add new row to a table

    Hello!
    I'm using JDev 11.2 and I'm trying to add a new row to a table object (using create insert)
    the catch is this-
    and the new empty row that will appear- I want a value set instead of one of the values- so the user can choose which value to insert
    do you know how can this be done?
    (just to be clear- i know how to add a value set, I know how to add new row- dont know how to make the new row contain value set field)
    tnx for your time
    Talya

    If you use a model driven list of value on the attribute in question this should work automatically.
    Have you setup a LOV on the attribute? Have you (on the attribute) checked that the ui-hint is set to selectOneChoice?
    Timo

  • Can't insert new row in last position in row set

    I am trying to programmatically insert a new row into the last slot of a View Object's default row set.
    I normally can do this:
    Row newRow = vo.createRow();
    // set stuff on the row
    vo.last();
    vo.next();
    vo.insert(newRow);and, voila, the row is in the last position.
    But on this particualr view object, when I do the above, the row is inserted in the first slot.
    There doesn't seem to be anything unusual about the View object. it is a child Vo in the data model, but that shouldn't matter.
    When I debug with vo.getCurrentRowSlot(), even after performing last(); next();, vo.getCurrentRowSlot() returns 0, never 3.
    Has anyone else run into this behavior and if so, any resolution or explanation?
    FYI, I was able to use the following workaround:
    Row lastRow = vo.last();
    if (lastRow != null){
        int indx = vo.getRangeIndexOf(lastRow) + 1;
        vo.insertRowAtRangeIndex(indx, newRow);
    } else {
       vo.insertRow(newRow);
    }   

    would this solve your problem
    http://kohlivikram.blogspot.com/2008/10/add-new-row-in-adf-table-on-button.html

  • OBIEE Write Back - Insert New Row

    Hello,
    I am new to these forums and looking for some help with OBIEE's Write Back feature.
    I have Write Back working fine with respect to updating existing rows in a table (ie: the UPDATE tag), but was wondering how to force Write back to invoke the INSERT feature. I would like to be able to create new rows in a table to allow my end user to dynamically add and remove information. I have heard of this being possible (perhaps through some sort of temp. table) in other forum posts, but have yet to see how this is implemented. Also, is it at all possible to use Write Back to delete rows in a table? Any help here would be greatly appreciated. Thanks!
    -Mike
    Here is an exerpt from my working XML file:
    <WebMessage name="NEWSNOTESADMIN">
    <XML>
    <writeBack connectionPool="Oracle Data Warehouse Connection Pool">
    <insert>INSERT INTO WC_NEWS_NOTES (CONTENTS, CONTENT_DATE, IMPORTANCE_LVL) VALUES(@{c0},@c{4},@{c2})</insert>
    <update>UPDATE WC_NEWS_NOTES SET CONTENTS='@{c0}', CONTENT_DATE='@{c4}', IMPORTANCE_LVL=@{c2} WHERE CONTENT_ID='@{c1}' </update>
    </writeBack>
    </XML>
    </WebMessage>

    Well first and foremost, Oracle explicitly states that writeback isn't meant to be used to transform OBIEE into a data entry system. Check the other posts on this subject...
    On the "force insert": put the same statement you have for INSERT into the UPDATE tag. Related to the initial point I mentioned: you will have to worry about uniqueness yourself. OBIEE isn't an OLTP platform!
    Re. delete: I liked Stijns recent post, so I'm going to use that as well:
    http://www.justfuckinggoogleit.com/search.pl?query=obiee+delete+through+writeback
    Third hit. Venkats blog.

  • Min and Max and insert new rows

    Hello,
    I am really a beginner in Excel (2007). I am not sure if this is the correct forum, anyway.
    I have grouped some rows in a sheet (rows 1, 2 and 3, columns A and B, table below), some of the columns have numeric values in that group and I have a row (inside that group) that shows the maximum and minimum values (row 1):
              A     B 
    +  1   43   12 <- MAX and MIN values for row 2 and 3 columns A and B
    +  2   34   12
    +  3   43   34
    I am using MAX and MIN functions: A1 = MAX($A2:$A$3), B1 = MIN($B$2:$B$3)
    The problem comes when I want to insert more rows after row 3, the formula keeps wrapping to A$2:$A$3 therefore I need to readjust the formula to: MAX($A2:$A$4) manually (for MIN is the same).
              A     B 
    +  1   43   12 <- Are the same, they should be
    "98 and  10"
    +  2   34   12
    +  3   43   34
    +  4   98   10 <- New row, but the maximum and minimum continues to be the same, I want to extend the formula automatically to the 4 row when I insert the new row.
    Question:
    How can I extend the function of the MAX and MIN formula automatically when I insert new rows?
    Please consider that I may insert rows at the beginning, in the middle or the end.
    Thanks,
    Enrique.
    Kikeman Electric Systems Engineer

    Hi Enrique,
    Thanks for posting in MSDN.
    Based on the description, you want to modify the formula for the A1 and B1 cell when you insert a new rows.
    Yes, we can use Worksheet.Change to dermin the change of data on the worksheet then we can modify the formula as we wanted. Here is a sample for your reference:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Me.Range("A1").Formula = "=MAX($A2:$A" & Me.UsedRange.Rows.Count & ")"
    Me.Range("B1").Formula = "=MIN($B2:$B" & Me.UsedRange.Rows.Count & ")"
    End Sub
    You can more detail about Excel VBA developing from link below:
    Getting Started with VBA in Excel 2010
    Welcome to the Excel 2013 developer reference
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Inserting new records into database table at runtime

    Hi all ,
    How to insert new records into database table at runtime on click update?
    Thanks.

    Hi Sasikala,
    Just for your understanding am giving a sample code snippet which you can use to read the contents of your Table UI element & save the data on to your database. Suppose you have a button up on pressing which you want to read the data from your screens table & save on to the database then you can proceed as shown below:
    1) Obtain the reference of your context node.
    2) Fetch all the data present in your table into an internal table using methods of if_wd_context_node
    3) Use your normal ABAP logic to update the database table with the data from your internal table
    In my example I have a node by name SFLIGHT_NODE and under this I have the desired attributes from SFLIGHT. Am displaying these in an editable table & the user would press up on a push button after making the necessary changes to the tables data. I would then need to obtain the tables information & save on to the database.
    data: node_sflight           type ref to if_wd_context_node,
            elem_sflight           type ref to if_wd_context_element,
            lt_elements            type WDR_CONTEXT_ELEMENT_SET,
           stru_sflight           type if_main=>element_sflight_node,
           it_flights             type if_main=>elements_sflight_node.
    "   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
        node_sflight_node = wd_context->get_child_node( name = 'SFLIGHT_NODE'  ).
       lt_elements = node_sflight->get_elements( ).
    "   Get all the rows from the table for saving on to the database
        loop at lt_elements into elem_sflight.
          elem_sflight->get_static_attributes( importing static_attributes = stru_sflight ).
          append stru_sflight to it_flights.
        endloop.
    " Finally save the entries on to the database
        modify ZSFLIGHT99 from table it_flights.
        if sy-subrc eq 0.
    endif.
    However a word of caution here.... SAP doesn't ever recommend directly modifying the database through an SQL query. You would preferably make use of a BAPI for the same. Try go through Thomas Jung's comments in [here|modify the data base table which is comming dynamiclly;.
    Regards,
    Uday

  • Please help! (creating new rows in a table)

    Hi guys.
    I have the following table:
    Guest ID | visit ID | start date | end date | days | total amount | avg amount
    1234.......| 6750...| 01/01/08...| 20/01/08 | 20....| $2000.........| $100
    Avg amount = amout per day = days/total amount
    I need to figure out a way of summing up all the profits from, say, last 3 weeks, 2 months etc.
    To do that, I am thinking of breaking up each stay period by days.
    i.e. to create a new row in a table for each day.
    So, for this example, we'd have 20 new rows,
    with same guest iD and visit ID,
    start date and end date are the same because we only count one day...
    Guest ID | visit ID | start date | end date | days | total amount | avg amount
    1234.......| 6750...| 01/01/08 ..| 01/01/08 | 1.......| $100............| $100
    1234......| 6750....| 02/01/08 ..| 02/01/08 | 1.......| $100..........| $100
    etc
    The question is, is there any way to make oracle do this?
    As in, to create new rows (maybe in a new table?)
    Any help/ideas would be appreciated!
    I am using Oracle SQL Plus 8.1.7.0.0

    I have used all_objects to populate multiple records as you are living in stone age :-)
    SQL> drop table temp;
    Table dropped.
    SQL> create table temp (
      2             Guest_ID integer primary key,
      3             visit_ID integer,
      4             start_date date,
      5             end_date date,
      6             days integer,
      7             total_amount integer,
      8             avg_amount integer);
    Table created.
    SQL> insert into temp values (1234, 6750, '01/jan/08', '20/jan/08', 20, 2000, 100);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select t.guest_id,t.visit_id,t.start_date+rownum-1 start_date,t.start_date+rownum-1 end_date, 1 as days, avg_amount as total_amount, avg_amount
      2    from temp t,
      3         (select 1
      4       from all_objects,
      5           (select (end_date - start_date) + 1 day_count
      6              from temp t
      7             where guest_id = 1234)
      8        where rownum <= day_count);
      GUEST_ID   VISIT_ID START_DAT END_DATE        DAYS TOTAL_AMOUNT AVG_AMOUNT
          1234       6750 01-JAN-08 01-JAN-08          1          100        100
          1234       6750 02-JAN-08 02-JAN-08          1          100        100
          1234       6750 03-JAN-08 03-JAN-08          1          100        100
          1234       6750 04-JAN-08 04-JAN-08          1          100        100
          1234       6750 05-JAN-08 05-JAN-08          1          100        100
          1234       6750 06-JAN-08 06-JAN-08          1          100        100
          1234       6750 07-JAN-08 07-JAN-08          1          100        100
          1234       6750 08-JAN-08 08-JAN-08          1          100        100
          1234       6750 09-JAN-08 09-JAN-08          1          100        100
          1234       6750 10-JAN-08 10-JAN-08          1          100        100
          1234       6750 11-JAN-08 11-JAN-08          1          100        100
      GUEST_ID   VISIT_ID START_DAT END_DATE        DAYS TOTAL_AMOUNT AVG_AMOUNT
          1234       6750 12-JAN-08 12-JAN-08          1          100        100
          1234       6750 13-JAN-08 13-JAN-08          1          100        100
          1234       6750 14-JAN-08 14-JAN-08          1          100        100
          1234       6750 15-JAN-08 15-JAN-08          1          100        100
          1234       6750 16-JAN-08 16-JAN-08          1          100        100
          1234       6750 17-JAN-08 17-JAN-08          1          100        100
          1234       6750 18-JAN-08 18-JAN-08          1          100        100
          1234       6750 19-JAN-08 19-JAN-08          1          100        100
          1234       6750 20-JAN-08 20-JAN-08          1          100        100
    20 rows selected.Thanks,
    Karthick.

Maybe you are looking for

  • How can I see all mail associated with my account simultaneously

    My boss has tasked me with finding a way to be able to see all sent & received mail associated with an account in mail simultaneously. InBox, Sent, Trash, Drafts, all at once, is that possible? Thanks

  • How do I resize all symbols in a project???

    So I'm trying to figure out how I can scale my flash project to fit the screen. The problem is that when I export the project to an .avi there is a huge white background that is still showing in the project. I tried to scale the whole project up by s

  • Reversal of goods movt  in IS -Retail on Invoice cancellation in AFS

    We are looking to reverse  goods mvt  in IS -Retail (GIT-101mvt type) on Invoice cancellation in AFS Can someone help? Regards Pratiksha Gangatirkar

  • Crawler not indexing the documents from repository

    Hi All, I've installed TREX 6.1.09 with EP6.(version=6.0.9.0.0 and KnowledgeManagementCollaboration 6.0.9.0.0 (NW04 SPS09) on my Windows 2003 platform. NameServer port is configured in J2EE visual Administrator and also all lights are green in TREX M

  • CIF Queue manual reservations are failing

    Dear Guru's I'm facing new challenge in production system, only the manual reservations (which is having more line items) from ECC system is always getting failed in CIF queue in production system. But the same issue not available in test systems. Pl