cancel
Showing results for 
Search instead for 
Did you mean: 

Changing property of select options

Former Member
0 Kudos

Hi I have created a select options with the property read only = true by default, If a condition at the beginning is fulfilled I want to change the property read only of the previous field to false. I am doing it in the following way:

DATA lt_range_table TYPE REF TO data.

  • Data from select options

rt_objid = wd_this->m_handler->get_range_table_of_sel_field( i_id = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-grupo_form ).

ASSIGN rt_objid->* TO <fs_objid>.

  • Create range tabl

lt_range_table = wd_this->m_handler->create_range_table( i_typename = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-tipo_d ).

DATA: id TYPE string.

id = zdcl_wdr_matriz_decision_asf=>e_atrib_m_dec_asf-tipo_d.

REPLACE ALL OCCURRENCES OF REGEX '\W' IN id WITH '_'.

IF NOT <fs_objid> IS INITIAL.

  • update property

wd_this->m_handler->upd_selection_field(

i_id = id

it_result = lt_range_table

i_read_only = abap_false ).

ENDIF.

What is wrong here please?

Help really appreciated

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jorge.

Why do you perform the replacement? Are you sure, that the ID you used while adding the field is the same as the one you use for updating? What is the rror or does just nothing happen?

Cheers,

Sascha

Message was edited by:

Sascha Dingeldey

Former Member
0 Kudos

Hi Sascha,

Forget about replacement, it was a thing from my desperated last test case, I have omitted the replacement, and I am using now the same ID that i used in the addition.

The result from this is not a error, it is just that nothing happens, the field still continue disabled.

Thanks for the reply!

Former Member
0 Kudos

Hi Jorge.

Seems to be a bug ... i cant get it work too ...

If just Thomas Szuecs was here .. he has implemented this component so he could bring some light on it ...

Cheers,

Sascha