on 06-22-2011 10:11 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
84 | |
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.