cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of text symbols in assistance class

Former Member
0 Kudos

Hi All,

I am working with the assistance class.In text symbols i created one text with sym= 001,text = welcome and mlen = 8.

I passed this number as key to get_text method as

DATA: lv_text TYPE string.

lv_text = wd_assist->if_wd_component_assistance~get_text( key = '001' ).

and i binded the lv_text to text property of i/p element textview using set_attribute method but i am getting the error as text 001 not found

Can anybody give me the solution for this........

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Everything sounds right. Are you sure you actived the text in the assistance class. Sometimes people edit and then forget to active - and therefore the text symbol wouldn't exist at runtime. Otherwise your steps sound correct.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi The exact code to get the text symbol text to webui screen.

Maintain a text in text symbol in webui Component and call this code in your method

   

     DATA LO_API_CONTROLLER     TYPE REF TO IF_WD_CONTROLLER.

     DATA LO_MESSAGE_MANAGER    TYPE REF TO IF_WD_MESSAGE_MANAGER.

     DATA LV_MSG(80) TYPE C.

     DATA LV_TXT TYPE STRING.

     LO_API_CONTROLLER ?= WD_THIS->WD_GET_API( ).

     CALL METHOD LO_API_CONTROLLER->GET_MESSAGE_MANAGER

       RECEIVING

         MESSAGE_MANAGER = LO_MESSAGE_MANAGER.

     CLEAR: LV_TXT, LV_MSG.

     LV_TXT = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( KEY = '001' ).

     LV_MSG = LV_TXT.

*       report message

     CALL METHOD LO_MESSAGE_MANAGER->REPORT_ERROR_MESSAGE

       EXPORTING

         MESSAGE_TEXT = LV_MSG.

     EXIT.

Former Member
0 Kudos

Hi Thomos,

Thanks for ur reply.My problem is solved I forgot to activate the text symbols.Now i got the solution....

Former Member
0 Kudos

Hi,

lv_text = wd_assist->if_wd_component_assistance~get_text( key = '001' ).

Insted of this used

lv_text = wd_assist->if_wd_component_assistance->get_text( key = '001' ).

Rick

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi,

>

> lv_text = wd_assist->if_wd_component_assistance~get_text( key = '001' ).

>

> Insted of this used

>

> lv_text = wd_assist->if_wd_component_assistance->get_text( key = '001' ).

>

>

> Rick

Rick, what you are suggestion isn't syntactically correct. You can't change the ~ to a -> as if_wd_component_Assistance is an interface and not an object instance. the original coding with the ~ is the correct coding.

Former Member
0 Kudos

Hi Thomas,

Thanks for updated towards my mistake.

-Rick