How to append new row in rowset with parameter?

Hi,
In the data input page in prerender method I have this code to filter rowset with non existing id in the table to show empty table on the page:
try {           
            getSessionBean1().getKoordinatesRowSet().setObject(1, non_existing_id);
        } catch (Exception e) {
            error("klaida koord " + e);
        }After this I have empty table and I want with a button on the page append one or more rows, fill them and save to my db. I try with this code:
public String addBtn_action() {       
        try {           
            RowKey rk = koordinatesDataProvider.appendRow();           
            koordinatesDataProvider.setCursorRow(rk);                           
        } catch (Exception ex) {
            log("Negaliu prideti eilutes ", ex);
            error(ex.getMessage());
        return null;
    }But new row does not appear. When I remove parameter in RowSet and remove code from prerender method all works fine, but I see all data from the table that was entered before. Like I said - I want to have an empty table and be able to append one or more new rows, fills them and save to my db. How can I resolve this?

Rui's answer will create copies of the entire table.  There may be times where thsi is what you want, but you asked about creating new rows.  If your new row is a copy of one of your existing rows, then you could use
_RowName.addInstance(1);
(the underscore at the beginning invokes the instance manager).  Is this what you're looking for?

Similar Messages

  • How to append new rows in a table with Javascript ?

    Hi ,
    I'd like to append new rows in a table dynamically using javascript?
    Do some of you have already done this before ?

    Rui's answer will create copies of the entire table.  There may be times where thsi is what you want, but you asked about creating new rows.  If your new row is a copy of one of your existing rows, then you could use
    _RowName.addInstance(1);
    (the underscore at the beginning invokes the instance manager).  Is this what you're looking for?

  • CUKD_API_DEP_MAINTAIN  -  Append new rows in existing Dependency

    Hello,
    I would like to know if ther's any way to append new rows within an existing dependency
    without having to reload all pre-existing rows.
    I'm already using function CUKD_API_DEP_MAINTAIN but I haven't found the way to
    append only new rows.
    This problem is due to the fact that my dependencies are reaching more than 9.999 rows
    and the dependency index used by the function ( DEPSOURCE-LINE_NO ) is a NUMC 4 
    Does anyone know if there is a different function I can use or how to work it around
    function CUKD_API_DEP_MAINTAIN?

    Hello Pradeep,
    Could you tell me why we are passing parameter FL_SYNCH to blank  ? I got similar issue.
    Many Thanks,
    Jitendra

  • How to connect new iMac to tv with a hdmi cord on one end and a thunderbolt on the other end

    how to connect new iMac to tv with a hdmi cord on one end and a thunderbolt on the other end

    You need a > Moshi Mini DP to HDMI Adapter with Audio Support - Apple Store (U.S.) to plug into the ThunderBolt port and an HDMI cable.

  • How to add new row and update existing rows at a time form the upload file

    hi
    How to add new row and update existing rows at a time form the upload file
    example:ztable(existing table)
    bcent                      smh            nsmh         valid date
    0001112465      7.4                       26.06.2007
    0001112466      7.5                       26.06.2007
    000111801                      7.6                       26.06.2007
    1982                      7.8                       26.06.2007
    Flat file structure
    bcent                       nsmh         valid date
    0001112465     7.8     26.06.2007  ( update into above table in nsmh)
    0001112466     7.9     26.06.2007  ( update into above table in nsmh) 
    000111801                     7.6      26.06.2007 ( update into above table in nsmh
    1985                      11              26.06.2007   new row it should insert in table
    thanks,
    Sivagopal R

    Hi,
    First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
    Then :
    Loop at it.
    *insert or modify as per your requirement.
    Endloop.
    Regards,
    Srilatha.

  • How to create new row in Adf uix table

    hi,
    I am using Jdev 10.1.2 , Can any body tell me how to insert new row in table ?
    Thanx

    Hi,
    try creating a createInsert action.
    Regards,
    Koen Verhulst

  • How to create new view without interlinking with gantt chart or resource views

    ok clear
    one another question
       In msp how to create new view without interlinking with gantt chart or resource views

    Hi Shiv PMC--
    I splitted your question above in another thread in order not to have  a huge thread with many topics in it.
    That being said, I'm not sure to understand. A view is just a manner to display MS Project data with columns. A view can have a table with column (left part) associated with a Gantt chart. It can also just contain a table with no Gantt chart (like the task
    table) or a table with a timephased grid (resource and task usage).
    Please give us more information, maybe with a concrete example so we can help you.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • How the IVI New Session.vi works with the ivi.ini?

    Hi,all
    Does anyone know how the IVI New Session.vi works with the configuration file ivi.ini?
    And when the ivi application running, how the ivi calss driver refers to the right specific instrument drivers without changeing the program?
    Thanks,
    njzhw
    人的生命是有限的,但知识是无限的!
    南京众知维测试技术有限公司

    Which VI or function are you referring to? There is neither an "IVI New Session.vi", nor a corresponding "Ivi_NewSession" function in C.
    The Ivi Class Drivers determine which specific driver to use at run-time, by looking up the resource descriptor (a Logical Name, or Virtual Instrument) and determining the associated Instrument Driver. That configuration information is settable by the user through MAX (Measurement and Automation Explorer).
    --Bankim
    Bankim Tejani
    National Instruments

  • How to add new rows in Advanced Table along with attribute value?

    Hi,
    I have one advanced table that contain one messageChoice and messageTextInput field.
    I want to add new rows in advanced table. I can able to add rows using the AddMoreRows button in the footer of the advanced table,
    but I want to add attribute value(contactId) each time when new row created.
    contactId I am getting from pageContext.getParameter("contactId")
    How to achive this? Please suggest.
    Thanks & Regards,
    Sunita

    Hi,
    There are two ways to do it.
    1. Use create method of entity object, create method fires whenever you creates new row.
    2. Handle the event raised by addanotherrow button and write logic there to initialize contactid as you are getting contactid from pageContext so I will suggest you to use this method.
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    //write your logic here to default the contact id
    Hope this will help.
    Regards,
    Reetesh Sharma

  • Append new row to the tableview...

    Hello All,
             I have a tableview with 3 columns.
    But out of these 3 only the 2nd column is editable.
    Now if I want to append one more row then an empty row is created with the 1rst and 3rd columns as non-editable.
    But I want all the fields as editable when i append a new record to the table view.
    Is it possible ? if yes can anyone guide me ????????
    Regards,
    Deepu.K

    Hello Raja,
               I have gone thru ur code.
    But in my case I can't get the rowindex  bcoz I donot know the row number.
    I'll tell u my scenario.
    I have a page which contains :-
    1,  Input fields,
    2,  Table view.
    3, SAVE Button ( when pressed it should update the internal table of the table view and the respective database tables ).
    Now initially when the application is executed all the input fields and the Tableview are filled in the INITIALIZATION  accordingly.
    Now if the user wants to change he will make the changes and press the SAVE Button.
    But,as mentioned above since the tableview is already filled with entries say 2 records are already there with 3 columns.For these 2 records I made the 1rst and the 3rd column as non-editable in the iterator .
    Then if the user wants to create one more record he will press the APPEND button and this creates a blank record in the internal table and the same is passed to the table view.
    SO, now we have the new row with null values.
    Here is the problem ...............*************************************
    When appending a new row since in the iterator we mentioned that the 1rst column and the 3rd column as non-editable the newly appended row also has the 1rst and the 3rd columns as non-editable. (which should not happen ).
              Now as per ur code u said that
    <b>" if p_row_index = <row no. you want to make it editable> "</b>
    Now how do i know which row no. should i render ?
    I thought in this way :-
    if I get the internal table in this iterator method then i will check the value for the 1rst column .
    If it is null then i want to make it as editable else non-editable.
    But to implement this i don't have the internal table here.
    Can I get the internal table with the newly appended row / rows in the iterator method .
    If so can u tell me how ?
    Plz help me Raja...(:
    Regards,
    Deepu.K

  • Need to create a new row in table with same data as Primary key, but new PK

    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kale

    user9970447 wrote:
    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kalesomething like
    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')

  • How to append calling and called number with translation rules?

    Hello,
    I have one question about digit manipulations.
    How to append calling number and called number with IOS commands?
    For example, when 123 dials 45678, translations have to be performed and the new called number to be 12345678.
    Thank you,
    I will vote this conversation.

    It is not possible with translation rules.
    However, you can do that with a TCL/IVR script.

  • How to add new row in KL02 trx - Activity type control data

    Hi guys.
    I am not a FI-CO consultant, but I want to add a row since KL02 transaction within a cost center, with a new fiscal year. When you access KL02 (change activity type), you set the activity type, then press Master Data and the basic screen appears. If you press the Display planning control button, you will see the "Display Activity Type Control Data" List. I wanna add a row for a specific cost center here, because the cost center I refer has not 2011 as fiscal year. I tried to use, since basic screen of KL02, use the Change planning control button, but when I set my cost center and 2011 as fiscal year, the Save button is inactive. Furthermore, I tried to press the Period screen and a message appeared "No data has been entered yet". So I dont know how to add one row for a cost center in the Planning control (Activity type control data) list of the KL02 transaction, specifically for an activity type. Do you know? Thanks in advance

    Hi,
    The list of cost centers in which the activity type is planned is given in KL02 under planning data.  In order to add a new cost center to this, you need to enter the activity type in transaction KP26 for a particular year. 
    Goto transaction KP26
    Give version - 0
    from period 1 to 12
    year - 2011
    cost center - mention the cost center
    Activity type - mention activity type
    goto overview screen F5 and add the plan price for the activity in the cost center.  This step will automatically add new row in the activity type control data.
    Hope this helps.
    Thanks,
    Ram

  • How to add new row to adf table progrmatically

    Hi,
    I have a bean with a list and correspoding getter & setter methods inside it.
    I created a datacontrol out of the bean and I am displaying af:table in the ui
    binded to this list.
    Ex:
    public class StudentBean {
    private List<Student> students;
    // getter & setter methods.
    jsp
    <af:table value="#{bindings.students.collectionModel}" var="row"
    rows="#{bindings.students.rangeSize}"
    emptyText="#{bindings.students.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.students.rangeSize}"
    rowBandingInterval="0"/>
    How to add a new row programitically to this adf table.
    I dragged and dropped 'Create' from operations menu on to jsp.
    But on click of that.no new row is being added to the current table.
    On click of a button in u.i I want to add a new row to the table.
    Thanks,
    Praveen

    Hi,
    The source code is as below.
    <af:table value="#{bindings.students.collectionModel}" var="row"
    rows="#{bindings.students.rangeSize}"
    emptyText="#{bindings.students.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.students.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.rscGroupsQuery.queryDescriptor}"
    queryListener="#{bindings.rscGroupsQuery.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.rscGroups.collectionModel.selectedRow}"
    selectionListener="#{bindings.rscGroups.collectionModel.makeCurrent}"
    rowSelection="single" id="t1"/>
    <af:commandButton actionListener="#{bindings.Create.execute}"
    text="Create" disabled="#{!bindings.Create.enabled}"
    id="cb1" partialTriggers="t1"/>
    Please let me know where am I doing wrong?
    On click of this button,it is not adding a row dynamically.
    Thanks,
    Praveen

  • Editable ALV Grid: Append new rows

    Hi All,
    I have developed a report which will displays output in editable ALV grid list. Users can modify the values in output and save. These values will be stored in one custom table.
    My requirement is whenever user clicks on '+' mark (Create entries or Append or Copy: Standard toolbar) report should allow to enter new entries and save. How do I capture the selected function code? why becuase i need to display one value from the custom table in that added new row...
    Regards,
    Ramesh.

    Hi Ramesh,
    please check changed data event.....
    please go through the reference link......
    https://wiki.sdn.sap.com/wiki/display/Snippets/UpdatingtheInternalTable-AfterEditinALVusingFunctionModules
    Regards,
    Venkat

Maybe you are looking for

  • Error while running setup.exe for oracle installation on windows 2003

    Hi, I am trying to install oracle 9.2.0.1 on my windows 2003 machine and when i click on setup.exe nothing happens. when i tried to run it thru command prompt again nothing happens when i check in computer management => event views it throws followin

  • MSI 290X Can't use Displayport and HMDI at the same time

    Howdy: I have two monitors running Win 7. 1. ASUS Black 24" 2ms HDMI LED monitor connected to the HDMI of my MSI R9 290X Lightning and a Dell VGA connected via Cable Matters DisplayPort to VGA adapter. Both monitors go black if I try to connect both.

  • DA0005 date format error after install CHF17

    Post Author: Akvile CA Forum: Deployment After installing chf17 I get the following error when trying to refresh reports, which require user to enter date in the condition prompt: DA0005 Connection or SQL sentence error Exception: DBD, [Sybase][ODBC

  • Multiperiod Consolidation - Web (EHP2)

    Hi! Quick question. We are on SEM-BCS 6.0 EHP2 with availability of the WEB Consolidation Monitors.Since we are decentralizing data collection for our budget version we have configured multiperiod consolidation. Question: The WEB Monitor for the Corp

  • SCCM 2012 & SQL 2012

    Hi Experts, I am trying to install SSCM 2012 but in the middle of the installation it gives me an error that Configuration Manager requires Microsoft SQL Server 2012 With Commulative Update 2 I have installed SQL Server 2012. Now Where Ican find the