cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass data using interface node between two components using component usage???

0 Kudos


Hi Team,

I am trying to pass the data between two components Comp A and Component B using interface node.

here is the steps i am doing...

1) I had created two components Comp A and Comp B.

2) I had created Interface node with cardinality 0..1 and added attribute PERNR inside node and binded same to view level to input field in Comp A.

3) I had created component usage in Comp B and mentioned Comp A as used component.

4) i had mapped the interface node using interface controller and same is reflecting to my component controller context of Comp B.

5) i coded inside WDDOINIT and trying to read the data of interface node using code wizard the PERNR value of Interface node in Component B and used method INSTANTIATE used component and method call in used controller but unfortunaletly not getting the pernr value in Comp B whereas the same value i am getting inside Comp A's different method.

Do i need to check the INPUT ELEMENT(Extn.)??? if i am checking it i am getting dump stating the mapping of main component for interface node is not completed.

Please help in this issue.

Thanks

Shehzad.

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Shehzad,

I think you are trying to read context node of comp a inside comp B in WDDOINIT( ). Here, you will not get data of comp A. Because comp B instantiates first and then comp usage comp A gets loaded. So, first WDDOINIT of comp B executes and then comp A methods.

When you set INPUT ELEMENT(Ext.) to context node of comp A, that means that it can never accepts any data inside comp A, But it accepts data from other components where external mapping is defined.

So, you should never set data to context node in comp A, but can set it in comp B.

Hope this helps you.

Regards,

Rama

0 Kudos


thanks for ur reply rama, But i have a requirement to pass data from COMP A to COMP B...is der any way out i can achive this......wht i am doing is i have created a input field on View of COMP A and binded it with PERNR attrubute of interface node with cardinality 0..1 and need this Input field entered value in view of COMP A to  COMP B's method.

Please revert if we can achive this.

Former Member
0 Kudos

Hi,

Create a similar Interface Node in COMP-B & then in COMP-A, declare usage of used controller B in Component Controller A & map the two nodes. so data flows automatically between the node of Comp-A to Component B & vice-versa. This should definitely provide resolution to your issue.

Thanks

KH

ramakrishnappa
Active Contributor
0 Kudos

Hi,

To achieve your requirement proceed as below

  • Let us say you have an input field in comp A and its bound to attribute PERNR of interface node ND_INPUT
  • Now, you use the comp A inside comp B as component usage
  • Go to component controller of comp B and map context node ND_INPUT from interface controller to comp B's context i.e. external context mapping
  • Now, you can directly read the context node from component controller of comp B whenever required, as data flows from comp A to comp B vice-versa

Regards,

Rama