cancel
Showing results for 
Search instead for 
Did you mean: 

Craete a popup in the component controller method

mahesh_jagnani
Participant
0 Kudos

Hi Experts,

Can i create a POP UP Box in the component controller method.

Please tell me how i can do this.

Thanks

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

There is no provision in CC to create any UI elements, You have layout in view only.

Cheers,

Kris.

mahesh_jagnani
Participant
0 Kudos

Hi ,

Is there is any way to crate message box or any thing which create UI in CC.

Thanks

Mahesh

Former Member
0 Kudos

Hi,

Can you tell me what is your requirement?

Cheers,

Kris.

Former Member
0 Kudos

Hi mahesh,

Any UI element can only be created in a view only. There is no provision giveb to create layout in CC. So please elaborate properly what you actually want to achieve by doing this.

Regarsds,

Monishankar C

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Although it is true you can't create UI elements in the layout from the component controller, you can create a Popup. You do this by calling a specific window. Here is an example of the code for this:

wd_this->wd_get_api( )->get_window_manager( )->create_window(
                       window_name            = 'W_CREATE_DIAG'
                       title                  = 'Create New Record'
                       message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                       button_kind            = if_wd_window=>co_buttons_okcancel
                       message_type           = if_wd_window=>co_msg_type_none
                       default_button         = if_wd_window=>co_button_ok )->open( ).

Whatever window (and embedded view) you call here will be opened as a popup from the component controller.

Answers (1)

Answers (1)

Former Member
0 Kudos

You can have a method in component controller which creates popup

lo_window_manager->create_popup_to_confirm.

You can also use code generator to generate the popup based a window.

However underlying fact is that you should have the Parent window on which popup can be created.