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

Lower case to upper case

Former Member
0 Likes
995

Hi,

I've a text in a variable

eg: gv_text = 'five thousand six thirty six rupees fifty paisa'.

How to convert the first letter of each word to uppercase.?

Five Thousand Six Thirty Six Rupees Fifty Paisa

thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
962

hii

check Rich's sample code in following link

[Lower case to upper case|;

regards

twinkal

7 REPLIES 7
Read only

JozsefSzikszai
Active Contributor
0 Likes
962

hi,

I am not sure this is the simpliest way, but you can give a try:

SPLIT strint AT ' ' INTO itab. "each word will be a single line in internal table
LOOP AT itab.
TRANSLATE itab-line(1) TO UPPERCASE. "comvert the first character to uppercase
MODIFY itab.
ENDLOOP.
CONCATENATE itab INTO string SEPARATED BY space.

hope this helps

ec

Read only

Former Member
0 Likes
962

Syntax for translate :

TRANSLATE str to upper case.

Regards,

Aparna Gaikwad

Read only

Former Member
0 Likes
963

hii

check Rich's sample code in following link

[Lower case to upper case|;

regards

twinkal

Read only

Former Member
0 Likes
962

hi

refer to this link [FM fo case change|;

Cheers

Snehi

Read only

Former Member
0 Likes
962

HI

Use TRANSLATE 'hello' to upper case.

~hitesh

Close this thread if your query is solved

Read only

Former Member
0 Likes
962

Hi,

You can use a function:

CAPITALW (string).

It will capitalise your string.

Hope it helps.

Regards

Natasha garg

Read only

Former Member
0 Likes
962

Hi,

Please check the following threads

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb33a5358411d1829f0000e829fbfe/frameset.htm

Hope this solves your problem

Manish