Skip to Content

OVS help to set attribute for different node

Hi All,

I am using OVS help for a field in view,and it is binded to an attribute in view context NODE1  .

In The OVS method for this field, i have to do a calculation and set attribute for another node attribute.

WHEN if_wd_ovs=>co_phase_3.
*   apply result

       IF ovs_callback_object->selection IS NOT BOUND.
******** TODO exception handling
       ENDIF.

       ASSIGN ovs_callback_object->selection->* TO <ls_selection>.
       IF <ls_selection> IS ASSIGNED.

         ovs_callback_object->context_element->set_attribute(
                     name  = `TERM_END`
                     value = lv_term_end ).


i get the error and dump


regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 04, 2014 at 07:00 AM

    Hi Naren,

    As the error message saying that the attribute TERM_END is not available in the context element ovs_callback_object->context_element

    Make sure that the attribute TERM_END is available in the same node to which OVS is called. I think you are trying to set the value to other node's attribute.

    Otherwise, if you want to set the value lv_term_end to an attribute of other node, proceed as below

    data lo_node type ref to if_wd_context_node.

    data lo_element type ref to if_wd_context_element.

    lo_node_type = wd_context->get_child_node( name = "OTHER_NODE" ).

    lo_element = lo_node->get_element( ).

    lo_element->set_attribute(

              exporting

                   name = 'TERM_END'

                   value = lv_term_end ).

    Hope this helps you.

    Regards,

    Rama

                

    Add comment
    10|10000 characters needed characters exceeded