10-21-2008 6:56 PM
Hi All,
I need to convert the upper/ lower case letters for a name into Initial letters capital.
e.x. input is : RAVI SHEKAR or ravi shekar
output should be Ravi Shekar
Is there any function module to solve this.
Thanks & regards,
Kranthi
10-21-2008 7:01 PM
Check FM: STRING_UPPER_LOWER_CASE
Other FM: SWA_STRING_TO_UPPERCASE
Like
call function 'SWA_STRING_TO_UPPERCASE'
exporting
input_expression = input_expr
preserve_existing_capitals = ' '
importing
output_expression = output_expr.
Regards,
Naimesh Patel
Edited by: Naimesh Patel on Oct 21, 2008 1:05 PM
10-21-2008 7:01 PM
Check FM: STRING_UPPER_LOWER_CASE
Other FM: SWA_STRING_TO_UPPERCASE
Like
call function 'SWA_STRING_TO_UPPERCASE'
exporting
input_expression = input_expr
preserve_existing_capitals = ' '
importing
output_expression = output_expr.
Regards,
Naimesh Patel
Edited by: Naimesh Patel on Oct 21, 2008 1:05 PM
10-21-2008 7:13 PM
Hi Naimesh,
When i try to execute the FM STRING_UPPER_LOWER_CASE
by giving values:
delimiter = space
input = RAVI SHEKAR
i am getting output as RaviShekar. I am not getting exact name. i mean i need to get as Ravi Shekar (same input format).
To get so what could be the input value for delimiter.
thanks
kranthi
10-21-2008 7:26 PM
Hi Kranthi,
Check out the
Funciton Moudle HR_P06I_CONVERT_TO_LOWERCASE
Just enter your name in the internal table it will give you the output as per your requirement.
Thanks,
Chidanand
10-21-2008 7:02 PM
Hi,
you can change them using PATTERN addition to Translate statement.
TRANSLATE text {TO {UPPER|LOWER} CASE}
| {USING pattern}.
try to check Help to get more on this.
Thanks,
Sree.
10-21-2008 7:03 PM
Hi Kranthi,
Translate is the keyword which is used to translate the case of alphabets
Check this simple example.
DATA: t(10) TYPE c VALUE 'AbCdEfGhIj',
string LIKE t,
rule(20) TYPE c VALUE 'AxbXCydYEzfZ'.
string = t.
WRITE string.
TRANSLATE string TO UPPER CASE.
WRITE / string.
string = t.
TRANSLATE string TO LOWER CASE.
WRITE / string.
string = t.
TRANSLATE string USING rule.
WRITE / string.
Cheers!!
Balu
10-21-2008 7:30 PM