Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Agentry - Keep SAP long texts format

Hi,

In SAP when you have a long texts, for instance in the Work Order header, you can apply certain formats like "Bold".

When you do so, SAP stores this long text with tags indicating the format and Agentry displays it with no format: <H>long text</>

Would it be possible to display this long text according to the format in SAP? I guess not in a standard way, but maybe there is some work around to do so?

Thank you in advance.

Marçal

Tags:
replied

Hi,

With Jason tip of using the HTML field + the following code to convert to HTML before sending the text to Agentry I found the solution.

In this code I'm reading the work order text, and then writting it to show the HTML result in SE38 execution test. In Agentry only the call to CONVERT_ITF_TO_HTML in a BADI should be necessary.

* Convert work order header text to HTML (pictures are ignored)
DATA: lt_tline    TYPE STANDARD TABLE OF tline,
      ls_header   TYPE                   thead,
      ls_htmlline TYPE                   htmlline,
      lt_htmlline TYPE STANDARD TABLE OF htmlline.

CALL FUNCTION 'READ_TEXT'
  EXPORTING
    id       = 'KOPF'
    language = 'E'
    name     = '250000020421705'
    object   = 'AUFK'
  IMPORTING
    header   = ls_header
  TABLES
    lines    = lt_tline.

CALL FUNCTION 'CONVERT_ITF_TO_HTML'
  EXPORTING
    i_header      = ls_header
    i_html_header = space
  TABLES
    t_itf_text    = lt_tline
    t_html_text   = lt_htmlline.

LOOP AT lt_htmlline INTO ls_htmlline.
  WRITE ls_htmlline.
ENDLOOP.
1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question