on 05-19-2009 2:55 PM
Hi,
I get the following error message:
typeconflict at ASSIGN in the Program /1BCWDY/5PPS4JYUPDC7M1SY1DLY==CP .
because
ASSIGN lr_value->* to <wa_numeric>.
method ONACTIONBUTTONPRESS .
DATA lo_nd_calculator TYPE REF TO if_wd_context_node.
DATA lo_el_calculator TYPE REF TO if_wd_context_element.
data lr_value type ref to data.
data l_string type c LENGTH 60.
data: val type string.
lo_nd_calculator = wd_context->get_child_node( name = wd_this->wdctx_calculator ).
lo_el_calculator = lo_nd_calculator->get_element( ).
lr_value = lo_el_calculator->get_attribute_ref( WD_COMP_CONTROLLER->value_help_listener->f4_attribute_info-name ).
FIELD-SYMBOLS <wa_numeric> type numeric.
ASSIGN lr_value->* to <wa_numeric>.
val = wdevent->GET_string( 'ID' ).
CASE val.
WHEN 'BTN_7'.
move <wa_numeric> to l_string.
CONCATENATE l_string `7` into l_string. CONDENSE l_string NO-GAPS.
<wa_numeric> = l_string.
lo_el_calculator->set_attribute(
EXPORTING
value = <wa_numeric>
name = WD_COMP_CONTROLLER->value_help_listener->f4_attribute_info-name ).
ENDCASE.
endmethod.
Do you have an idea why ?
Please note there isn' t any element under the node CALCULATOR in my context.
Is it OK ? If NOT please tell me what kind of element do I need need ?
Regards
ertas
You are getting a data reference to the source context attribute that triggered the value help. It is then being downcast into a field of type NUMERIC. This is a generic type, but still one that restricts what it accepts to being of base type numeric. Since you are getting a type conflict, I would have to assume that the source attribute of your value help is not numeric. Is it perhaps a character or string based attribute? Check to make sure that you are working one of the numeric types.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.