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

Long text: Upload

Former Member
0 Likes
321

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?

1 REPLY 1
Read only

Former Member
0 Likes
295

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