cancel
Showing results for 
Search instead for 
Did you mean: 

How to read an attribute value if it doesn't belong to a node

former_member295881
Contributor
0 Kudos

Hello Experts,

I'm new to Webdynpro and trying to find out how I can read value of a attribute which is not a part of any node (refer to the attachment for attribute details). I know how to read values of attribute if they're within a node as shown below.

data: l_node      type ref to IF_WD_CONTEXT_NODE,

      l_element   type ref to IF_WD_CONTEXT_ELEMENT,

      l_my_string type string.

     l_node = wd_context->get_child_node( wd_this->wdctx_node_1 ).

     l_element  = l_node->get_element( ).

     l_element->get_attribute

      ( exporting name = 'ATTR1_1'

        importing value = l_my_string ).

Can somebody please show me how I can get value of attribute 'GROUP' as shown in attachment.

Many thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Easiest  way is click on the Webdynpro Code Wizard and go to CONTEXT tab in that and then select the READ radio button and then click on the CONTEXT button and then select the GROUP attribute there and click on enter that will get the code how to read that attribute.

Hope this helps you to start.

Phani

former_member295881
Contributor
0 Kudos

Awesome Phani. Many thanks for your help.

Former Member
0 Kudos

You are welcome

Answers (0)