‎2009 Oct 16 1:28 PM
Hello,
hope i can get some help with my problem.
i know there are function modules that convert a string to a table.
for example SCMS_STRING_TO_FTEXT.
but i couldn't find a fm that does it considering not to split words.
for example:
looks like this:
................this is a te
st
should look like this
.................this is a
test
thanks very much for your help
Helmut
‎2009 Oct 16 1:42 PM
HI,
Try with below syntax:
DATA: dobj TYPE string,
result_tab type table of string.
dobj = 'This is an example'.
SPLIT dobj AT space INTO TABLE result_tab.
It will split the string into table.
‎2009 Oct 16 1:42 PM
HI,
Try with below syntax:
DATA: dobj TYPE string,
result_tab type table of string.
dobj = 'This is an example'.
SPLIT dobj AT space INTO TABLE result_tab.
It will split the string into table.
‎2009 Oct 16 1:49 PM
Hello,
i have no seperator
if i use space i would get every word in a extra line
Greets
‎2009 Oct 16 2:11 PM
‎2009 Oct 16 2:14 PM
‎2009 Oct 16 2:20 PM
Rob,
That's definitely the better solution. Didn't know that one yet.
‎2009 Oct 16 2:39 PM
Hello Rob,
Again you have put me in dilemma ;-(
I try with IQAPI_WORD_WRAP for Micky's Statement for lenght 35 characters. It returns me table with 3 lines.
THAT'S DEFINITELY THE BETTER
SOLUTION. DIDN'T KNOW THAT ONE
YET.I try with RKD_WORD_WRAP for Micky's Statement for lenght 35 characters. It returns me table with 2 lines.
THAT'S DEFINITELY THE BETTER
SOLUTION. DIDN'T KNOW THAT ONE YET.Please enlighten me 😛
BR,
Suhas
‎2009 Oct 16 2:48 PM
‎2009 Oct 16 2:49 PM
>
> Rob,
>
> That's definitely the better solution. Didn't know that one yet.
Yeah
‎2009 Oct 16 2:56 PM
I see - probably a question for OSS
The OP can take whichever he likes.
Rob
‎2009 Oct 16 2:57 PM
The OR Condition in this IF makes the RKD_WORD_WRAP to WRAP it in 2 lines.
IF ( <F> EQ DELIMITER AND IPOS NE 0 ) OR
( STRING_LENGTH LE OUTPUTLEN ). "aw170997/31I/H83654
Regards,
Naimesh Patel
‎2009 Oct 16 3:48 PM
Hello Naimesh,
But why do we have the discrepancy, we should not be having it.
Cheers,
Suhas
‎2009 Oct 16 3:57 PM
Yes, we must not be having any discrepancy.
It looks like SAP didn't bother to apply the same patch to FM IQAPI_WORD_WRAP.
But the applied patch in the RKD_WORD_WRAP is not good enough:
With the same input text from Micky
That's definitely the better solution. Didn't know that one yet.
RKD_WORD_WRAP with input parameters:
DELIMITER = single quote
OUTPUTLEN = 35
Output table:
THAT'
S DEFINITELY THE BETTER SOLUTION. D
IDN'T KNOW THAT ONE YET.
Which is wrong.
I was expecting that it would generate 4 entries and FM IQAPI_WORD_WRAP generated 4 entries for the same input parameters:
THAT'
S DEFINITELY THE BETTER SOLUTION. D
IDN'
T KNOW THAT ONE YET.
Which one is better ??
@ Micky,
Thanks for building great test data
Regards,
Naimesh Patel
‎2009 Oct 16 4:04 PM
Hello Naimesh,
THAT'
S DEFINITELY THE BETTER SOLUTION. D
IDN'
T KNOW THAT ONE YET.This is not correct "word wrapping". This is basically splitting the string into block of 35 characters each
BR,
Suhas
‎2009 Oct 16 4:06 PM
‎2009 Oct 16 4:18 PM
"Word Wrapping" should be a type of split at Space (which is delimiter) in specified Length. So, Delimiter would have always higher preference than Length.
FM IQAPI_WORD_WRAP is consistent with its priorities: First Delimiter and than Length
Where as FM RKD_WORD_WRAP is not consistent.
THAT'
" For this first line Delimiter took preference
S DEFINITELY THE BETTER SOLUTION. D
IDN'T KNOW THAT ONE YET.
" For this last line, Length took preference
Regards,
Naimesh Patel