cancel
Showing results for 
Search instead for 
Did you mean: 

Return Button pressed in UI Table to change value WD

Former Member
0 Kudos

Hello Experts

I have a UI-Table in WD

My question is :

If I change one value and press the Return button the new value should be accepted

The dependent Column should be also changed.

Please example coding if possible

Return->change value -> change dependent value in other column too

Return->change Matnr -> set the short text of the new material in the other column

Thanks

Annette Bruy

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello experts

but if i had the elements/ values not in the current line it doesnt work.

Even if I press return

best regards

Former Member
0 Kudos

Hi

Create a new method for onEnter event for material number cell in the table. The below code will hellp you.


    DATA lv_matnr TYPE wd_this->element_material-matnr.
    DATA lv_maktx TYPE wd_this->element_material-maktx.

    context_element->get_attribute(
      EXPORTING
        name =  `MATNR`
      IMPORTING
        value = lv_matnr ).

  SELECT SINGLE maktx FROM makt into lv_maktx WHERE spras = sy-langu
    AND matnr = lv_matnr.

* set single attribute
  context_element->set_attribute(
    name =  `MAKTX`
    value = lv_maktx ).