on 02-11-2009 5:27 PM
Hi,
I didn't manage to do the reverse mapping at runtime.
I have 2 components.
The context of them are described below:
There is only one node in component 1 called "idioms"
In the component 2 (that is the component used called POPUP) there is the node called "columns"
I want to map idioms to columns at runtime. It is a reverse mapping.
I have the code below:
data: lo_node_info type ref to if_wd_context_node_info,
lo_dyn_node_info type ref to if_wd_context_node_info,
stru_mapping_info type wdr_context_mapping_info,
tab_mapping_path type wdr_ctx_element_path_segments,
wa_path type wdr_ctx_element_name.
wa_path = 'COMPONENTCONTROLLER.COLUMNS'.
insert wa_path into table tab_mapping_path.
stru_mapping_info-component_usage = 'POPUP'.
stru_mapping_info-controller = 'COMPONENTCONTROLLER'.
stru_mapping_info-path = tab_mapping_path.
lo_node_info = wd_context->get_node_info( ).
* Map the context node dynamically
call method lo_node_info->add_new_mapped_child_node
exporting
child_name = 'IDIOMS'
mapping_info = stru_mapping_info
receiving
child_node_info = lo_dyn_node_info.
The mapping hasn't been done. Why?
Thanks a lot.
Regards,
Jorge Luiz
Hello,
Try to use an interface method passing the dynamic node instead of using external mapping directly.
You can get more information on this in the document [Using ALV with a Dynamic Context Node in Web Dynpro for ABAP|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783].
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
Thanks for your helping.
I have done what you said, but I am receinving the error below;
Adapter error in &VIEW_ELEMENT_TYPE& "TABS" of view "YSWD_HR_TABLE_POPUP.MAIN": Context binding of property DATA_SOURCE cannot be resolved: Subnode MAIN.IDIOMA_POPUP does not exist
I am passing the node IDIOMA_POPUP as a parameter of the set_data( ) method of the used component.
TABS is the table that I want to populate.
Regards,
Jorge Luiz
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.