on 08-26-2011 9:43 AM
Hi All,
I have done below steps:
1. Created WD coponent ZFPM1 (using implemented interface - IF_FPM_UI_BUILDING_BLOCK).
2. In component controller I have created noe "NODE1" with one attribute, which in used in its view for input field - "FIELD1".
similarlly created another
1. Created WD coponent ZFPM2 (using implemented interface - IF_FPM_UI_BUILDING_BLOCK).
2. In component controller I have created noe "NODE2" with one attribute, which in used in its view for input field - "FIELD2".
Then created Custome Appication for FPM component FPM_OIF_COMPONENT - and in its configuration created 2 UIBB's.
One UIBB for ZFPM1 and 2nd UIBB for ZFPM2.
Now in test mode (execution) of application, I can see both the input fields - "FIELD1" and "FIELD2".
Now in ZFPM1 - I want to read the data entered into "FIELD2" of conponent "ZFPM2".
So for this I mode the "NODE2" as interface node, then defined "ZFPM2" in component useage of ZFPM1.
Then in the component controller of ZFPM1 - did the mapping from ZFPM2.interface controller- node2 to component controller of ZFPM1.
Now in component controller of ZFPM1, in method "PROCESS_EVENT" - tried to read the value of "NODE2" attribute using the code generated by code wizard (code as below). But it is not reading the entered value.
In the same of component ZFPM2 it can read this value but not able to read the same in ZFPM1.
Kindly Suggest
Code generate by code wizard -
DATA lo_nd_node2 TYPE REF TO if_wd_context_node.
DATA lo_el_node2 TYPE REF TO if_wd_context_element.
DATA ls_node2 TYPE wd_this->Element_node2.
DATA lv_field2 TYPE wd_this->Element_node2-field2.
DATA lv_field3 TYPE wd_this->Element_node2-field3.
navigate from <CONTEXT> to <NODE2> via lead selection
lo_nd_node2 = wd_context->get_child_node( name = wd_this->wdctx_node2 ).
@TODO handle non existant child
IF lo_nd_node2 IS INITIAL.
ENDIF.
get element via lead selection
lo_el_node2 = lo_nd_node2->get_element( ).
@TODO handle not set lead selection
IF lo_el_node2 IS INITIAL.
ENDIF.
get single attribute
lo_el_node2->get_attribute(
EXPORTING
name = `FIELD2`
IMPORTING
value = lv_field2 ).
Hi. Do you use IF_FPM_SHARED_DATA ?
I think, your case are described below:
"
Sharing Data between UIBBs from Different Components
When the UIBBs of an application are implemented in several components, there is often the need to share data between these components.
...
For this purpose, the FPM offers Shared Data components.
This is an optional FPM feature which meets most applications‟ demands. However, if needed, it can be replaced by other technical alternatives as described in Other Options for Sharing Data.
Using a Shared Data Component
A shared data component is a Web Dynpro component which implements the IF_FPM_SHARED_DATA interface. This interface contains no methods or attributes but serves as a marker interface only. Each component (for example UIBB, FPM_OIF|GAF_CONF_EXIT component) which wants to use a shared data component needs to declare a usage to the shared data component. ...
"
More at http://scn.sap.com/docs/DOC-30668 , bottom of page 234.
May the Force be with you..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gurus,
Kindly let me know if you have any suggestion or inputs on this question, thanks !!!
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.