Skip to Content

PRint the Words in Capital Letter..

Dear Guru,

In Function Module I am Getting the Words is <b>TEN THOUSAND Rupees only</b>, Our user req is word should print in Capital letter, I mean <b>Rupees only</b> also should print in Capital letter...

Please Guide me.

Regards,

Thanuskodi T.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Nov 22, 2007 at 07:42 AM

    hi,

    use: TRANSLATE string TO UPPER CASE

    ec

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:42 AM

    Syntax Diagram

    TRANSLATE

    Syntax

    TRANSLATE text {TO {UPPER|LOWER} CASE}

    | {USING pattern}.

    Extras:

    1. ... TO {UPPER|LOWER} CASE

    2. ... USING pattern

    Effect

    This statement converts the case or single characters of the character-type data object text. The statement CASE can be used for the conversion to upper/lower case; USING can be used for the conversion according to a pattern. The variable text must be character-type.

    Note

    There are two obsolete variants of this statement:

    Addition 1

    ... TO {UPPER|LOWER} CASE

    Effect

    If you specify UPPER, all lower-case letters of the data object text are converted to upper case. If you specify LOWER, all upper-case letters are converted to lower case.

    Note

    The conversion of the upper/lower case depends on the text environment. Problems may occur if the language of the text environment differs from the language in which the data to be processed is entered. Data loss will occur if a conversion between the source and target language has not been defined. To avoid this type of inconsistency, you must appropriately set the text environment using the SET LOCALE statement prior to the conversion.

    Example

    After the conversion, the variable text contains "CAREFUL WITH THAT AXE, EUGENE".

    DATA text TYPE string.

    text = `Careful with that Axe, Eugene`.

    TRANSLATE text TO UPPER CASE.

    Addition 2

    ... USING pattern

    Effect

    If you specify USING, the characters in text are converted according to the rule specified in pattern. pattern must be a character-type data object whose contents are interpreted as a sequence of character pairs. text is searched for the first character of each pair, starting with the first pair, and each location found is replaced with the second character of the pair. The search is case-sensitive. If pattern contains a character multiple times as the first character of a pair, only the first pair is taken into account. A character in text that has already been replaced cannot be replaced again in the same TRANSLATE statement. Therefore, if the second character of a pair in pattern appears as the first character of a subsequent pair, the second pair affects only the original characters in text.

    Trailing blanks in data objects text and pattern are taken into account for data objects. If pattern contains an uneven number of characters, the last character is ignored. If pattern is a blank string, no replacements take place.

    Example

    Converts the characters "A" to "B", "a" to "b", and vice versa. text contains "Abracadabra" after the conversion.

    DATA text TYPE string.

    text = `Barbcbdbarb`.

    TRANSLATE text USING 'ABBAabba'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:46 AM

    Hi,

    w_char = 'TEN THOUSAND Rupees only'.

    w_char1 = w_char+13(10).

    w_char2 = w_char0(13).

    translate w_char1 into upper.

    concatenate w_char2

    w_char 1

    into w_char

    separated by space.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:47 AM

    Hi,

    w_char = 'TEN THOUSAND Rupees only'.

    w_char1 = w_char+13(10).

    w_char2 = w_char0(13).

    translate w_char1 into upper case.

    concatenate w_char2

    w_char 1

    into w_char

    separated by space.

    reward points if it helps

    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.