cancel
Showing results for 
Search instead for 
Did you mean: 

dynamical reverse mapping

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks David,

I've got.

Jorge Luiz

Answers (0)