Code: Alles auswählen.
METHOD onactionedit .
DATA: lr_node TYPE REF TO if_wd_context_node,
lt_elements TYPE wdr_context_element_set,
ls_elements LIKE LINE OF lt_elements,
ls_data TYPE wd_this->element_marketing_attributes,
lt_attr_names TYPE string_table,
ls_attr_name LIKE LINE OF lt_attr_names.
FIELD-SYMBOLS: <fs_value> TYPE any.
lr_node = wd_context->get_child_node( name = wd_this->wdctx_marketing_attributes ).
lt_elements = lr_node->get_selected_elements( ).
"get the attributes list
lt_attr_names = lr_node->get_node_info( )->get_attribute_names( ).
LOOP AT lt_elements INTO ls_elements.
ls_elements->get_static_attributes( IMPORTING static_attributes = ls_data ).
LOOP AT lt_attr_names INTO ls_attr_name.
UNASSIGN <fs_value>.
ASSIGN COMPONENT ls_attr_name OF STRUCTURE ls_data TO <fs_value>.
IF <fs_value> IS NOT INITIAL.
ls_elements->set_attribute_property( EXPORTING attribute_name = ls_attr_name
property = if_wd_context_element=>e_property-read_only
value = abap_false ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDMETHOD.