cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro

Former Member
0 Kudos

Hi,

iam new to the webdynpro, i want to know how the values are passing to the attribute of the node in context...

here i tried a simple code....

data : node_mainview type ref to if_wd_context_node.

data : view1 type ref to if_wd_view.

node_mainview = wd_context->get_child_node( `MAINVIEW` ).

node_mainview->GET_ATTRIBUTE( EXPORTING NAME = 'NAME'

IMPORTING VALUE = VIEW1 ).

here mainview is my node in context and it has a field name..here iam trying to get the value from name and iam passing to view1..bt here it is not passing..so what may be the problem and how to solve it....

regards,

dhaya.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member189058
Active Contributor
0 Kudos

Hi Dhanya,

Where have you creaeted MAINVIEW? is it in the view context or component contoller context?

If you need to pass values between two view you need to have that value in the component controller context. Note that context between two views is not shared.

It is better to go through the tutorials and sample applications.

regards,

Reema Shahbazkar.

Former Member
0 Kudos

I can tell you few like WDR_TEST_EVENTS ( It shows how every UI elments to use )

See packages like SWDP_DEMO , SALV_WD_DEMO

there are many more .

/people/marilyn.pratt/blog/2005/12/20/web-dynpro-for-abap

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a282c952-0801-0010-1eb5-87953e03...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a09...

Former Member
0 Kudos

The values need to be explicitly "bound" to the context node via your code. Before doing a get_attribute, you should be doing a set_attribute.

There are methods in the interface if_wd_context_node and if_wd_context_element to set the values in context nodes and elements. Check out the methods node->bind_table, node->bind_elements, node->bind_structure etc.

Have a look at demo examples in the package swdp_demo and also the [SDN Wiki for Web Dynpro|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdabap/main].

Regards,

Nithya