Agentry - Keep SAP long texts format
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 Oliveras replied
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'
id = 'KOPF'
language = 'E'
name = '250000020421705'
object = 'AUFK'
header = ls_header
lines = lt_tline.
CALL FUNCTION 'CONVERT_ITF_TO_HTML'
i_header = ls_header
i_html_header = space
t_itf_text = lt_tline
t_html_text = lt_htmlline.
LOOP AT lt_htmlline INTO ls_htmlline.