cancel
Showing results for 
Search instead for 
Did you mean: 

'Explanation' UI element is not working

Former Member
0 Kudos

Hi Experts,

I am using the UI element 'explanation' to display some text.In my view layout that text is displaying, but when i am running my application that text is not displaying.

Please help me in solving this issue.

Regards,

Arun.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arun,

Explanation visible only when the quick helpis on i.e. Right click on your browser click on Display Quick help,

and check you will get Explanation. If you hid Quick help, Explanation also hide.

So to display text, use some other UI Elemets based on your requirements, Text view or Text edit or Formatted Text view etc.

follow this link...

Please check this...

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a9/42c041e125c917e10000000a155106/content.htm

https://cw.sdn.sap.com/cw/docs/DOC-20300

Cheers,

Kris.

Former Member
0 Kudos

Hi Kris,

Thanks for your reply.

All the UI elements related to text is not allowing me to display more than a sentence [some 230 characters].

How we can display text as a paragraph?

Regards,

Arun.

Former Member
0 Kudos

Hi Arun,

Create one attribute of type string.

Use text view or text edit UI element.

Bind this attribute to text property. and in WDDOINT method write code to display text.

DATA lo_el_context TYPE REF TO if_wd_context_element.
  DATA ls_context TYPE wd_this->Element_context.
  DATA lv_string TYPE wd_this->Element_context-string.

* get element via lead selection
  lo_el_context = wd_context->get_element( ).

* @TODO handle not set lead selection
  IF lo_el_context IS INITIAL.
  ENDIF.

data text1 type string.

CONCATENATE  'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' INTO text1.

* set single attribute
  lo_el_context->set_attribute(
    name =  `STRING`
    value = text1 ).

OR in above link check vishal kappors answer. or

You can use TEXT_EDIT UI element to display long text of more than 255 chars. OR

Create text using SO10 transaction(SCRIPT text) and then READ_TEXT. u can use the UI Element FormattedTextView.

data : ls_header type thead,
lt_lines type standard table of tline,
lr_fm type ref to cl_wd_formatted_text.


call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'ST'
language = 'E'
name = (name of the standard text)
object = 'TEXT'
importing
header = ls_header
tables
lines = lt_lines
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.


lr_fm = cl_wd_formatted_text=>create_from_sapscript( sapscript_head = ls_header
sapscript_lines = lt_lines ).

WD_context->set_attribute( name = 'FOOTER' value = lr_fm->m_xml_text ).

Cheers,

Kris.

Former Member
0 Kudos

Hi Kris,

Suggested method is working fine.

Thanks for your valuable time.

Regards,

Arun.

Answers (0)