cancel
Showing results for 
Search instead for 
Did you mean: 

setting default value in the wdinit.

Former Member
0 Kudos

I have written a method in the custom control of the program ,in which i am calling a function module.Now i want to send a value in a import parameter which i want to decleare in the wdinit method of the view.

For ex. i want to set the value of pernr = 12323 in the wdinit of the view and now i want to sent this value to the importing value of the function module which is in method of the custom control.

How can I set this value in the wdinit method also how this value can be sent to the method of the custom control and then to the function module.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

You need to set the method in the custom control like an interface method. You do this on tab Methods flagging the field Interface.

In this you need to create an import parameter.

To call it from the wddoinit do the following:


DATA:
  lr_detail TYPE REF TO iwci_wdc_detail.

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

Don't forget to add you component to the used components of the caller component (double click on web dynpro component).

Regards.