cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify printing of long text in IW32??-- urgent

Former Member
0 Kudos

hi all,

While printing order long text, i need to add a line to the long text at the beginning.

for eg: if a order 0001 has order long txt as aaaaaaaaaaaaaaaa.

then the output should be

This longtext belongs to 00001.

aaaaaaaaaaaaaaaaaaaaaaaaaaa.

Any pointers will be really helpful.

Accepted Solutions (0)

Answers (1)

Answers (1)

jj
Active Contributor
0 Kudos

In order to get the content of the long text.

You will be using read text.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = <text id>

language =

name = <order doc no>

object = <text object>

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

lines = tlines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

So content will be available in tlines internal table.

Loop this internal table.

Append a line with content ' This long text belongs to <order no> if sy-tabix is 1.