Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

webdynpro

Former Member
0 Likes
351

Hi,

I am trying to develop a dynpro application and i have written some code in it .when i try to activate it its giving me an error. I am giving code and error below.

The code is:

method WDDOINIT .

data:v_element type ref to if_wd_context_element,

Items_node type ref to If_wd_context_node,

v_Index type I,

v_Text type STRING,

itemlist type standard table of if_mainview=>element_radiogroup,

w_list like line of itemlist.

*Appending items to itemlist

w_list-ebeln = 'Blue'.

append w_list to itemlist.

w_list-ebeln = 'yellow'.

append w_list to itemlist.

w_list-ebeln = 'red'.

append w_list to itemlist.

w_list-ebeln = 'magenta'.

append w_list to itemlist.

w_list-ebeln = 'White'.

append w_list to itemlist.

w_list-ebeln = 'Black'.

append w_list to itemlist.

Items_node = wd_context->get_child_node( NAME = 'RADIOGROUP').

Items_node->bind_table( itemlist ).

Items_node->SET_LEAD_SELECTION_INDEX( 3 ).

V_Index = Items_node->GET_LEAD_SELECTION_INDEX( ).

CLEAR W_LIST.

READ TABLE ITEMLIST INTO W_LIST INDEX V_INDEX.

V_TEXT = W_LIST-EBELN

Wd_Context->Set_Attribute( exporting value = v_Text Name = 'VIEWTEXT' ).

endmethod.

The Error is :

Incorrect Airthmetic or bit expression. Instead of

Wd_Context->SET_ATTRIBUTE(", an operator (+,-,*,/,....or BIT-AND, BIT-XOR, BIT-OR) was expected.

Thanks for the help.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
328

You are missing the period(.) in this first statement.

V_TEXT = W_LIST-EBELN .  <<---- Add the period here
Wd_Context->Set_Attribute( exporting value = v_Text Name = 'VIEWTEXT' ).

Regards,

Rich Heilman

1 REPLY 1
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
329

You are missing the period(.) in this first statement.

V_TEXT = W_LIST-EBELN .  <<---- Add the period here
Wd_Context->Set_Attribute( exporting value = v_Text Name = 'VIEWTEXT' ).

Regards,

Rich Heilman