cancel
Showing results for 
Search instead for 
Did you mean: 

Standard text like functionality in webdynpro

Former Member
0 Kudos

Hi Experts,

Is there a way in webdynpro like we have in abap where a user can go to the standard text transaction create his own text and we can show that text within a webdynpro component, if this is not possible please suggest me workarounds that webdynpro offers.

Thanks in Advance,

Chaitanya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chaitanya,

Are u talking abt the transaction SO10 for standard text. If so 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 ).   "attribute that will be linked with the UI Element

Ranganathan.

Former Member
0 Kudos

thanks ranganathan..

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Chaitanya,

Please refer following link.

[http://help.sap.com/saphelp_nw04s/helpdata/EN/43/1f6442a3d9e72ce10000000a1550b0/content.htm]

For message class, you can use BAPI BALW_BAPIRETURN_GET2 to get message from Message Class.

Hope this helps.

Thanks,

Tejaswini

Former Member
0 Kudos

Hi Chaitanya,

If you want to display error or success messages in application then we have some interfaces to do this as follows:


* get message manager
DATA lo_api_controller     TYPE REF TO if_wd_controller.
DATA lo_message_manager    TYPE REF TO if_wd_message_manager.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager
  RECEIVING
    message_manager = lo_message_manager.

* report message
CALL METHOD lo_message_manager->report_error_message
  EXPORTING
    message_text  = 'Error while updating'.         (can display any text)

We can similarly display Success and Warning messages.

There are different type of methods available in the if_wd_message_manager interface to display messages.

Also, you can get the messages from your message class.

Hope i replied what you needed.

Thanks,

Tejaswini