cancel
Showing results for 
Search instead for 
Did you mean: 

how to access the attribute of child node

Former Member
0 Kudos

Uday,

now i have changed my coding as

lr_node_contacts = wd_context->path_get_node( 'CUSTOMER.CONTACTS' ).

lr_node_contacts->set_attribute( exporting name = 'EMAIL_ID'
                                                value = 'siva.palaniswamy' ).

and trying to bind its value to another table using following code

node->Bind_table( new_items = lr_node_contacts ).

But am getting the syntax error as

LR_NODE_CONTACTS is not compatible with NEW_ITEMS ,,,

thanks,

Siva

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks to all

uday_gubbala2
Active Contributor
0 Kudos

Hi Siva,

When you say bind_table( ) you need to pass the internal table with which you want to bind the context node with. You were above trying to pass the reference of the node instead. Thats the reason for the problem.

So if you want to bind to CONTACTS you should have an internal table like:

data: lt_contacts type ig_componentcontroller=>elements_contacts.

You can then say like:

lr_node_contacts->bind_table( new_items = lt_contacts ).

I guess that you are a beginner trying to learn WebDynpro. Do go through the [document link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60730016-dbba-2a10-8f96-9754a865b814] which I had sent you to get an idea about working with context nodes and attributes.

Regards,

Uday

Former Member
0 Kudos

Hi Shiva,

lr_node_contacts is refernce to node context.It is not an internal table thats why you are getting error.

try to bind the internal table to node.