cancel
Showing results for 
Search instead for 
Did you mean: 

Modify dynamically created attributes.

Former Member
0 Kudos

Hi,

I have created dynamically many check boxes based on a sql query result.

I have created also a dynamic node with many attributes to make the binding to my check_boxes.

I want know to acces my check_boxes to perform action : check, uncheck ...

how can i proceed?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

gill367
Active Contributor
0 Kudos

you can get or set the attribute using

get_Attirbute and set_Attribute

are you facing any problem in doing that.

thanks

sarbjeet singh

Former Member
0 Kudos

yes.

i dont know the number of my attributes.

It depends on my query results.

i want to perfom something such:

loop at my_node_attributes.

set_attribute ( name = attribut_i value = abap_false).

endloop.

is it possible?

Former Member
0 Kudos

Hi ,

try getting the IF_WD_CONTEXT_NODE_INFO instance for the node.

DATA : lo_node_info TYPE REF TO IF_WD_CONTEXT_NODE_INFO.

my_node->GET_NODE_INFO().

IF_WD_CONTEXT_NODE_INFO has a method GET_ATTRIBUTES().

Which returns a table of type WDR_CONTEXT_ATTR_INFO_MAP.

The line type of this table is WDR_CONTEXT_ATTRIBUTE_INFO.

This structure has fields like name and all the properties of the attribute.

Check if this method could help you out.

Although I cannot guarantee if this method works for dynamic nodes and attributes.

But worth a try.

Thanks,

Aditya.

gill367
Active Contributor
0 Kudos

Yeah as pointed int he above post

node_info is the way to go.

use it and get all the attributes by using the method GET_ATTRIBUTES

It will give you a table of attribute info

which has a property called name.

use it and fetch all the attributes.

i guess it should work.

thanks

sarbjeet singh