How to make row deletion impossible?

Hello experts,
I have an editable ALV grid with the following data:
<b>ACCOUNT     DESCRIPTION      TAX</b>
1000200        revenue          A0
1000100        cost             V2
I want to make the deletion of second row impossible. (I dont want to disable the delete row button)
How do I achieve this?
Thanks,
Yuvaraj

DATA pt_exclude1 TYPE ui_functions.
    perform exclude_tb_functions CHANGING pt_exclude1.
*--e.g. initial sorting criteria, initial filtering criteria, excluding
   --functions
    CALL METHOD gr_alvgrid->set_table_for_first_display
      EXPORTING
      I_BUFFER_ACTIVE =
      I_CONSISTENCY_CHECK =
      I_STRUCTURE_NAME =
      IS_VARIANT =
      I_SAVE =
      I_DEFAULT = 'X'
      is_layout = gs_layout
      IS_PRINT =
      IT_SPECIAL_GROUPS =
       IT_TOOLBAR_EXCLUDING = <b>pt_exclude1</b>
      IT_HYPERLINK = ls_hyperlink
      CHANGING
      it_outtab = itab[]
      it_fieldcatalog = gt_fieldcat
      IT_SORT =
      IT_FILTER =
      EXCEPTIONS
      invalid_parameter_combination = 1
      program_error = 2
      too_many_lines = 3
      OTHERS = 4 .
    IF sy-subrc <> 0.
   --Exception handling
    ENDIF.
*&      Form  exclude_tb_functions
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions .
  DATA ls_exclude TYPE ui_func.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_COPY .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_COPY_ROW .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_CUT .
  APPEND ls_exclude TO pt_exclude.
<b>  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_DELETE_ROW .
  APPEND ls_exclude TO pt_exclude.</b>
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_INSERT_ROW .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_MOVE_ROW .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_PASTE .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_PASTE_NEW_ROW .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_UNDO .
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>MC_FC_LOC_APPEND_ROW .
  APPEND ls_exclude TO pt_exclude.
ENDFORM .                    "exclude_tb_functions

