cancel
Showing results for 
Search instead for 
Did you mean: 

Return Parameters between WD external

0 Kudos

Can you return paramaters between two WD created as create_external_window?

For example, the WD 1 calls for WD 2 and this, returns 3 parameters, which are stored in a node interface, but I want to read this node from the WD 1, gives me the following mistake.

"The mapping of the node COMPONENTCONTROLLER.1.PARAM_DOC_MESURE_IN has not yet been completed."

Regards,

Matías.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

You can define an interface method in the component that you call and pass the parameters calling this method in the component that create the window.

Follow an example:


  DATA:
    lr_component_usage TYPE REF TO if_wd_component_usage,
    lr_detalhe         TYPE REF TO iwci_nfwdc_called. "Web dynpro component called

      lr_component_usage = wd_this->wd_cpuse_cmp_detail( ).
      IF lr_component_usage->has_active_component( ) IS INITIAL.
        lr_component_usage->create_component( ).
      ENDIF.

      lr_detalhe = wd_this->wd_cpifc_cmp_detail( ).
      lr_detalhe->set_header( i_id = lv_header ).

Remember to define the called component in the properties of the window and in the used components of the caller web dynpro component.

Regards

0 Kudos

Thanks for the help David, but I do not understand well what I do. Could you explain step by step, please?

In the example. That type is or how define: iwci_nfwdc_called and

wd_this->wd_cpuse_cmp_detail( ).

Regards,

Former Member
0 Kudos

Hello,

Do the following:

In the called component go to the COMPONENT CONTROLLER and define a new method and set is as an interface method. In this define the parameters that you want to receive and code the bind of these parameters and the context nodes.

Now go to the caller component and define a component use to the called component in the Used Components. Do the same in the properties tab in the view that will set the attributes (calling the interface method of the called component). Remember that you need to set the component use to the component and the interface controller in the view.

Now in the method that will set the values, you need to code the following:


  DATA:
    lr_component_usage TYPE REF TO if_wd_component_usage, "Standard interface
"This interface is generated when you create an interface (component use) for the component
"you can view the interface name at the Display Controller Interface (CTRL+SHIFT+F1)
"in the section component & controller usages for the current controller.
    lr_detail          TYPE REF TO iwci_detail.


      lr_component_usage = wd_this->wd_cpuse_cmp_detail( ).
      IF lr_component_usage->has_active_component( ) IS INITIAL.
        lr_component_usage->create_component( ).
      ENDIF.

      lr_detail = wd_this->wd_cpifc_cmp_detail( ).
      lr_detail->set_id( i_id = lv_id ).

Regards and reward if usefull.

0 Kudos

I solve the problem by declaring to the window as modal rather than external.

Thanks for the help.

Matías