on 06-26-2012 11:18 AM
Hi All,
I am creating an application with 2 components by referring to this thread : http://scn.sap.com/thread/1393140
I wanted to pass data from Component 1 to Component 2 using Interface controller Node of Component 1.
However i am not able to pass data from Component 1 to 2.
Parent Component's Node declared as an interface node
Node's attribute with Default Value:
Child Component
In Parent View I have embedded Child Component's Interface View to show the values passed from Parent Component to Child.
When i am trying to pass data from Parent Component to Child Component , Child Component is able to read the default value.
However when some input is changed in parent component , that does not pass to Child Component:
Please help in passing data from parent Component to Child Component via Interface Controller node of Parent Component.
Regards,
Ashish Shah
Hi Ashish Shah,
To pass the data between the component:
Things to be done in Comp 1:
1. Define the node as inferface node in the comp1
2. Pass data to the node ( in the component 1)
Things to be done in Comp 2:
3. Define used component( Comp 1 ) in the using component( Comp 2 ).
In the component main page you will find a tab Used component. define reuse under component Use and name of the component ( Comp1 ) under component column.
4. Go to component controller
Click on the controller usage and select the comp 1 from the displayed pop up
5. interface node of comp1 will be available. define External context mapping. drag and drop the node from comp1 context to comp 2 context.
6. Now Go to required view and define internal context mapping. i.e., Drag and drop the node from component controller context of comp2 to view context of comp2.
7. now the data should be available.
Note: The data will can be accessed only if you are calling the component 2 in the same session.
if you are calling the view of comp 2 in the new session( new window or external window ) then the data gets lost.
if you are calling the comp 2 in the new window, then the parameters should be passed through the URL.
Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shankar,
Interface View of Component 2 is embaded in the Window of Component 1.
And i am trying to view the data in the application created in Parent Component. So i am expecting the data in the same session.
Still i am not getting the data in Component 2.
Do you have any other suggestion?
Regards,
Ashish Shah
I have followed exactly same steps already, you can see it in my snapshots in first post.
Attached is the nugget file of these two components (you will need to change extention of this file from "txt" to "nugg" before importing using SAP link),
can you try in your system and tell me if it works correctly.
Regards,
Ashish Shah
in Show Child View action, just read the NAME attribute and again immediately set.
ex. lo_element->get_attribute(
exporting
name = 'NAME'
importing
value = lv_name ).
lo_element->set_attribute(
exporting
name = 'name'
value = lv_name ).
two steps are mandatory. check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chengalarayulu,
I tried your suggestion , still no luck .
Still in the child component , i am not getting data passed from Parent component.
I can share nugget file with you , you can also check in your system.
This is my ABAP Server version, if this info helps to identify the problem.
SAP_BASIS 701 0007 SAPKB70107 SAP Basis Component
Regards,
Ashish Shah
Any Comments / Suggestions guys?
Regards,
Ashish Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.