on 09-17-2014 8:57 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marcal,
If the tags were HTML, you could display the fetched text in an HTML control on the client. Not sure if that is the case, or if the tags are in some other SAP format.
Jason Latko - Senior Product Developer at SAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
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.