Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

READ_TEXT: format problem when printing to PDF

Former Member
0 Likes
1,197

Hello everybody,

I am using READ_TEXT function module to get long text then display to PDF format.

I met a problem with format as following:

The long text has bold format, for e.g.: This is bold text.

The READ_TEXT FM will then read the data as: <H>This is bold text.</>

When output to PDF instead of display as This is bold text., it is displaying <H>This is bold text.</>

Please suggest me how to fix this.

Thanks,

Khanh

Hello everybody,

I am using READ_TEXT function module to get long text then display to PDF format.

I met a problem with format as following:

The long text has bold format, for e.g.: This is bold text.

The READ_TEXT FM will then read the data as: <H>This is bold text.</>

When output to PDF instead of display as This is bold text., it is displaying <H>This is bold text.</>

Please suggest me how to fix this.

Thanks,

Khanh

4 REPLIES 4
Read only

andreas_mann3
Active Contributor
0 Likes
831

use only field tline-TDLINE

A.

Read only

0 Likes
831

Hi Andreas,

>

> use only field tline-TDLINE

What do you mean use only that field? This field stores the long text got from READ_TEXT form.

How can I do the format convert when display to PDF?

Thanks,

Khanh

Read only

0 Likes
831

Hi Khanh ,

Below is the sample code for your reference .

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'ZG01'

LANGUAGE = 'EN'

NAME = TH_INDATA_F01-VBELN_A

OBJECT = 'VBBK'

  • IMPORTING

  • HEADER =

TABLES

LINES = TD_LINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8.

Here lines = td_line refers to Lines of text read

The table contains all text lines belonging to a text module. The line structure is defined in table TLINE. The line contents are stored in ITF format.

Hope this helps you .

Regards ,

Navya .

Read only

Former Member
0 Likes
831

Hi all,

I have checked and found that the SAP standard print preview does not print the formatting.

I implemented as SAP standard by removing all formatting tags.

Thread closed.

Thanks all for your time.

Khanh