How to clear an alv table

Hello Experts,
                     I have an alv table which displays data on certain search conditions. When I navigate back to the search page I should clear the alv table. I've tried this via clearing the node values but still it's not working.
Thanks,
Sandhya.

Hi Sandhya,
U can try the below procedure:
On click of the back button
1. delete the data from internal table which is binded with the table.
2.Now bind the internal table to the node.
This time u wont get any data.
Thanks...

Similar Messages

  • How to clear data in Table Control.

    hi! all
    How to clear the data in table control.
    i have a Table control which displays column A data from the previous screen and allows to enter column B and column C and i have a button CLEAR, when i click CLEAR button the Data displaying in table control has to be cleared. how to do it.
    Regards,
    Nagulan

    Hi,
    Loop over the internal table of table control & clear data from table control.
    loop at tctab.
    clear tctab.
    modify tctab.
    endloop.
    Best regards,
    Prashant

  • How to create a ALV table

    Hi experts,
    I have to show an ALV table with the list of errors at the end of an operation. I have two separated views for this: one view when I run the operation and, at the end of this operation, I show a button and when I click on this button I can to navigate in a second view where I show the table with the list of errors... How can I do for make this table as an ALV table?
    Tks a lot!

    You can get the changes made by user in the context. To achieve this follow the process:
    1) Enable the context change log in the init method of component controller:
    DATA: z_context TYPE REF TO if_wd_context.
    z_context = wd_context->get_context( ).
    z_context->enable_context_change_log( ).
    Then call following method in the component controller to get the context changes:
    DATA: lt_changes TYPE wdr_context_change_list.
    DATA: z_context TYPE REF TO if_wd_context.
    z_context = wd_context->get_context( ).
    lt_changes = z_context->get_context_change_log( ).
    You will get all context changes in the table lt_changes.
    Compare these values with the values before context change.
    2) You can also get the changed cells using event 'on_data_check' of ALV.
    Refer following link for more help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/frameset.htm
    I hope this will help.
    Regards,
    Saket.

  • How to clear dhcp clients table

    Does anyone know how to clear the DHCP Clients Table?
    I have a WRV54G.
    Regards
    Solved!
    Go to Solution.

    I understand this is a very old post, but since I found it when I was looking for the same answer in 2009, I thought I would go ahead and give my $.02 worth.
    I have a different router, so this may not be present in yours.
    I use a  WRT54GLwith firmware version 4.30.7 and finally found on the Status page under "Local Network" a link to the DHCP table. You can click on that and delete the existing IPs.

  • How to clear data from Table-Control

    Hi all,
    I am working on table control. I have some data on the table control.
    When I press the 'Cancel' button, I require that the table-control should be cleared.
    I tried using REFRESH CONTROL TC01 USING SCREEN 1001. But, the data doesn't get cleared.
    Please advise.
    Regards,
    Saurabh Buksh.

    hi
    good
    try this example
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
          lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
          TABLES demo_conn.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES lines.
      flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
            ENDIF.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols
                                  WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    ENDMODULE.
    thanks
    mrutyun^

  • How to clear the DHCP table

    BT HomeHub 2 (black one with blue/orange flashing lights)
    Is there any simple way of clearing out the entire DHCP table and starting again?
    I use Virtual Machines (VM) a lot and every time I use them from the laptop/desktop, the homehub DHCP adds it as a new wired connection.  When I look at the DHCP table, it has
    lots of entries with the same machine name and mac address even though the retention period is set to 3 days.
    lots of entries of VMs which I haven't used for ages but for some odd reason, their leases get renewed.
    entries of machines which were last connected last Christmas but again, their lease has been renewed
    lots of expired entries (if it has expired, why keep on to it?)
    My guess is that the wireless sometimes fails to connect because all the entries in the DHCP table have been used and it cannot find a free one.
    Problems
    When I click on any of the dead entries, the homehub goes into reset mode.  I don't mind going through the entire table one at a time but not if it is going to reset.  Also there are almost 50 entries with the same MAC and machine name.  Quite difficult to remember which one you got to if they cannot be cleared down
    If I do a reset, it still remembers all the entries. 
    If I disable DHCP and reenable it, it still remembers all the entires
    I haven't tried changing the DHCP address range yet
    Is there any simple way of clearing out the entire DHCP table?

    cup wrote:
    BT HomeHub 2 (black one with blue/orange flashing lights)
    Is there any simple way of clearing out the entire DHCP table and starting again?
    I use Virtual Machines (VM) a lot and every time I use them from the laptop/desktop, the homehub DHCP adds it as a new wired connection.  When I look at the DHCP table, it has
    lots of entries with the same machine name and mac address even though the retention period is set to 3 days.
    lots of entries of VMs which I haven't used for ages but for some odd reason, their leases get renewed.
    entries of machines which were last connected last Christmas but again, their lease has been renewed
    lots of expired entries (if it has expired, why keep on to it?)
    My guess is that the wireless sometimes fails to connect because all the entries in the DHCP table have been used and it cannot find a free one.
    Problems
    When I click on any of the dead entries, the homehub goes into reset mode.  I don't mind going through the entire table one at a time but not if it is going to reset.  Also there are almost 50 entries with the same MAC and machine name.  Quite difficult to remember which one you got to if they cannot be cleared down
    If I do a reset, it still remembers all the entries. 
    If I disable DHCP and reenable it, it still remembers all the entires
    I haven't tried changing the DHCP address range yet
    Is there any simple way of clearing out the entire DHCP table?
    AFAIK, the answer is no, have you tried setting the IP to dynamic when your VM's connect? i.e. always use the same ip address, or can you assign a static ip to a VM....I'm fumbling in the dark here because I don't know enough about using VM's. 

  • How to delete a particular row in ALV table

    Hi,
    How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
    Thanks
    Bala Duvvuri

    Hello Bala,
    Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
    data : lr_table_settings  TYPE REF TO if_salv_wd_table_settings,
                 lr_config          TYPE REF TO cl_salv_wd_config_table.
      lr_table_settings  ?= lr_config.
    ** Setting the ALV selection to multiple selection with no lead selection
      lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
    Next delete the selected rows in the action triggered by the button:
    METHOD onactiondelete_rows .
      DATA:  wd_node TYPE REF TO if_wd_context_node,
             lt_node1 TYPE ig_componentcontroller=>elements_node,
             wa_temp  TYPE REF TO if_wd_context_element,
             lt_temp  TYPE wdr_context_element_set,
             row_number TYPE i VALUE 0.
      wd_node = wd_context->get_child_node( name = 'NODE' ).
      CALL METHOD wd_node->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        wd_node->remove_element( EXPORTING element = wa_temp ).
      ENDLOOP.
      CALL METHOD wd_node->get_static_attributes_table
        EXPORTING
          from  = 1
          to    = 2147483647
        IMPORTING
          table = lt_node1.
      wd_node->bind_table( new_items = lt_node1 ).
    ENDMETHOD.
    If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
    Regards,
    Uday

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • How to clear UNB table in the payroll result?

    Hi,
    We are getting the payroll error- The gross wages do not cover the negative offset that has been forwarded. Therefore, no gross up is permitted while running the Grossup.
    I see the below table "UNB table" in the last payroll result. "UNB - Unbalance table used for tax retrocalculation" .
    I think we are getting the above error because of this UNB table, can anyone help me to how to clear this table?
    When we run the regular payroll, no tax is being deducted.
    Please help
    Saurabh

    Hi Arti,
    Thanks for your reply!!..
    Seeing your reply, it gives me bit confidence to crack the existing problem, however, I'm still not clear with your answer... let me explain you the problem-
    1. Employee was given 350,000 though Taxable Bonus WT with regular pay check
    2. Later it came to know- out of the above amount, 75000 was Grossup amount
    3. So in next payroll run, they entered -75000/- in regular Taxable bonus WT and +75000 in Grossup WT and also they deleted one IT210 record of GA tax authority which was wrongly created; and ran the payroll
    4. Since then, in next payroll period- No tax is being deducted, so we are creating IT221 infotypes with Tax wagetype
    5. If we are running the Grossup wage, payroll error- The gross wages do not cover the negative offset that has been forwarded; therefore, no grossup is permitted.
    While running the regular payroll, overpayment Wagetype is being generated.
    Now, I saw this UNB table is created and the below wagetype are there in the UNB table-
    WT /5UT amount 0.00
    WT 5430 amount -75000
    WT 0200 amount 12500 ( Monthly salary)
    WT 4530 amount 350000
    Now I am thinking, if we are deducting tax through IT221,if we clear this UNB table, our problem might get resolved
    It will be a great help for me if you can tell-
    1. how to check, claims process is implemented or not?
    2. I have good HCM experiece but this claims process is very new to me- pls guide me how to do that
    Waiting for your reply, thanks in advance
    Saurabh Garg

  • UI Element : MessageArea : How to I show a ALV table instead of messages

    UI Element : MessageArea : How to I show a ALV table (Message Log) instead of all the messages.

    Hi,
    Create a View Container UI Element at the bottom of the View and Embed ALV into it. Catch the Errors and populate into ALV instead of report message.
    hope  this helps u.,
    Thanks & Regards,
    Kiran

  • How To Edit Selected Row In ALV Table

    Hello Experts,
    In My Webdynpro Application, I am displaying records from database table into an ALV Table.
    I want to edit only selected record from  ALV table.
    Please Suggest How to achieve this.
    Thanks,
    Pratibha

    The link given above is for the UI element 'Table' and does not pertain to ALV.
    To Make an ALV Editable on lead selection for that particular lead selected row.
    1. The ALV should be made lead selectable, when initializing
    2. The ON_LEAD_SELECT function should be invoked.
    3. Withing this function the index has to be retrieved to know which row was selected.
    4. Based on the index retrived all the columns have to pass FALSE to read_only in the column properties.
    Regards,
    Pramod

  • How to process Line Selection on ALV Table in ABAP WebDynpro

    Hi there,
    I have a view with an ALV table whose context node retrieves its data from a Service Call for a method.
    The method provides certain data of a database table which the ALV displays.
    Now I would like to be able to select one row of that ALV table and after pressing a button or doubleclicking on the row or whatever a different view (as for me it is also ok on the same view) should appear to display the details of that selection.
    I only need to know how to retrieve the selected data.
    Or its index within the internal table.
    I am already looking for hours for a useful thread and actually there is one which obviously is about a similar issue apart from the multiple selection part: 
    How to process multiple row selection in ALV table in Wendynpro ABAP? Help!
    but i am afraid that i don't understand it. Or at least I misunderstand it since it does not work with me.
    The system example mentioned in the thread does not help me either because it somehow does not correspond to my needs, does it?
    It would be GREAT if somebody could help me with that. Please keep it simple for I am not an expert in webdynpro yet (obviously ^^) and also please explain in detail what I have to do with the context nodes since I am not sure whether the selection is stored in my already existing node or whether I need a special one for that.
    Thanks!!
    christina

    Hi Christina,
    If you just want to get one column data of the line that user clicked, use the Web Dynpro Code Wizard to Read Context of attibute you needed, then you will get code as follow:
    * Define data for read attribute
        node_alv TYPE REF TO if_wd_context_node,
        elem_alv TYPE REF TO if_wd_context_element,
        stru_alv TYPE if_view_display=>element_alv ,
        item_column_name  LIKE stru_alv-column_name.
    * navigate from <CONTEXT> to <ALV> via lead selection
      node_alv = wd_context->get_child_node( name = if_view_display=>wdctx_alv ).
    * get element via lead selection
      elem_alv = node_alv->get_element(  ).
    * get single attribute
      elem_alv->get_attribute(
        EXPORTING
          name =  `COLUMN_NAME'
        IMPORTING
          value = item_column_name ).
    The value of column_name is stored in item_column_name.
    If you need the index that the user clicked, try this:
    * Definition of field symbol for index
      FIELD-SYMBOLS : <fs_index> TYPE data.
    * Get the selected index
      ASSIGN r_param->index->* TO <fs_index>.
    The index of clicked line is stored in field symbol <fs_index>.
    Hope it will help.
    Best Regards,
    Stephanie

  • How to remove a column from alv table

    Hi All
    How to remove a specific column from alv table.?
    Thanks & Regards
    SUN

    For delete u can follow the above post..
    Fo making invisible :
    data m_col type ref to cl_salv_wd_column.
    m_col = alv_mode->IF_SALV_WD_COLUMN_SETTINGS->GET_COLUMN (' col1' ).
    m_col->SET_VISIBILITY( '01'  ).

  • How can I change column name in ALV table in WebDynpro ABAP?

    Hi Everyone,
    I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
    Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
    Please let me know how can I change the name of the column.
    Regards

    Hi,
    This may help you to define your own column text in the ALV Table of webdynpro.
    see the below code.
    Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
    "change the label of the report.
    DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
    CALL METHOD l_value->if_salv_wd_column_settings~get_column
    EXPORTING
    id = 'STATUS_ICON'
    RECEIVING
    value = lr_weeknum.
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    regarads,
    balu

  • How to handle marked rows in an ALV table

    Hi Experts,
    there is an ALV table in my Web Dynpro. It has a functionality to handle one marked row via lead selection. This is the coding to get the marked row:
    lr_nd_ma_leist = wd_context->get_child_node( name = wd_this->wdctx_tab_ma_leist ).
    lr_el_ma_leist = lr_nd_ma_leist->get_lead_selection( ).
    idx = lr_el_ma_leist->get_index( ).
    My problem is to handle more than one marked row. I changed the contexts' properties to allow to mark more than one row. But how can I get the number and the index of all the marked rows?
    Thanks in advance,
    Tan

    use the method get_element_selected( ) and get_index( ).
    data sel type WDR_CONTEXT_ELEMENT_SET.
    sel = lo_nd_zdealer->get_selected_elements( INCLUDING_LEAD_SELECTION = abap_true ).
    data el type ref to if_wd_context_element.
    data indx type  i.
    loop at sel into el.
      indx = el->get_index( ).
      endloop.
    thanks
    sarbjeet singh

Maybe you are looking for