cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with long text

Former Member
0 Kudos

Hi All,

Iam using the below code for printing the long text in the sapscript layout but iam getting not more than 255 length of lines after this code iam passing &k_textname& in the sapscript.Is there any other way to solve by printing complete long text in SAPSCRIPT,Please provide the soln with the code,Its Urgent

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = v_textid(zshp)

LANGUAGE = sy-langu

NAME = v_textname

OBJECT = 'VBBK'

TABLES

LINES = i_lines

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7.

IF sy-subrc = 0.

CALL FUNCTION 'FORMAT_TEXTLINES'

EXPORTING

formatwidth = c_line_max

TABLES

lines = i_lines.

LOOP AT i_lines.

CONCATENATE k_textname i_lines-tdline

INTO k_textname.

ENDLOOP.

ENDIF.

Thanks,

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

DATA : l_w_name TYPE thead-tdname.

DATA : l_w_text(1000) TYPE c.

CONCATENATE it_vbap-vbeln it_vbap-posnr INTO l_w_name.

CALL FUNCTION 'read_text'

EXPORTING

client = sy-mandt

id = '0001' "'z002'

language = 'e'

name = l_w_name

object = 'vbbp'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

lines = it_tdline

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 'S' number sy-msgno

  • with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

LOOP AT it_tdline INTO wa_tdline.

CONCATENATE l_w_text wa_tdline-tdline INTO l_w_text.

ENDLOOP.

CALL FUNCTION 'rkd_word_wrap'

EXPORTING

textline = l_w_text

  • DELIMITER = ' '

outputlen = 40

  • IMPORTING

  • OUT_LINE1 =

  • OUT_LINE2 =

  • OUT_LINE3 =

TABLES

out_lines = it_mat_text

EXCEPTIONS

outputlen_too_large = 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.

Try this ...i think this will help u

if it is useful ...plz reward

Regards

Anbu