Editable ALV- Disable Add, delete row buttons

Hi,
I have an editable ALV using OO Grid. Some columns are editable and some are not using field catalog. I want to disable the 'add new row' and 'delete row' buttons. How to go about it ?
Regards,
Vin

You can simply add them to the "Exclude" table and pass them to the SET_TABLE_FOR_FIRST_DISPLAY method.
   data: iexclude type ui_functions,
   data: xexclude type ui_func.
    define macro_exclude.
     xexclude = &1.
      append xexclude to iexclude.
    end-of-definition.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_copy_row.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_delete_row.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_append_row.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_insert_row.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_move_row.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_copy.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_cut.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_paste.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
    macro_exclude cl_gui_alv_grid=>mc_fc_loc_undo.
    call method alv_grid->set_table_for_first_display(
        exporting
             it_toolbar_excluding  = iexclude     "<--- Right HEre
             is_layout             = xlayout
        changing
             it_outtab       =  izcmptrans[]
             it_fieldcatalog = ifc[] ).
Regards,
Rich Heilman

Similar Messages

  • Add/Delete Rows problem

    I'm having a problem with the add row and delete row for my table.  I have a table set up with the add row button in the header, and the delete row button in the first cell of the row beneath the header.  I have it set so that the initial count of the row is 2.  My problem is if the user adds several rows with data, and save the form.  When that user goes back into the same form later, it keeps the several rows that the user entered, which is fine, but then it automatically adds 3 more blank rows to the table, which I don't want.  I don't understand why it is doing this.  Does anyone have a clue to why this is happening?
    Thanks
    Connie

    Hi Connie,
    Just make sure that you have checked the below thing.\
    File > Form Properties > Run tIme > Scripting > Automatically is checked.
    Thanks,
    Bibhu.

  • Create row as next row on click of add another row button not on top of it

    My af:table is based on a transientVO (all the attributes are transient)
    This is just for data entry and not for data retrieval
    So i have placed add another row button on my af:table
    After i enter data in the first row and click add another row button the data is being moved to second row and the new row is created on top of that
    I want the row to be created as next row . not on top of my existing row
    How can we do this

    would this help you:
    http://lucbors.blogspot.com/2010/12/adf-11g-how-to-control-where-new-row-is.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.

  • Error with "Add new Row" button in Master detail VO

    Hi,
    Am having a header VO , Forecast HeaderVO and a child VO
    ForecastLineVO, now forecastHeaderVO has two bind condition attached to it,and when we run header Vo line VO will automatically execute as they are linked by a view link.My child Vo is attached to a advance table, which has a ADD Another Row button,Now when i press the button for the case where no header is is there it shows me a error"Failed to find or invalidate owning entity".
    Below am giving the coding what i have written in the AM to handle the Add New Row button,
    public void createForecastTarget(String month, String year,String fortnight,String forecastmonth,String forecastyear)
    ForecastLineVOImpl vo1=getForecastLineVO();
    ForecastHeaderVOImpl vo=getForecastHeaderVO();
    System.out.println("Start");
    vo.setWhereClauseParam(0,month);
    vo.setWhereClauseParam(1,year);
    //vo.setWhereClauseParam(2,fortnight);
    vo.setWhereClauseParam(2,forecastmonth);
    vo.setWhereClauseParam(3,forecastyear);
    vo.executeQuery();
    if (!(vo1.isExecuted()))
    throw new OAException("ASF", // Message product short name
    "MIS_SEARCH_PENDING");
    // We need to do this on a VO that has not been queried before we insert
    // our first row. We don't want to do it for subsequent inserts.
    System.out.println(vo.getFetchedRowCount());
    if (vo.getFetchedRowCount() == 0)
    // vo.setMaxFetchSize(0);
    int rownum = vo.getFetchedRowCount() ;
    OARow row = (OARow)vo.createRow();
    int rownum1 = vo1.getFetchedRowCount() ;
    System.out.println("In between");
    OADBTransaction transaction = getOADBTransaction() ;
    Number forecastid = transaction.getSequenceValue("MIS_FORECAST_HEADER_S");
    Number forecastlineid = transaction.getSequenceValue("MIS_FORECAST_LINE_S");
    System.out.println(forecastid+" "+forecastlineid);
    row.setAttribute("ForecastId",forecastid);
    row.setAttribute("DataEntryMonth",month);
    row.setAttribute("DataEntryYear",year);
    row.setAttribute("DataEntryFortnight",fortnight);
    row.setAttribute("ForecastMonth",forecastmonth);
    row.setAttribute("ForecastYear",forecastyear);
    vo.insertRowAtRangeIndex(rownum,row);
    vo.clearCache();
    transaction.commit();
    // Required per OA Framework Model Coding Standard M69
    row.setNewRowState(row.STATUS_INITIALIZED);
    OARow row1 = (OARow)vo1.createRow();
    row1.setAttribute("ForecastId",forecastid);
    row1.setAttribute("ForecastLineId",forecastlineid);
    System.out.println("forecast id"+forecastid);
    vo1.insertRowAtRangeIndex(rownum1,row1);
    // Required per OA Framework Model Coding Standard M69
    row1.setNewRowState(row1.STATUS_INITIALIZED);
    else
    int rownum2 = vo1.getFetchedRowCount() ;
    System.out.println(rownum2);//+vo1.getCurrentRow().getAttribute(1))
    System.out.println(vo.first().getAttribute("ForecastId"));
    OARow row2 = (OARow)vo1.createRow();
    row2.setAttribute("ForecastId",vo.first().getAttribute("ForecastId"));
    OADBTransaction transaction = getOADBTransaction() ;
    Number forecastlineid1 = transaction.getSequenceValue("MIS_FORECAST_LINE_S");
    row2.setAttribute("ForecastLineId",forecastlineid1);
    // row2.setAttribute("DeleteAttr", "N");
    vo1.insertRowAtRangeIndex(rownum2,row2);
    // Required per OA Framework Model Coding Standard M69
    row2.setNewRowState(row2.STATUS_INITIALIZED);
    System.out.println("forecast line id"+forecastlineid1);
    Now while debugging i found out that am getting the error in the if block
    in the code
    OARow row1 = (OARow)vo1.createRow();

    Hi,
    Summit ,again am getting the error and i think am getting it in the line when am trying to create one for line VO
    as OARow row1=(OARow)vo1.createRow();
    Below am giving the stack trace
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1142)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1294)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2396)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
         at mis.oracle.apps.asf.dcp.frcst.webui.ForecastDealerCO.processFormRequest(ForecastDealerCO.java:158)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
         at mis.oracle.apps.asf.dcp.frcst.webui.ForecastDealerCO.processFormRequest(ForecastDealerCO.java:158)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Please help.

  • Row Level PPR in Advanced Table with Add More Rows Button

    <br>
    I have programmatically fired PPR event on MessageChoice. But it is in Advanced Table with
    Add More Rows Button. When the value is changed in MessageChoice I Show/Hide Custom LOV
    through SPEL like this ${oa.BioEmployeePVO.EmpManagerRender} .
    But it is <b>hiding the all the ROWS</b> not just the row where the value has been changed.
    I even tried with this code and get NULL for rowReference.
    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    In Processrequest()
    String pageName = pageContext.getRootRegionCode();
         Hashtable params = new Hashtable (1);
         params.put ("param1", pageName);
         Hashtable paramsWithBinds = new Hashtable(1);
        paramsWithBinds.put ("param2",new OADataBoundValueFireActionURL (mcb, "{$AttendeeType}"));
        mcb.setFireActionForSubmit ("empPositionChange", params, paramsWithBinds,false, false);
    In ProcessFormRequest() {
    if ("empPositionChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))   
          String rowReference = pageContext.getParameter("param2");
        //    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
         Serializable[] parameters = { rowReference };
          am.invokeMethod("handlePositionChangeEvent", parameters);
    <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    HI Kumar,
    Answer to your last post is "yes".
    Now to your doubt regarding the code:
    Hi Anna
    I am trying to understand your code.
    FireAction firePartialAction = new FirePartialAction("fireHideEvent"+(i/noOfTlaColSpan));
    HideImgBean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
    1. What is this i/noOfTlaColSpan ?
    :)Forget abt this in your case it should be the event name which u r firing and capturing the it in the PFR.
    Like FireAction firePartialAction = new FirePartialAction("YOurEventName");
    and in PFR u can capture tht as:
    if("YOurEventName".equals(pageContext.getParameter(EVENT_PARAM)))
    //your logic to invoke AM method
    2. I believe this HideImgBean would be MessageChoice for me?
    :)Yep ur right
    3. This brcdOhInventoryViewUpdateVOImpl would be the Custom PVO(Extending Seeded Base VO)
    I create by adding the transient attributes?
    :)Yep ur right
    4. I cannot understand this code. Could you explain.
    :)Please look at my comments in some of the lines .I have explained wht i am doing
    if(updateIter==null)
    updateIter[0]= invViewVO.createRowSetIterator("updateIter");//This initViewVo should be ur custom VO object
    if(cnt>0)
    updateIter[0].setRangeStart(0);
    updateIter[0].setRangeSize(cnt);
    for(int i=0;i<cnt;i++)
    row = (brcdOhInventoryViewUpdateVORowImpl)updateIter[0].getRowAtRangeIndex(i);
    String selectFlag=(String)row.invokeMethod("getPartNumber");//This getPartNuber should be replaced by the Prim Key inoke methd of ur VO
    if(RowID.equals(selectFlag))
    //This is my logic to set the transient attributes based on the msgChoiceBean value ..u have to pass the value when u invoke this method
    if(reserveMethod.equals("BINARY"))
    System.out.println("In Binary");
    Boolean bVal= new Boolean("false");
    Serializable sr[]={bVal};
    Class []methodParamTypes = { bVal.getClass() };
    row.invokeMethod("setshowreservetxt",sr,methodParamTypes);
    Boolean bVal1= new Boolean("true");
    System.out.println("bVal1"+bVal1);
    Serializable sr1[]={bVal1};
    Class []methodParamTypes1 = { bVal1.getClass() };
    row.invokeMethod("setShowreservemsgchoice",sr1,methodParamTypes1);
    break;
    In my AM I am doing this. Am i doing right?:)Yep u r right
    BioPrescribersPVO is the custom VO(extending seeded base VO).
    public void handlePositionChangeEvent(String param)
    OAViewObject vo = (OAViewObject)findViewObject("BioPrescribersPVO");
    OARow row = (OARow)findRowByRef(rowReference);
    if (row != null)
    String position = (String)row.getAttribute("AttendeeType");
    if (("PRESCRIBER".equals(position)) )
    // BioEmpManagerRender is the transient attribute in BioPrescribersPVO.
    row.setAttribute("BioEmpManagerRender", Boolean.TRUE);
    row.setAttribute("BioPresManagerRender", Boolean.FALSE);
    else
    row.setAttribute("BioEmpManagerRender", Boolean.FALSE);
    row.setAttribute("BioPresManagerRender", Boolean.TRUE);
    } // end handlePositionChangeEvent()
    // Initializing the custom VO
    /*No need to initialize the VO because this is not a PVO(Propeties View object)
    U r just using the existing VO and tht vo shloud have a primary key.Tht way u can match the rowref u r getting with the actual row from the View object*/
    public void init()
    OAViewObject appPropsVO = (OAViewObject)getBioPrescribersPVO();
    if (appPropsVO != null)
    if (appPropsVO.getFetchedRowCount() == 0)
    appPropsVO.setMaxFetchSize(0); appPropsVO.executeQuery();
    appPropsVO.insertRow(appPropsVO.createRow());
    OARow row = (OARow)appPropsVO.first();
    row.setAttribute("RowKey", new Number(1));
    handlePositionChangeEvent("");
    } // end init()
    Thanks
    Anna

  • Issue with ADD NEW ROW button

    Hi,
    When I click 'ADD NEW ROW ' button, an empty row is getting created as the last but one column.
    I want the new row should be add at last. (as the last row). The code I am using :
    Row row = vo.createRow();
    vo.last();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Can anybody please tell me how to get it.
    Thanks,
    Swaroop

    Hi Shiv,
    I just added a 'Add New Row' submit nutton.
    In Controller I added the following code:
    if (pageContext.getParameter("Addrow") != null)
    am.invokeMethod("createrow",null);
    In AM code I've written:
    public void createrow()
    OAViewObject vo = (OAViewObject)getEntityshift2VO1();
    Row row = vo.createRow();
    vo.insertRow(row);
    vo.last();
    row.setNewRowState(Row.STATUS_INITIALIZED);
    --Swaroop                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Add/delete row in JTable

    I went through the tutorial of JDK about how to programming JTable, i can NOT find a way to add/delete row into/from JTable.
    I immagine it would be a difficult task because the data set it takes 'Object data[][]' is NOT dynamically grow/shrinkble.
    Can we make it take ArrayList[] as input dataset so that the dataset can dynamically grow/shrink?
    Any other way around to add/delete row?
    THANKS for your consideration.

    You have to write your own TableModel like extending AbstractTableModel. In that class add custom methods to add and remove rows. From those methods call fireTableRowsDeleted(..) and fireTableRowsInserted(..) to update UI.

  • My add/delete row function is unselectable. How do I fix this?

    For no reason that I can guess I am unable to add or delete rows. That little circle icon with the two horizontal dashes is gone and when I click on a numbered row the 'add/delete row' choices are grayed out, unelectable. My spreadsheet needs are VERY basic so I'm at a loss for what has happened because I've been using this file. It WAS working like it should, but now it's not and I don't know if I clicked something OFF or what. I am not new to a Mac, so I'm not a newbie with this stuff. Any ideas??????

    Try deactivating any filter you have set on the table.
    SG

  • Editable ALV issue: When Delete/Modify a row, ztable doesnt reflect changes

    Greeting Fellow Abapers,.
    I have been running into an issue that I need some advice on.  I am allowing users to edit a Ztable via ALV.  When the quantity field is updated everything is fine. However, when the field "lic_plate" is edited the code appends another row into the Ztable instead of modifying it.  Also, when the delete row functionality of the grid is used the row is not deleted from the Ztable.
    Here is the ztable structure. The fields I allow to be edited are in BOLD...
    ZPALLET-VBELN
    ZPALLET-MATNR
    ZPALLET-LINE_NUM
    ZPALLET-LIC_PLATE
    ZPALLET-LOT_NUMBER
    ZPALLET-PAL_TYPE
    ZPALLET-MAN_DATE
    ZPALLET-QUANTITY
    ZPALLET-PROC_DATE
    Here is the source code that the APPEND is taking place...
    FORM save_database .
    Getting the selected rows index*
      CALL METHOD o_grid->get_selected_rows
        IMPORTING
          et_index_rows = i_selected_rows.
    Through the index capturing the values of selected rows*
      LOOP AT i_selected_rows INTO w_selected_rows.
        READ TABLE itab INTO wa INDEX w_selected_rows-index.
        IF sy-subrc EQ 0.
          MOVE-CORRESPONDING wa TO w_modified.
          APPEND w_modified TO i_modified.
        ENDIF.
      ENDLOOP.
    IF sy-subrc = 0.
        MODIFY zpallet FROM TABLE i_modified.
    ENDIF.
    ENDFORM.
    Please help. I am in your debt.
    ...as always, points will be awarded.
    Best,
    Dan

    Hello Dan
    When you are using an editable ALV for table maintenance you have to take care that the users
    - cannot edit the key fields of existing DB records   and
    - every new record (row) does not match any existing record (i.e. has identical key field values)
    Instead of relying on selected rows for the DB update I would recommend to store a "PBO image" of your data and compare this with the "PAI image" of the data as soon as the user pushes the SAVE button.
    Example:
    DATA:
      gt_outtab_pbo    TYPE   < your table type>,  " PBO image
      gt_outtab           TYPE   < your table type>.  " PAI image
    " 1. Select data from DB table and store in both itabs:
      SELECT * ... INTO TABLE gt_outtab.
      gt_outtab_pbo = gt_outtab.
    " 2. Display editable ALV list -> user modifies gt_outtab
    " 3. SAVE function requested
    " ... compare gt_outtab vs. gt_outtab_pbo
    " .... INSERT, UPDATE, or DELETE DB records
    " Finally set:
      gt_outtab_pbo = gt_outtab.
    " 2. User continues with editing
    In order to compare PBO vs. PAI data you may have a look at my sample coding:
    [Comparing Two Internal Tables - A Generic Approach|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/comparing%2btwo%2binternal%2btables%2b-%2ba%2bgeneric%2bapproach]
    Regards,
      Uwe

  • Add/Delete rows from ALV-grid

    Hi to all,
    i have 2 questions concerning alv-grids:
    i have an alvgrid displaying a table and what i need is some functionality to add or delete rows from the alvgrid - how can i do that ?
    within one row i have one field containing the status and i want to be able to select the status from a combo/dropdown-field and set it for this particular row.
    thanks in advance!

    Hi,
    Report BCALV_EDIT_04 shows how to append and delete rows.
    Report BCALV_EDIT_06 shows drop down list for cells in a column.
    These report should be available in any R/3 system including all ABAP Preview versions.
    Hope this can help.
    Regards, Johan

  • BPM Object Presentation - array items - (add / delete rows dynamically)

    Hi,
    We have a BPM Object presentation which uses a 'group' inner object to display ROWS of data. The presentation has an 'array0' created by default to handle the 'group' of rows. It also has the '+' and '-' buttons by default.
    There is a field at the upper level which shows the 'sum' of values in individual rows. It needs to 'REFRESH' when an add (+) or deletetion (-) or rows happen.
    But we see that all the controls (text boxes etc which are wired to the 'inner' bpm object of the group and the +/- buttons are one unit 'array0'. And the only method if at all, is an 'Event Listner' which is not showing any methods related to BPM Object.
    Can anyone help us with a clue as to how to handle the '+' and '-' events or wire the 'array/group' events to code - any clue with 'events'?
    This is a little urgent as it is an issue and we need to fix the same. Appreciate any quick responses/clues.
    Thanks in advance,
    -user8702013.

    The SUM field needs refresh() method to be called to reflect the new value whenever we are adding/deleting rows.
    To call this method for to show the reflection we have to declare a method on BPM object level which receives a argument of type ‘Fuego.Util.GroupEvent’, then in this method you can have your logic(here refresh() method is required to show new value on deletion/addition, hence this method is being called). This method can then be wired (it shows up) to the 'Event Listener' of the group/array.
    The newly created method will be called whenever a new row is added/deleted (Event will be fired hence method call).

  • Disabling the Delete submit button in EditCurrentRecord

    Hello,
    oracle.jbo.html.databeans.EditCurrentRecord automatically generates two submit buttons ("Save Changes" and "Delete Record"). Is there a way that I can remove or disable the "Delete Record" submit button so that I can prevent the user from deleting a record.
    Thanks!
    Jack

    Hi!
    Save your time: examine and (unfortunately ...) rewitre entire (bugs bugs, bugs,....) Data Web Bean package. (Source: <JDEV HOME>\lib\jbohtmlsrc.zip.
    We found default package too bad for our project and successfully added many natural features:
    (Multible table filters, multible column edit current records, Filter marks, Report writing etc etc)
    null

  • How to add/delete rows on the form without saving data

    I am new to apex
    I am working on project and need some help on creating a form
    my requirment is to save a request that has multiple questions.
    i have a request form with multiple regions
    On one of the region that takes questions, I want to create a tabular form such that i can add/delete/update row without hitting database and enter multiple questions
    each row is one question.
    Apex has the default functionality of having a tabular form linked to a table that onload shows the data from that table and also on click of add or delete hits the data base to save the data.
    However i want to load a form that does not show any data if its a new request and click of add/delete should not update the databse. It should just add/delete a row on the form
    so user logs in and can create a request that has multiple questions
    finally want to submit the form and save all the information of the form in multiple tables.
    As of now i a m able to have a simple form and a process that save 1 question per request.
    How do i achieve this. Please assist.

    Do that using collections like in this example:
    http://apex.oracle.com/pls/otn/f?p=31517:176
    Once you are done, you may decide either to save that or to clean it up.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Add a row button

    Hi,
    I've been creating a dynamic/flowable table in which I'd like to have a button to add a row if someone wanted to.  I've been searching the forums and I've not quite been able to arrive at exactly what I need to have for script.  I also have a total cost field which will need to recalculate.  I'm attaching the file.  If you could help me out the scripting I'd appreciate it.
    Also, when using subforms is there a way to still control the spacing between. Mine keep bumping right up against each other.
    Thanks!

    Hi,
    Here i an example: https://acrobat.com/#d=RZ1lzX23*u7L4N9rtWCYPQ
    The script you want is in the click event of the add row button. The form needs to be saved as a Dynamic XML form in the save as dialog and the page needs to be set to flowed. I suspect that you have it flowed already because the subforms are touching. You can set margins in the Layout palette to keep some space between objects.
    Also check out the script in the calculate event of the total field.
    Lastly, you can share files by unloading onto Acrobat.com and then sharing the published link here.
    Hope tht helps,
    Niall

Maybe you are looking for