on 09-25-2009 8:44 AM
Hello.
I want rename buttons "OK", "Cancel" with my names in popups.
I create new values in domen WDR_POPUP_BUTTON_KIND
Next enhance interface IF_WD_WINDOW with new attributes:
CO_BUTTON_CP type WDR_POPUP_BUTTON_KIND
But i have problem in CL_WDR_INTERNAL_WINDOW->IF_WD_WINDOW~SET_BUTTON_KIND:
case me->buttons-button_kind.
when co_buttons_abortretryignore.
wa_button-button = co_button_abort.
wa_button-button_text = cl_wdr_texts=>get_text( '201' ).
wa_button-tooltip = cl_wdr_texts=>get_text( '201' ).
wa_button-is_enabled = abap_true.
This code show only predefined type of buttons can use.
How can I rename buttons in dialog popup ?
When you subscribe to button event you can rename the button
Radhika* Popup
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( ).
lo_window = lo_window_manager->create_window(
window_name = 'W_POPUP'
message_display_mode = if_wd_window=>co_msg_display_mode_selected
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
DATA: l_api TYPE REF TO if_wd_view_controller.
l_api = wd_this->wd_get_api( ).
" subscribe to button event
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
BUTTON_TEXT = u2018Approveu2019 " renaming the button text
action_name = 'ON_OK_POPUP'
action_view = l_api
is_default_button = abap_true ).
lo_window->open( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.