‎2007 Sep 06 3:03 AM
Hi all,
I have encountered a problem when using RKD_WORD_WRAP. The problem is that the paragraph is not being formatted nicely when i try to printout in Smartforms.
Eg is that I want to format this paragraph;
"Text Conversion: Convert Text Formats
The function module CONVERT_TEXT provides the
following format conversion options:"
However, when I output it out, the text was being displayed like this;
"Text Conversion: Convert Text Formats
The function module CONVERT_TEXT provides
the
following format conversion options:"
The problem is that even though after the "the" word, although that line still has some spaces, thecorresponsing words just wont get concatenate to the 2nd line (as seen above).
Is there any way to fix this?? Or is there a standard value to be use for the outputlens parameter so that the above situation will not occurs??
‎2007 Sep 06 3:27 AM
You can use other FM in order to get perfect functionality :
SWA_STRING_SPLIT -> pass the text and mention line length ,it split the data accordingly.
Thanks
Seshu
‎2007 Sep 06 4:10 AM
Hi,
The function module SWA_STRING_SPLIT that you have said is not working successfully. It is still giving me the same problem where it is appending a new line where there is still enough space for the word on the current line.
‎2007 Sep 06 4:31 AM
Check the below program and output :
report ztest_ytt.
data input type string.
data SWASTRTAB like SWASTRTAB occurs 0 with header line.
start-of-selection.
input = 'The function module SWA_STRING_SPLIT that you have said is not
working successfully. It is still giving me the same problem where it is
appending a new line where there is still enough space for the word on
the current line'.
CALL FUNCTION 'SWA_STRING_SPLIT'
EXPORTING
INPUT_STRING = input
MAX_COMPONENT_LENGTH = 100
TERMINATING_SEPARATORS =
OPENING_SEPARATORS =
TABLES
STRING_COMPONENTS = SWASTRTAB
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.
loop at SWASTRTAB.
write:/ SWASTRTAB-STR.
endloop.
This is output :
The function module SWA_STRING_SPLIT that you have said is not working successfully. It is still
giving me the same problem where it is appending a new line where there is still enough space for
the word on the current line
Suppose you want to print 100 charcters in each line .. upto 95 charcters you have words perfectly the next will start at 97th ,so here word is <b>' Function'</b>
so this word will not fit into that line since you have 4 charcters,Function word is containg 8 charcters,this word will come in next line.
Check the program and give what ever input and see the results.
Thanks
Seshu