‎2006 Feb 22 9:02 PM
Hi everybody,
somebody knows how can i solve this problem, I'm uploading a RTF document into an standard text in SAP, the problem is that where i have too much space more than 64 spaces, the upload function cuts the line and when pass in the function FORMAT_TEXTLINES, the spaces have been lost, like the next example:
Example RTF document:
<b>Document</b> xxxxxxxxx
______________________________________________________
(more than 70 spaces) |
______________________________________________________ |
(more than 70 spaces) |
(more than 70 spaces) |
(more than 70 spaces) |
______________________________________________________ |
Example Error for the document.
<b>Document</b> xxxxxxxxx
______________________________________________________
______________________________________________________ |
______________________________________________________ |
‎2006 Mar 01 11:26 AM
Hello,
please find below an example of program using the 'FORMAT_TEXTLINES'
form prepare_text.
data : begin of it_loc_line occurs 0,
tdline(60),
end of it_loc_line.
clear it_line.
free it_line.
split it_item_tmp-ltext at space into table it_loc_line.
loop at it_loc_line.
if not it_loc_line is initial.
move-corresponding it_loc_line to it_line.
append it_line.
clear it_line.
endif.
endloop.
call function 'FORMAT_TEXTLINES'
exporting
formatwidth = '60'
linewidth = '60'
tables
lines = it_line
exceptions
bound_error = 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.
endform.
I hope it will help you