cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing data across components in wdp ABAP

Former Member
0 Kudos

Hi,

In our application, we need data to be shared across two components. For this, I am setting the context in the interface controller of comp-1, and trying to read it in comp-2. Comp 2 is a used component in comp 1, but this method doesnt work. I also tried using an interface method get_context but the references to the interface controller are different in both components.

Can anyone help me to go about this. Thank you.

Regards,

Nithya

Accepted Solutions (0)

Answers (3)

Answers (3)

Ulli_Hoffmann
Contributor
0 Kudos

Hi Nithya,

in oder to access a component-controller context-node 'A' of comp-1 in comp-2 do the following:

1. Mark 'A' as interface in comp-1

2. Declare usage of comp-1 in comp-2 and define used component comp-1 in component-controller of comp-2

3. Copy and map 'A' in component-controller of comp-2

4. Create component comp-1 in wddoinit() of component-controller of comp-2

5. access of 'A' data through wd_context->get_child_node('A')

Hope that helps.

Ulli

Former Member
0 Kudos

Hi Ashutosh,

The link doesnt work, can you post it again please.

thank you.

former_member185029
Active Contributor
former_member185029
Active Contributor
0 Kudos

hi,

have you tried the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/in">Related Tutorial</a>?

Please follow the steps mentioned in the tutorial and let me know what problem you are facing.

Ashutosh