cancel
Showing results for 
Search instead for 
Did you mean: 

How to translate Select Option Block Title

Former Member
0 Kudos

Hi,

Can someone please enlighten me on how to translate for a Select Option Block Title in a Web Dynpro ABAP?

My coding as follows:



  wd_this->m_helper->add_block(
    i_id         = `GROUP1`
    i_block_type = if_wd_select_options=>mc_block_type_group
    i_title      = 'Period' ).

  wd_this->m_helper->add_block(
    i_id         = `GROUP2`
    i_block_type = if_wd_select_options=>mc_block_type_group
    i_title      = `Selection` ).

I would like to translate for both 'Period' and 'Selection'. Do I still use syntax $OTR: alias?

Accepted Solutions (1)

Accepted Solutions (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Girish,

you can use the assistance class for the webdynpro component and create the text in the assistance class. This text can be used to populate the title like wd_assist->get_text( <id> ).

BR, Saravanan

Former Member
0 Kudos

Thank you for replying.

Do you have some sample codes for me to refer?

saravanan_narayanan
Active Contributor
0 Kudos

Hello Girish,

do the following

1. Open the webdynpro component

2. Enter the name of the Assistance Class (say ZCL_CUSTOM_ASSIST). It will prompt for creating the class. Create the class

and goto the class builder and open this class in the edit mode

3. In the class builder, from 'GoTo' menu, select 'Text Elements' option

4. Create the text which you want it to be the title and specify the symbol for the same (say 001)

5. Activate your class

6. then in the Component/ View controller you find an member variable WD_ASSIST created automativally in the attributes tab.

7. in the place where you want to set the Group title call wd_assist->if_wd_component_assistance~get_text( '001' ). this will give the text that is maintained in the class builder.

during the translation process, translate the text elements that is maintained in the assistance class.

Hope this is clear.

BR, Saravanan

Former Member
0 Kudos

Brilliant! Problem solved.

Answers (0)