Skip to Content
author's profile photo Former Member
Former Member

converting a string to upper case

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. 😊

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

10 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:23 AM

    TRANSLATE string TO UPPER CASE.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:25 AM

    Hi,

    Plz try TRANSLATE: string_var TO UPPER CASE,

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2008 at 11:23 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:24 AM

    hi,

    u can use the translate statement

    regards,

    sathis

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:26 AM

    Hi,

    Check the FM: SWA_STRING_TO_UPPERCASE

    Regards,

    Bhaskar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:29 AM

    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.'

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:29 AM

    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.'

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:33 AM

    Hi Prem,

    U can use TRANSLATE command.

    Press F1 on translate u will get more details.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:35 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:39 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.