cancel
Showing results for 
Search instead for 
Did you mean: 

How to Share data between two component usages

alejiandro_sensejl
Active Participant
0 Kudos

Hello everyone,

I have a main component (C0) which embeds a component with select options (C1) and another component with an ALV list and a detail screen (C2) (and some other componets).

C0 has declared usages of C1 and C2. How can I forward the selection criteria from component C1 to component C2?

Any ideas?

Thanks in advance and best regards,

Alej

Accepted Solutions (1)

Accepted Solutions (1)

alejiandro_sensejl
Active Participant
0 Kudos

Hello,

unfortunately it looks like the solution both of you suggested isn't working...

1.) I've flagged the context node in the component controller of Comp1 as "Interface Node".

2.) I've flagged the context node in the component controller of Comp2 as "Interface Node" and "Input Element (Ext.)".

(Both nodes use the same dictonary structure)

3.) In my main component I've declared a mapping between the nodes in the Interface Controller Usage ("USAGE_ORDER_SEL") of Comp2.

When starting my application I get a runtime error UNCAUGHT_EXCEPTION / CX_WD_CONTEXT_MAPPING stating "Component Usage USAGE_ORDER_SEL Specified in the Mapping Is Unknown".

It looks like the runtime environment tries to validate the mapping of Comp2 although Comp1 isn't initialized yet.

Any suggestions?

Regards,

Alej

Former Member
0 Kudos

Hi,

Take a node in main component and map the interface nodes of comp1 and comp2 to this node.

alejiandro_sensejl
Active Participant
0 Kudos

Hi harshith,

I would have preferred to avoid the additional node in the main component and map the selection criteria directly between the usages, but I've tried it like you suggested and it works!

Thanks,

Alej

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can use interface nodes to share data between two components and map the nodes.it will help you for sure

Karthik.R

Former Member
0 Kudos

Hi,

You can use interface nodes to pass data between different components. Suuppose you want the selection

Criteria of comp1 in comp2 where comp1 and comp2 are usages in main comp, You can use interface nodes

in comp1 and comp2 and map these nodes to main component and pass data from one component to another.