on 10-05-2011 10:55 AM
Hi Experts,
I have created one selection screen using component SELECT_OPTIONS. As we can not create radio button using this component, I have created radio button on view layout using radiobuttongroup. Now I need to disable one selection field on selecting one radiobutton and want to disable anothe selection field on selecting another radio button.
I have written code on selection of radiobutton as below:
items_node = wd_context->get_child_node( name = `RG` ).
items_node->get_static_attributes_table( importing table = itemlist ).
v_index = items_node->get_lead_selection_index( ).
clear w_list.
read table itemlist into w_list index v_index.
if w_list-text = 'Customer Number'.
wd_this->lo_r_helper_class->upd_selection_field( i_id = 'CUST_CAT'
i_read_only = abap_true ).
elseif w_list-text = 'Customer Category'.
wd_this->lo_r_helper_class->upd_selection_field( i_id = 'KUNNR'
i_read_only = abap_true ).So now when i execute my application and try to change the radiobutton it gives me a dump with following message.
The following error text was processed in the system EU0 : Dereferencing of the NULL reference
Can anybody please guide me what could be the reason.
Thanks in advance.
Rgds,
Varun.
Hello Varun,
In TCODE ST22, you can get the exact line where the dump has occured (via Source Code option). From the text it seems that you are trying the assign the value of a DATA object which is initial. I think it will be probably in the lo_r_helper_class->upd_selection_field() method. check it out
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have checked in debugger. Control is failing on below code the bold line. Not sure why is it so.
if <field>-m_dont_care_value is bound.
lr_dont_care_value = <field>-m_dont_care_value.
else.
create data lr_dont_care_value type handle <field>-m_value_field_rtti.
endif.
assign lr_dont_care_value->* to <dont_care_value>.
Please do the needful.
Thanks,
V-
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.