Hi experts
I have a mapped node in my view context from component controller context. This node consists of 2 value attributes inside
Example:
NODE1 -
> Cardinality 1..1, seleciton 1..1
-- x_date -
> type DATS
-- x_years -
> dec3
How do I get the attribute value attr1 and attr2 ??
Here is my code in my view method
DATA: lr_node_info TYPE REF TO if_wd_context_node_info,
l_date TYPE dats,
l_xyears TYPE i.
lr_node_info = wd_context->get_node_info( ).
lr_node_info = lr_node_info->get_child_node('NODE1').
l_date = lr_node_info->get_attribute( name = 'X_DATE' ).
l_xyears = lr_node_info->get_attribute( name = 'X_YEARS' ).
It does not seems to work since it says < the result type of the function method can not be converted into the result type L_DATE>
I try to understand why but not sucessful, please help and thank you for your kindness