08-20-2007 4:24 PM
Can anyone please explain how to split a sentence at a comma, or space or hyphen in to words and capitalize the first letter of each word. But I don't know how many words the sentence contains.
08-20-2007 4:31 PM
HI,
data : begin of itab occurs 0,
words(40),
end of itab.
data : v_sentence(1000).
data : lv_firstchar.
split v_sentence at ',' into table itab.
loop at itab.
translate itab-words+0(1) to upper case.
modify itab index sy-tabix.
endloop.
08-20-2007 4:29 PM
08-20-2007 4:31 PM
HI,
data : begin of itab occurs 0,
words(40),
end of itab.
data : v_sentence(1000).
data : lv_firstchar.
split v_sentence at ',' into table itab.
loop at itab.
translate itab-words+0(1) to upper case.
modify itab index sy-tabix.
endloop.