Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Simple ABAP

Former Member
0 Likes
861

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

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
791

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

6 REPLIES 6
Read only

naimesh_patel
Active Contributor
0 Likes
792

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

Read only

0 Likes
791

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

Read only

0 Likes
791

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

Read only

Former Member
0 Likes
791

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.

Read only

Former Member
0 Likes
791

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

Read only

Former Member
0 Likes
791

Refer Naimesh's reply in this thread for: