on 05-02-2008 5:19 PM
Hi All,
I am displaying flowing data under some headings in my script. there is one description field of 40 characters. I have set offset and have split the long entries in two lines. 20 characters in one row and 20 in the next.
Now the problem here I am facing is the word which is at the end of the first twenty characters breaks up sometimes and comes in the socond line. I don't want this.
Is there any way by which we can make the last word come into the second line if it dint reach the end??
So that if it is half printed and twenty characters got over it comes fully in the next line as we use PROTECT ENDPROTECT, to wrap paragraphs.
Example:
This I am now getting :
Code Code Description
SAP System Application and prod
ucts in data processing
This is how I want it :
Code Code Description
SAP System Application and
products in data processing
Any way out????
Thanks a ton!
Navita
Hi Navitha,
Do the necessary processing in the driver program itself using the fm:
RKD_WORD_WRAP
Regards,
Ravi Kanth Talagana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for ur reply
Actually text splitting is not the problem, but will that function module take care or the words also, words shudn't get split in between. Please see the example I have shown
Code Description
System Application Prod
ucts in data processing
should come as :
Code Description
System Application
Products in data processing
I'll try with this FM tomorrow
Thanks,
Navita
Hi,
Please go thru the below documentation for the FM : Text_split
The input text is split once in the specified line length word-compatibly. Recognized separators are SPACE and hyphen (-). The hyphen remains in the result, space does not. The result is filled with spaces from the end of the last word until the specified length.
If the separator used (SPACE or '-') is followed by more separators, they are returned as leading separators in REST.
If there is no separator between the second character (separators in the first position in the text are ignored) and the position specified in length LENGTH, the text is split at this position, not word-compatibly, if necessary. In this case the remaining text can have a leading separator even if separators only occur singly.
If the actual value assigned to the formal parameter REST is shorter than the remaining text (trailing spaces are ignored), no exception is raised, the text is truncated.
If the actual value of the formal parameter LINE is shorter than LENGTH, no exception is raised, the split first part of length LENGTH is truncated at LINE. The characters cut off are not returned in REST, which contains the remaining text from the split position.
The calling program should avoid these special cases, i.e. the actual value assigned to the formal parameter LINE should be at least as big as LENGTH.
The actual length of the formal paramter REST should be as big as the length of the text passed.
Regards,
Narendra.
to split the sentence use the FM TEXT_SPLIT
this aoutmatically takes care of words and will push the last word to the next line without breaking it up
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.