cancel
Showing results for 
Search instead for 
Did you mean: 

UI Elements in Confirmation dialog window?

Former Member
0 Kudos

Hi Experts,

Can we add any UI Elements to confirmation dialog window like checkbox, input etc., is yes please help me how to do this?

Thanks,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can create your own view and then instead of standard confirmation dialog, you can launch this window as a pop up.

Regards

Manas Dua

Former Member
0 Kudos

Hi Manas,

Thanks for your reply.

In popup window by default we get OK button, can we add one more button before that like 'YES'. or can we remove this default ok button? so that we can add our custom buttons to that?? Help me.

Thanks,

venkat.

Former Member
0 Kudos

Hi,

The create_window() method of if_wd_window_manager has a paramater "button_kind" of type WDR_POPUP_BUTTON_KIND.

Please go through this type in SE11 , you will get all details of the possible buttons possible in the pop-up.

Thnks,

aditya.

Former Member
0 Kudos

Hi Aditya,

I am asking about popup window, in popup window can we create another button like default button 'OK' or can we remove that default button??

Thanks,

venkat.

Former Member
0 Kudos

Hi ,

Yes that's what I meant.

Create required view , put it in the window.

Raise the window as a pop-up in the below shown way.

lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    lo_window         = lo_window_manager->create_window(
                       window_name            = 'ZHR_XX_EMPHLIST'
*                  title                  =
*                  close_in_any_case      = abap_true
                       message_display_mode   = if_wd_window=>co_msg_display_mode_selected
*                  close_button           = abap_true
                       button_kind            = if_wd_window=>CO_BUTTONS_OKCANCEL "OK/Cancel
                       message_type           = if_wd_window=>co_msg_type_none
                       default_button         = if_wd_window=>co_button_ok
                       ).

    lo_window->open( ).

In the code above , check paramater button_kind.In the above case , ok and cancel buttons are created.

In the same way you have other options ...Check the attributes of "if_wd_window" to know all options possible.

You also have options to raise the window without any buttons.

Thnks,

aditya.

Former Member
0 Kudos

Thanks aditya,

That is working fine,

Here another issue is.. i have a check box in popup window, if user check this i want to enable button 'YES'(Bbutton_kind). is it possible??Help please..

Thanks,

venkat.

Former Member
0 Kudos

Hi ,

I dont think you can play with the "yes/no" button created using button kind.

If you want to do somthing like that , create a button in the view that is being raised as a pop-up itself instead of using button_kind , so that you can do whatever you like with that button.(enabling/disabling etc).

Thnks,

aditya.

Former Member
0 Kudos

As mentioned in my reply, you have to create you own view and then you can launch it as a pop up

Regards

Manas Dua

Former Member
0 Kudos

Thanks manas and aditya..

Thanks,

venkat.

Answers (1)

Answers (1)

KiranJ
Active Participant
0 Kudos

Hai ,

Check this once

DATA :l_text TYPE string_table.

DATA: view_contrl TYPE REF TO if_wd_view_controller,

lo_window2 TYPE REF TO if_wd_window.

APPEND 'Do u want TO Save ..?' TO l_text.

CALL METHOD lo_window_manager1->create_popup_to_confirm

EXPORTING

text = l_text

button_kind = if_wd_window=>co_buttons_yesno

message_type = if_wd_window=>co_msg_type_question

  • CLOSE_BUTTON = ABAP_TRUE

  • WINDOW_TITLE =

  • WINDOW_LEFT_POSITION =

  • WINDOW_TOP_POSITION =

window_position = if_wd_window=>co_center

window_width = '30'

window_height = '50'

  • DEFAULT_BUTTON =

RECEIVING

result = lo_window2.

lo_window2->open( ).

lo_window1->open( ).

view_contrl = wd_this->wd_get_api( ).

CALL METHOD lo_window2->subscribe_to_button_event

EXPORTING

button = if_wd_window=>co_button_yes

action_name = 'SAVE_YES'

action_view = view_contrl.

use this code wirte it in SAVE_YES method..

Before this u hav to create the POP UP window . thn cal this window as above menstioned.