on 11-13-2012 5:35 AM
Hello Experts,
I created a popup using create_popup_to_confirm. i am showing a message "Please fill all mandatory field". I want to show this message based on log on language. How can i translate this text kindly guide me.
Thank you
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear All
Thank you for the replies. I read the above links and it is really helpful to change the Labels and changing the text using Assistance Class. In my case i am not using assistance class and at present in the popup i am displaying the static text of 'Fill all required fields' but i dont have idea how to change the static text i.e it is not related with any ui element and assistance class. The text is simply shown by using the class create_popup_to_confirm. for eg:
my Code is:
call method lo_window_manager->create_popup_to_confirm
exporting
text = 'Fill all required fields' ---------------------------------------> I need this text to be translated
button_kind = if_wd_window=>CO_BUTTONS_OK
message_type = if_wd_window=>co_msg_type_error
CLOSE_BUTTON = ABAP_TRUE
receiving
result = lo_window.
lo_window->open( ).
Please guide me to translate the above highlighted text.
Thanks
Vijay
Hi Vijay,
Create the OTR texts for the languages you need as described in Amy Kings nice guide.
Then when you need to retrieve it you simply use:
call method lo_window_manager->create_popup_to_confirm
exporting
text = cl_wd_utilities=>get_otr_text_by_alias('$TMP/YOUR_KEY')
button_kind = if_wd_window=>CO_BUTTONS_OK
message_type = if_wd_window=>co_msg_type_error
CLOSE_BUTTON = ABAP_TRUE
receiving
result = lo_window.
lo_window->open( ).
Br Jan
Hi Vijay.
You could also use OTR texts for this for example as described here:
Br Jan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
You can manage this in 2 ways:
1. text message (se91 tcode)
2. text message in text pool of assistance class
See bellow how are used 1 and 2:
DATA: lo_window_manager TYPE REF TO if_wd_window_manager,
lo_api_component TYPE REF TO if_wd_component,
lo_api_view TYPE REF TO if_wd_view_controller,
lo_window TYPE REF TO if_wd_window.
DATA: lt_string TYPE TABLE OF string,
ls_string TYPE string,
lv_title TYPE string.
lo_api_view = wd_this->wd_get_api( ).
MESSAGE ID 'TA' TYPE 'S' NUMBER '061' INTO lv_title.
ls_string = wd_assist->if_wd_component_assistance~get_text( '001' ).
APPEND ls_string TO lt_string.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_popup_to_confirm(
window_title = lv_title
text = lt_string
button_kind = 4 ).
lo_window->open( ).
lo_window->subscribe_to_button_event(
...................
Regards,
Catalin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.