Start of Content Area

Background documentation Explanation UI Element  Locate the document in its SAP Library structure

You can use the UI element Explanation on your views for explanatory texts. The UI element explanation contains a text that appears on the screen permanently and should contain explanations about the screen or parts of the screen.

In the View Designer you can create the text for an explanation of the text property. The text can either be entered manually (a maximum of 255 characters) or it can be an OTR alias text, for which you use the notation $OTR:Aliasname. You can also write a script that allows for texts longer than 255 characters and of various formats. To do this use method WDDOMODIFYVIEW.

Example

method wddomodifyview.

  data lines              type tlinetab.
  data header             type thead.
  data text               type string.
  data wad_formatted_text type ref to cl_wd_formatted_text.
  data ui_explanation     type ref to cl_wd_explanation.

  call function 'DOCU_GET'

    
exporting
      
id                = 'TX'
      
langu             = sy-langu
      object            = 'WDR_TEST_HELP_EXP1'

    
importing
      
head              = header
    
tables
      
line              = lines
    
exceptions
      
no_docu_on_screen = 1
      
no_docu_self_def  = 2
      
no_docu_temp      = 3
      
ret_code          = 4
      
others            = 5.
  if sy-subrc <> 0.
    text = space.
  endif.

  wad_formatted_text = cl_wd_formatted_text=>create_from_sapscript( sapscript_head  = header

                                                                    sapscript_lines = lines
                                                                    type            = cl_wd_formatted_text=>e_type-wad
                                                                  ).
  if wad_formatted_text is bound.
    text = wad_formatted_text->m_xml_text.
  else.
    text = ''.
  endif.

  ui_explanation ?= view->get_element( 'ON_SCREEN_EXPL1' ).
  ui_explanation->set_text( text ).

  wd_this->m_view = view.

endmethod.

The text of an explanation is highlighted differently to other UI texts when the design emphasized is selected, since in addition to the text being underlined in blue, the switch Hide Quick Help is also displayed.

Example

Simple Example

This graphic is explained in the accompanying text

 

From the context menu you can activate/deactivate the display of the explanation text (Display Quick Help).

Example

This graphic is explained in the accompanying text

The option for More Field Help in the context menu is used to display technical information as well as the full data element documentation, if the field on which it was called, is linked to the ABAP. If it is not, only the technical information is displayed. See Classic F1 Help.

 

 

End of Content Area