‎2007 Jun 03 2:49 PM
Hi
The field of the longtext is 72char. How can is ensure that a word is not cut/split to continue on the next line?
‎2007 Jun 03 2:56 PM
when you use save_text function module ,before this one you need to use simple logic.
Assume you have data in one field
data: itab_d like swastrtab occurs 0 with header line.
data : v_data(250) type c.
you have data v_data.
CALL FUNCTION 'SWA_STRING_SPLIT'
EXPORTING
INPUT_STRING = v_data
MAX_COMPONENT_LENGTH = 72
TERMINATING_SEPARATORS =
OPENING_SEPARATORS =
TABLES
STRING_COMPONENTS = itab_d
EXCEPTIONS
MAX_COMPONENT_LENGTH_INVALID = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Now itab_d has each line 72 char,
now loop ur itab_d
loop at itab_d.
here pass ur data to tlines.
endloop.
then use tlines in save_text Function module.
Reward Points if it is helpful
Thanks
Seshu