Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8635

Re: Refresh ALV Table columns

$
0
0

Hi Santhosh,

 

You can achieve your requirement as below

  • set alv table settings as below ( here lo_model is reference to alv model )

 

  lo_model->if_salv_wd_table_settings~set_cell_action_event_enabled(

abap_true ).

  lo_model->if_salv_wd_table_settings~set_read_only( abap_false ).

 

  • Create an event handler in view for action 'ON_CELL_ACTION" of alv as below

     alv.PNG

  • Add the below code in event handler

  DATA lo_node    TYPE REF TO if_wd_context_node.
  DATA lo_el      TYPE REF TO if_wd_context_element.

  " Nothing to do if column name is not "COLUMN1'
  IF r_param->column NE 'COLUMN1'.
    RETURN.
  ENDIF.

  lo_node = wd_context->get_child_node( name = wd_this->wdctx_table )." replace with your node name

 

  "Get the element based on current index
  lo_el = lo_node->get_element( index = r_param->index ).


  IF lo_el IS BOUND.

    "first name
    lo_el->set_attribute(
      EXPORTING
        value = space    "clear value
        name  = 'FIRST_NAME'  "replace it with your ctx attr name
    ).

    "last name
    lo_el->set_attribute(
      EXPORTING
        value = space    "clear value
        name  = 'LAST_NAME' "replace it with your ctx attr name
    ).

  ENDIF.


Viewing all articles
Browse latest Browse all 8635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>