cancel
Showing results for 
Search instead for 
Did you mean: 

Get the value from another component

Former Member
0 Kudos

Hi Experts,

I having a typical problem of passing values from one component to another one , I have tried several approaches but failed to meet the required scenario. Please help me regarding this.

I have a component where based on some criteria i m getting some values. I want those values in some other component.

1. In the COMP1->VIEW1 i m getting value of node A_TYPE ( cardinality 0..1 ) dynamically ( i.e. base on user selection ).

This has only one attribute AIR_NO.

Now from in that COMP1->VIEW1 i m firing the out bound plug to VIEW2. I have embedded the second componet in a view container ui element of COMP1-VIEW2 .

Now i want the value in COMP2->VIEW1.

A> I have created a interface method in COMP1-> COMPCONTROLLER and there i have created one export parameter of type AIR_NO.

When i am calling the method from COMP2->COMPCONTROLLER its is getting the value of attribute AIR_NO if the value is hard coded in the interface methhod. i.e. from debugger i have checked that in COMP2 when i m calling the interface method then its going back to COMP1. As it directly going to the particular method so there it is unable to set any value of AIR_NO from any variable. Therefor i m unable to get the value.

B>- I am unable to send any value through interface node. I have declared the A_TYPE as interface node. Then in COMP1->VIEW1 in any method i m setting the value of this node . Then i calling the outbound plug.

In COMP2 i have declared the COMP1 in comp use , then COMPCONTROLLER i copied and mapped the interface node A_TYPE. After that i m calling the node from any method but unable to get the value set in the first component.

I tried many other scenario like sending the value through window url or by passing it through inbound plug and outbound plug but those scenario are not best fitted in the context. It will be very easy if i can simply pass the value value through interface node to another component .Might it can be like i m missing something very important.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Monishankar,

i trust that you have tried many solutions. Probably this one is not tried yet.

Use a assistance class or Use a Singleton OO class to transfer data between cross component.

You can define a attribute of type if_wd_context_node and assign reference from your actual node from comp-1->view1

read this node from comp2->view1.

i suggest to use a singleton OO class which gives you a freedom of using two different assistance classes between the components (if applicable of course).

Former Member
0 Kudos

Hi Baskaran Senthi ,

Thanks for your reply. I got a new way to implement this.

At the same time i also able solve my problem. IIts having some issue while mapping the data with interface node.