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

converting a string to upper case

Former Member
0 Likes
26,100

hi there....

i have a requirement to convert a string from lower case to upper case... can anyone help regarding the same...

my overall requirement is to replace a string with another in a string. but during comaprison, the replace command checks for case also, which is not what i desire to have.

<<text removed>>

Edited by: Matt on Dec 18, 2008 2:12 PM - don't say thing that suggest people should hurry.

1 ACCEPTED SOLUTION
Read only

Former Member
10,759

TRANSLATE string TO UPPER CASE.

10 REPLIES 10
Read only

Former Member
10,760

TRANSLATE string TO UPPER CASE.

Read only

Former Member
0 Likes
10,759

Hi

data : ab type string value 'sap community network'.

TRANSLATE AB TO UPPER CASE.

Use UPPER CASE and take F1 help for more help.

Regards

Ramc

Hi Prem

Now you can close this thread as you got it

Please close it

Edited by: ramchander krishnamraju on Dec 18, 2008 12:25 PM

Edited by: ramchander krishnamraju on Dec 18, 2008 12:26 PM

Edited by: ramchander krishnamraju on Dec 18, 2008 12:30 PM

Read only

Former Member
0 Likes
10,759

hi,

u can use the translate statement

regards,

sathis

Read only

Former Member
10,759

Hi,

Plz try TRANSLATE: string_var TO UPPER CASE,

Read only

Former Member
0 Likes
10,759

Hi,

Check the FM: SWA_STRING_TO_UPPERCASE

Regards,

Bhaskar

Read only

Former Member
0 Likes
10,759

If eventually you need to replace the string then instead of Translating to Upper case you could also mention other possible patterns like:

USING 'Axax'

This will replace both A nad a with x.'

Read only

Former Member
0 Likes
10,759

If eventually you need to replace the string then instead of Translating to Upper case you could also mention other possible patterns like:

USING 'Axax'

This will replace both A nad a with x.'

Read only

Former Member
0 Likes
10,759

Hi Prem,

U can use TRANSLATE command.

Press F1 on translate u will get more details.

Read only

Former Member
0 Likes
10,759

You can use IGNORING CASE addition of REPLACE statement to avoid your problem.

If you still need to convert to Upper Case the solution is just a SCN-Search away.

Regards

Karthik D

Read only

Former Member
0 Likes
10,759

hi,

try this code for changing string into upper case:

data:v_name type string value 'sapabap'.

translate v_name to upper case.

write:/ v_name.