cancel
Showing results for 
Search instead for 
Did you mean: 

PRIN TLINE-TDFORMAT

Former Member
0 Kudos

Hi, I want to print a text that was saved with a Z style, first retrieve the text but I can not give you the format it was saved

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = loc_id

language = daffv-txtsp

name = loc_name

object = loc_object

IMPORTING

header = texth

TABLES

lines = textl

EXCEPTIONS

not_found = 01.

This is part of the contents of the table TEXTL

TDFORMAT TDLINE

/: STYLE ZPASOS

* Fórmula Industrial

D4 ,,,,Por,,Por

D4 Clave,,materias primas,,comprimido,,lote

= ,,

*

E4 MAA463,,TRIMEBUTINA MALEATO,,250 G,,54

KG

E4 MAA426,,SIMETICONA USP Q7-2243LVA,,

= 0.075G,,42.8S7KG

An here I try to print with writes

LOOP AT textl.

WRITE: / textl-tdline.

ENDLOOP.

there is a way of interpreting textl-tdformat?

Regards.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

If you want to understand the TDFORMAT, look at the column in SAPScript editor../: - command line, * - New line/paragraph, = - line continuation, D4 - paragraph format, etc.

Former Member
0 Kudos

You can use this code

Here l_v_i is the variable for no of lines.

WHILE l_v_i <=100.

READ TABLE ltext INTO wa_text INDEX l_v_i.

if sy-subrc = 0.

CONCATENATE v_long_txt_item wa_text-tdline INTO v_long_txt_item

SEPARATED BY space.

l_v_i = l_v_i + 1.

else.

exit.

endif.

ENDWHILE.

arul_murugan
Active Participant
0 Kudos

Hi,

Can you please explain the requirement clearly. if you want to align the text, you can use the function module 'FORMATE_TEXTLINES'

Thanks

Arul