cancel
Showing results for 
Search instead for 
Did you mean: 

Component Usage/Interface

former_member678355
Participant
0 Kudos

Hi,

I am trying to call a WD component in a pop-up window, but I can't seem to get it to work.

In the main component, I defined the Component Use, and the Component that I want to call. However, the component usage does not update with the component I add. How do I get the component usage to show up?

I have successfully made a pop-up window, with a DropDownByKey field, that is supposed to call the separate component, but I keep getting the 'Null' error when I run it. Am I defining the component use wrong?

Accepted Solutions (1)

Accepted Solutions (1)

Madhu2004
Active Contributor
0 Kudos

Hi,

You can call the another WD component in parent component as pop up using the below coding:

All you need is the interface window name and component usage name.

DATA lo_window_manager TYPE REF TO if_wd_window_manager.

DATA lo_api_component TYPE REF TO if_wd_component.

DATA lo_window TYPE REF TO if_wd_window.

lo_api_component = wd_comp_controller->wd_get_api( ).

lo_window_manager = lo_api_component->get_window_manager( ).

wd_this->search_empl_window = lo_window_manager->create_window_for_cmp_usage(

interface_view_name = 'W_XXXXXX

component_usage_name = 'XXXXXX'"component usage name

  • title =

  • close_in_any_case = abap_true

message_display_mode = if_wd_window=>co_msg_display_mode_selected

).

wd_this->search_empl_window->open( ).

Regards,

MAdhu

Answers (3)

Answers (3)

Former Member
0 Kudos

Create the Comp usages in the WDDOINIT method of the View as Arvind suggested. Also check the standard WD component WDT_COMPONENTUSAGE.

Former Member
0 Kudos

Hi,

go to view->cliek on property tab->click on create button->you will get a list of component you are using in ur component.

select the one you want.

sometimes it doesn't work, dont know wyh.

write this piece of code??

IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

L_REF_CMP_USAGE->CREATE_COMPONENT( ).

ENDIF.

Hope this will help you.

Thanks & Regards,

Arvind

Former Member
0 Kudos

I think you need to add the used component in the properties tab of the view.....