Similar Messages

  • How to make row selection by checkbox in ADF table

    hello,
    using jdev11g TP4 , fusion web application
    when i drag my view object as ADF table into jsf page,
    i want to know how to make row selection by checkbox
    thanks
    greenApple
    Edited by: greenApple on Nov 10, 2008 11:33 AM

    Hi,
    the tree component has changed compared to 10.1.3. You no longer have a tableSelectmany component that renders as checkboxes. Instead you use the ctrl key and select the table rows
    Frank

  • How to make before delete trigger

    Hi all
    I want make before delete trigger
    I have 2 tables hr_api_transactions and new_table
    when I delete records from hr_api_transations table
    then that deleted record should be stored/insert in new_table table
    for that purpose I need before delete trigger
    How can I make It?

    Hi
    I have written following code but it gives an error
    CREATE OR REPLACE TRIGGER before_delete_trigger
        BEFORE DELETE
            ON HR_API_TRANSACTIONS
            FOR EACH ROW
        DECLARE
        BEGIN
            delete from new_table where new_table.name = OLD.hr_api_transactions.api_addtnl_info;
        END;
    TRIGGER BEFORE_DELETE_TRIGGER compiled
    Errors: check compiler logafter show errors it shows
    4/54 PL/SQL: ORA-00904: "OLD"."HR_API_TRANSACTIONS"."API_ADDTNL_INFO": invalid identifier
    4/9 PL/SQL: SQL Statement ignoredhere hr_api_transaction is table which contain API_ADDTNL_INFO column
    and name column of new_table and API_ADDTNL_INFO column of
    HR_API_TRANSACTIONS table are same

  • How to make row number in local member dynamic

    I have create multiple local member and the formula I the local member is such as
    =SUM(row11+row14+row16)
    then I add another couple of row before row 11, now the formula should be:
    =SUM(row13+row16+row18)
    anybody know is there a way how to make the formula in the local member dynamic, which means that if I add rows of drop rows, the formula in local member will automatically change?

    Hi Jian,
    You can create local my by "Activate Local Member Recognition", but make sure "Use Position in axis" should be unchecked.
    Also make sure you have added all required Local members before any insertion of rows.
    Hope this should work.
    Thanks,
    Rishi

  • IW33 how to make dispaly deletions on

    Point remaining is to make Display deletion defaulted as 'ON', whenever user go into the Service Order (IW33)                  . I think that in gui there is a variable assignment which assigns the value as defaulted 'OFF',  so whenever user enters the transaction they need to go and make the display deletion as 'ON'. Please try to investigate that if in some user exits we can make this display deletion as 'ON' or by any other way we can configure this variable to 'ON' and let me know your findings.

    Dantu,
    I'm not sure this will be possible since there may be some ABAP code behind the menu selection that will not run in IW33.
    However, have a look at BADI IWO1_SCEEN_MODIFY or user-exit IWO10006 (FCode exclusion through customer enhancement)
    PeteA

  • How to make the delete button save before deleting?

    Hi all,
    I created a tabular form. What I want to do is when the user click the Delete button, it saves the chagnes AND delete the checked row(s). I tries putting the request "Delete" in the Conditional Processing of the multirow delete process, but I couldn't get it to work.
    Does anyone know how to do that? Thank you very much for the help in advance!

    So, instead of having two separate button, one for Apply Changes and the other for Delete , you want to have one button that will do both. However, if you do that you may miss out on the delete confirmation or end up having a confirmation for both the actions.
    Here is how to do it.
    1. Lets say we will retain the Apply Changes (label) button with request SUBMIT. So make the Condition on Delete button 'Never'.
    2. Now edit the ApplyMRD process and make the condition When Button Pressed = 'SUBMIT'
    3. ApplyMRU will also have the same condition.
    Now both processes should fire on the click of one button.
    BTW, you many have to change the sequence number of the ApplyMRD process and make is greater than the sequence number of the ApplyMRU process.
    Regards,
    Edited by: Prabodh on Aug 17, 2010 8:28 PM

  • How to make Row and Column headings bold in 2004s Web template

    Hi!
    I have created a web template which has 3 queries.
    I would like to achieve the following
    1> Bold the column heading and row headings.
    2> Delete the space between the three reports(right now there is some space)
    3> Align the columns on top of each other so that it looks like a continuous report.
    (I know how to suppress the column headers on the 2 reports which are at the bottom)
    Is this possible in 2004s???
    With Table interface class gone in 2004s--is stylesheet modification the only way to go????
    Please provide me with steps to achieve the above.
    Helpers will be rewarded.

    Hi Zhu,
    Thanks for the link.This really helps.
    However I was only able to see the modules for Column Width, Negative number and Document Content.
    Is there any other module as well to change Column heading ?Its not mentioned in the documentation.
    Can you please let me know.
    Thanks,
    Vivek

  • How to make Row of a table Editable.

    hi Experts,
    I have a table in which i am displaying data. Now in Each Row of table I have an Edit Button.
    I want to make to row that editable for which Edit button is pressed.
    How to proceed for that. ?
    Thanx.

    Hi Sourav,
    Please go thru the code mention below to make a row editable of a table.
    For this just take a attribute of type WDY_Boolean in ur node and bind the attribute to the UI Element Enable property.
    Call this logic on the Action of ur Edit Button
    METHOD onactiononclick .
      DATA lo_nd_node TYPE REF TO if_wd_context_node.
      DATA lo_el_node TYPE REF TO if_wd_context_element.
      DATA lt_node TYPE wd_this->elements_node.
      DATA ls_node LIKE LINE OF lt_node.
      navigate from <CONTEXT> to <NODE> via lead selection
      lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      get element via lead selection
      lo_el_node = lo_nd_node->get_element(  ).
      get all declared attributes
      lo_nd_node->get_static_attributes_table(
        IMPORTING
          table = lt_node ).
      DATA: lv_index TYPE i.
      lo_el_node = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lo_el_node->get_index( ).
      LOOP AT lt_node INTO ls_node.
        IF sy-tabix = lv_index.
          ls_node-read_only = abap_true.
        ELSE.
          ls_node-read_only = abap_false.
        ENDIF.
        MODIFY lt_node INDEX sy-tabix FROM ls_node TRANSPORTING read_only.
      ENDLOOP.
      CALL METHOD lo_nd_node->bind_table
        EXPORTING
          new_items            = lt_node
          set_initial_elements = abap_true.
    ENDMETHOD.
    Regards
    Manoj Kumar
    Edited by: Manoj Kumar on Feb 17, 2009 1:58 PM

  • How to make Rows editable in ALV

    Hello,
    I show some Records in my ALV and Column PersonalNumber is noneditable.
    and I have created Append Row Button. If I click on this Button, then new added PersonalNumber should
    be editable and old PersonalNumbers should be noneditable. How can we realize that?
    otherwise; How can we make some editable and some noneditable in ALV?
    Thanks!
    with my Best Regards
    Beserithan Malabakan

    Hi,
    Try this code for Editable ALV.
    DATA: LR_COLUMN_SETTINGS TYPE REF TO IF_SALV_WD_COLUMN_SETTINGS,
           LR_INPUT_FIELD TYPE REF TO CL_SALV_WD_UIE_INPUT_FIELD.
      LR_COLUMN_SETTINGS ?= L_VALUE.
      LR_COLUMN = LR_COLUMN_SETTINGS->GET_COLUMN( 'Your Field' ).
      CREATE OBJECT LR_INPUT_FIELD EXPORTING VALUE_FIELDNAME = 'Your Field'.
      LR_COLUMN->SET_CELL_EDITOR( LR_INPUT_FIELD ).
    If any doubts let me know.
    Thanks.
    Edited by: Viji on Feb 28, 2008 12:14 PM

  • How to make rows read only conditionally

    Hi All,
    I have a query region and when i select it shows the data in a table region, now based on a particular column i want to set the entire row read only.
    Please let me know if it is possible.
    Thanks
    Tom.

    Hi All,
    I have finally figured out a way, i have created a SPEL attribute and set it to the read only property to all of the view attributes, and as soon as the query is executed i am filtering the rows based on my column criteria and set the value of the SPEL attribute to true.
    Thanks again.
    Tom.

  • How to make display deletions as ON in iw33 ? by default it will be 'OFF" ?

    hi can u pls help me to find out the exat user-exit to achive this functionality
    iw33
    edit---> display deletions -
    > on

    Exits available
    IW33 SAPLCOIH  IPRM0003        E            EXIT_SAPLCOIH_030
                   IPRM0003        E            EXIT_SAPLCOIH_032
                   IWO10001        E            EXIT_SAPLCOIH_001
                   IWO10002        E            EXIT_SAPLCOIH_002
                   IWO10004        E            EXIT_SAPLCOIH_004
                   IWO10005        E            EXIT_SAPLCOIH_005
                   IWO10006        E            EXIT_SAPLCOIH_006
                   IWO10007        E            EXIT_SAPLCOIH_007
                   IWO10008        E            EXIT_SAPLCOIH_008
                   IWO10009        E            EXIT_SAPLCOIH_009
                   IWO10010        E            EXIT_SAPLCOIH_010
                   IWO10011        C            SAPLCOIH+MSF
                   IWO10012        E            EXIT_SAPLCOIH_012
                   IWO10015        E            EXIT_SAPLCOIH_015
                   IWO10016        E            EXIT_SAPLCOIH_016
                   IWO10017        E            EXIT_SAPLCOIH_017
                   IWO10018        E            EXIT_SAPLCOIH_018
                   IWO10018        E            EXIT_SAPLCOIH_019
                   IWO10018        S            SAPLCOIH1180_CUSTSC
                   IWO10020        E            EXIT_SAPLCOIH_020
                   IWO10021        E            EXIT_SAPLCOIH_021
                   IWO10022        E            EXIT_SAPLCOIH_014
                   IWO10025        E            EXIT_SAPLCOIH_025
                   IWO10026        E            EXIT_SAPLCOIH_026
                   IWO10031        E            EXIT_SAPLCOIH_031
                   IWO10033        E            EXIT_SAPLCOIH_033
                   IWO20001        C            SAPLCOIH+PLS
                   IWO20001        E            EXIT_SAPLCOIH_003

  • How to make row as selected in table

    Hi Team,
    Jdev Version:- 11.1.1.6.0
    I have one table on my jsff page which is made up of List of type Data structure.
    In that i have two columns and i am able to display table with records on page.
    I want to transfer my row selection to other row on click of button.
    Could you please suggest what I need to do for this.
    waiting for your reply.
    Thanks,
    Ramit

    Hi ,
    You can use the navigation controls for the button , for the first record you can use binding.First.execute and for next row binding.Next.execute operations.
    Thanks ,
    Raghav

  • How to make rows editable of a dynamic ALV

    Hi All,
       I'm displaying a dynamic internal table on an ALV.
    The probelm is that some of the rows of that ALV should be editable.
    I checked some of the forums, where I got a clue that I have to update this LVC_S_STYL structure for this requirement.
    I populated this structure also. But still that ALV is coming as non-editable.
    Kindly help me out in resolving this issue.
    Thanks and Regards,
              Abhijeet

    Check this article [Easy Reference to ALV |http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907]. I am sure, you will find the solution here.

  • How to make selected and active a child row of a treeTable?

    Hello,
    I am inserting a new child row into a af:treeTable, disclosing it, but I can't figure out how to make it selected and active so the focus of the user to go on it.
    Jdeveloper version 11.1.2.3.0
    This is how I am inserting the child node:
    public void createLocation(RowIterator ri, Key selectedNodeKey) {
            final String locationCategoryViewDef = "model.views.LocationCategoryView";
            if (ri != null && selectedNodeKey != null) {
                Row[] found = ri.findByKey(selectedNodeKey, 1);
                if (found != null && found.length == 1) {
                    Row foundRow = found[0];
                    String nodeDefname = foundRow.getStructureDef().getDefFullName();
                    RowSet parents = (RowSet)foundRow.getAttribute("LocationView");
                    Row childrow = parents.createRow();
                    //hardcoded locationId
                    childrow.setAttribute("LocationId", 434558);
                    parents.insertRow(childrow);
    }  And this is the treeTable:
    <af:treeTable value="#{bindings.LocationCategoryView2.treeModel}" var="node" varStatus="vaarr"
                  partialTriggers="gaga gag4a ga4a"
                  selectionListener="#{bindings.LocationCategoryView2.treeModel.makeCurrent}"
                  displayRow="selected" rowSelection="single" id="tt1" editingMode="clickToEdit"
                  horizontalGridVisible="true" binding="#{pageFlowScope.treeTableBean.sampleTreeTable}">
        <f:facet name="nodeStamp">
            <af:column id="c5" width="15">
                <af:outputText value="#{node}" inlineStyle="display:none" id="ot1"/>
            </af:column>
        </f:facet>
        <f:facet name="pathStamp">
            <af:inputText value="#{node}" id="ot2"/>
        </f:facet>
        <af:column id="c2" headerText="Location CategoryName">
            <af:inputText value="#{node.LocationCategoryName}" inlineStyle="font-weight:900" id="ot45"/>
        </af:column>
        <af:column id="c6" headerText="Location CATID">
            <af:inputText value="#{node.LocationCategoryId}" inlineStyle="font-weight:900" id="ot6"/>
        </af:column>
        <af:column id="cgg2" headerText="Var INDEx">
            <af:outputText value="#{vaarr.index}"/>
        </af:column>
        <af:column id="c1" headerText="Location Name">
            <af:inputText value="#{node.LocationName}" id="ot3"/>
        </af:column>
        <af:column>
            <af:panelGroupLayout layout="vertical">
                <af:commandLink id="gaga" text="addLocation" inlineStyle="color:red"
                                action="#{pageFlowScope.treeTableBean.createChildren}"
                                rendered="#{node.LocationId == null}" partialSubmit="true"/>
                <af:commandLink id="gag4a" text="delete category" inlineStyle="color:blue"
                                partialSubmit="true" rendered="#{node.LocationId == null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
                <af:commandLink id="ga4a" text="delete location" inlineStyle="color:green"
                                partialSubmit="true" rendered="#{node.LocationId != null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
            </af:panelGroupLayout>
        </af:column>
    </af:treeTable>

    Yes I did now but nothing changes. The current, selected and active row is still the parent node...
    Even I am adding AdfFacesContext.getCurrentInstance().addPartialTarget(this.sampleTreeTable); for just in case..

  • How to DELETE millions of records. How to make it fast.

    Hi
    I need to delete near abt 134 millions of records from tables.
    How to make it faster? any trick , any settings.
    I am using Oracle 9i on Linux box.
    If suppose i use TRUNCATE . does it deletes all objects defined over tables like constraint, indexes etc.
    Thanks,
    Kuldeep

    hi
    SQL> create table te as select * from all_objects;
    Table created.
    SQL> create index te_ind on te ( owner);
    Index created.
    SQL> truncate table te;
    Table truncated.
    SQL> select index_name , status from user_indexes where table_name = 'TE';
    INDEX_NAME                     STATUS
    TE_IND                         VALID
    SQL> create table ti as select * from all_objects;
    Table created.
    SQL> create index ti_ind on ti ( owner);
    Index created.
    SQL> drop table ti;
    Table dropped.
    SQL> select index_name , status from user_indexes where table_name = 'TI';
    no rows selected
    SQL>regards
    Taj

Maybe you are looking for

  • How to change mouse pointer

    I would like enlarge or change the color of the mouse pointer.  Can anyone help

  • Formatting Issue When Switch to Computer Display

    I recently upgraded to a cinema display that I use with dual screen with my MacBook Pro display.  When I unplug it from my MacBook Pro the windows and documents are way too big when transferred to my laptop display.  Is there any way to fix this?  I

  • How to Copy SapBouicom.dll to destination folder

    Hi, I am using .net 2005 to create an installer for the addon. The probem is that sapbouicom.dll files are not getting copied  to the destination folder.Only installer and addon exes are extracted to the destination folder. If the dll files are manua

  • Unix executable file- in backup email files

    Hello, I've searched the discussions and found a few posts that resemble my question but nothing exactly/ nothing suggested has worked so far. I have entire email files backed up to a LaCie drive- 2 actually. All of the email backup icons have been c

  • Incompatibility between iPAD and MAC OS X 10.4.11?

    Hi, Just bought an iPAD yesterday. I was very excited about getting started with it, but when I plugged it into my iMac... the system tells me MAC OSX 10.4.11 does not support iPAD and that I need at least MAC OSX Leopard to be able to connect my iPA