FM to translate first letter of every word to upper case.

Hi all,
I have a requirement to change the first letter of every word in sentence to Upper case.For example if the sentence is 'fifty eight thousand' it has to be changed to 'Fifty Eight Thousand'.Is there any FM to acheive this? Any help would be highly appreciated.
Thanks and Regards
Kiran.

it is useful for u :
FM:ISP_CONVERT_FIRSTCHARS_TOUPPER
OR u can user below code:
translate output_string to lower case.                 
  pos_max = strlen( output_string ) - 1.
  pos = 0.
  assign output_string+pos(1) to <poi>.
  assign input_string+pos(1)  to <hpoi>.
  <poi> = <hpoi>.
  assign input_string+pos(*) to <rest>.
  while <rest> ca separators.
    pos = pos + sy-fdpos + 1.
    if pos > pos_max. exit. endif.
    assign output_string+pos(1) to <poi>.
    assign input_string+pos(1)  to <hpoi>.
    <poi> = <hpoi>.
    assign input_string+pos(*) to <rest>.
  endwhile.

Similar Messages

  • How to Capitalize the First Letter in Every Word in Mysql

    Hi,
    I have been trying to tidy up a massive database where visitors have been sloppy when entering text. The main thing I want to do is to Capitalize The First Letter In Every Word In Mysql.
    I have found the code below in PHP but it keeps finding an error on the WHILE line:
    <?php ini_set('display_errors', '1'); ?>
    <?php require_once('Connections/maison_connection.php'); ?>
    <?php
    $result = mysql_query ("SELECT column, id FROM table");
    while ($row = mysql_fetch_array($result)) {
    $id = $row["id"];
    $column2 = ucwords($row["column"]);
    $query2 = "UPDATE table SET column = '$column2′ WHERE id = '$id'";
    mysql_query($query2);
    ?>
    My table is called MailingList and the Column is called Name, so I have altered the script to this: but it still shows the same WHILE error:
    <?php ini_set('display_errors', '1'); ?>
    <?php require_once('Connections/maison_connection.php'); ?>
    <?php
    $result = mysql_query ("SELECT Name, id FROM MailingList");
    while ($row = mysql_fetch_array($result)) {
    $id = $row["id"];
    $Name2 = ucwords($row["Name"]);
    $query2 = "UPDATE MailingList SET Name = '$Name2′ WHERE id = '$id'";
    mysql_query($query2);
    ?>
    Any ideas??

    I got it to work this way in SQL: I am SURE there is an abbreviated way to do it, but at least it works
    UPDATE MailingList SET Name = replace(Name," a"," A");
    UPDATE MailingList SET Name = replace(Name," b"," B");
    UPDATE MailingList SET Name = replace(Name," c"," C");
    UPDATE MailingList SET Name = replace(Name," d"," D");
    UPDATE MailingList SET Name = replace(Name," e"," E");
    UPDATE MailingList SET Name = replace(Name," f"," F");
    UPDATE MailingList SET Name = replace(Name," g"," G");
    UPDATE MailingList SET Name = replace(Name," h"," H");
    UPDATE MailingList SET Name = replace(Name," i"," I");
    UPDATE MailingList SET Name = replace(Name," j"," J");
    UPDATE MailingList SET Name = replace(Name," k"," K");
    UPDATE MailingList SET Name = replace(Name," l"," L");
    UPDATE MailingList SET Name = replace(Name," m"," M");
    UPDATE MailingList SET Name = replace(Name," n"," N");
    UPDATE MailingList SET Name = replace(Name," o"," O");
    UPDATE MailingList SET Name = replace(Name," p"," P");
    UPDATE MailingList SET Name = replace(Name," q"," Q");
    UPDATE MailingList SET Name = replace(Name," r"," R");
    UPDATE MailingList SET Name = replace(Name," s"," S");
    UPDATE MailingList SET Name = replace(Name," t"," T");
    UPDATE MailingList SET Name = replace(Name," u"," U");
    UPDATE MailingList SET Name = replace(Name," v"," V");
    UPDATE MailingList SET Name = replace(Name," w"," W");
    UPDATE MailingList SET Name = replace(Name," x"," X");
    UPDATE MailingList SET Name = replace(Name," y"," Y");
    UPDATE MailingList SET Name = replace(Name," z"," Z");

  • Making the first letter of every word a capital

    hello CF oracles
    could you guys please advise me the best way to make the
    first letter in every word of a string a capital letter. (and make
    all the other letters lower case).
    eg. convert "the quick brown fox" into "The Quick Brown Fox"
    or convert "THE QUICK BROWN FOX" into "The Quick Brown Fox"
    I am taking form data and inserting it into my table, so i
    want to get it right as the data is inserted.
    i found a "UDF" on CFLIb.org that proports to do this, but i
    don't know how to set up a UDF, are there other ways or is this
    considered the best approach.
    http://www.cflib.org/udf.cfm?id=9&enable=1
    thanks for any help you can give me

    found it, here's the top info, Titlecase is what you want for
    this.:
    changecase.cfm
    Rev 1.01
    cf_changecase is a simple custom tag to format case in given
    string.
    (c) 2001, Rizal Firmansyah, [email protected]
    Input var:
    * case (mandatory)
    possible inputs are
    - sentencecase: Sentence case (default)
    - titlecase: Title Case
    - lowercase: lowercase
    - uppercase: UPPER CASE
    "happysailingdude" <[email protected]> wrote
    in message
    news:e46tjv$e30$[email protected]..
    > hi Dan thanks very much. I have made an executive
    decision to do a bit of
    > a
    > hack for now as my site is only small so if a user
    enters something in the
    > wrong way i can quickly manually update it myself.
    >
    > so now i have this which works 9 times out of ten if the
    user enters a one
    > word name eg "bill" or "fred" of "jane" then it works
    just fine
    >
    > the only time it doesnt work is if the user's name is
    more than 1 word (or
    > is
    > hyphenated) eg "mary anne" or "anne-marie" hence the
    first cfif line - in
    > these
    > cases i can manually update
    >
    > i put this here in case it is of use to anyone else
    >
    > cheers
    >
    > <cfif not (FORM.firstName contains " " or
    FORM.firstname contains "-")>
    > '#Left( UCase( "#FORM.firstName#" ), 1 )##Right( LCase(
    > "#FORM.firstName#" ), Len("#FORM.firstName#" ) - 1 )#'
    > <cfelse>
    > '#FORM.firstName#'
    > </cfif>
    >

  • Is there a way to auto capitalize the first letter of every word?

    I Like To Type In This Way. I Was Wondering If There Is A Setting That Will Automatically Capitalize The First Letter Of Each Word So That I Don't Have To Keep Hitting Shift Before Each First Letter.
    Thank You

    AdamMarshall wrote:
    Nice to see so many 'helpful' responses.
    This casing is useful for example, on an Address field. It would be good if the OS had this option for developers.
    I'm pretty sure it does as I've certainly had apps that, in certain fields, do use title case.

  • Is their a way to turn on auto-capitalization of the first letter of every word??

    i want da first letter to be in caps without me pressing caps lock or using shift
    i.e Like This But Without Using Those Two Keys

    There have been some threads here about large-scale deployment, but I don't know whether they would help after Firefox has been installed.
    Random thought:
    I suspect (but haven't checked) that changing the "Clear Recent History" options would add corresponding entries to prefs.js in the user's profile folder. (These usually are added during Firefox shut-down.) That's just a plain text file and you could append to it by a variety of means.
    It might be possible to use a VBScript during logon to update that file before the user starts Firefox. The script would have to detect the random folder name(s) in order to make the update.

  • Can iTunes capitalize the first letter of every word?

    I know there are id3 tag software for this but they are confusing and all that i have tried have all messed up my music. I like it organized. I just want everythign capitalized and if I look at my music in windows explorer i just want to see...
    Tr# Title
    01 Stairway To Heaven
    I have it all organized in folders so i dont need anything else. But i just want to capitalize everything can itunes do this? thanks.

    Try searching VersionTracker for "tag editor" and perhaps you'll come up with something you can use.
    Oh, and I really don't mean this as a flame, but you waited less than twelve hours, most of those being the wee hours of the morning in the US. So you weren't likely to get a response during those times. Just to set expectations for future posts. Cheers.
    Message was edited by: Dave Sawyer

  • How to capitalize the first letter of each  word in a sentence?

    Can anyone please explain how to split a sentence at a comma, or space or hyphen in to words and capitalize the first letter of each word. But I don't know how many words the sentence contains.

    HI,
    data : begin of itab occurs 0,
             words(40),
             end of itab.
    data : v_sentence(1000).
    data : lv_firstchar.
    split v_sentence at ',' into table itab.
    loop at itab.
    translate itab-words+0(1) to upper case.
    modify itab index sy-tabix.
    endloop.

  • Is there a command to capitalize the first letter of each word?

    That is to say, can you capitalize the first letter of each word in a document like say, word? Or using the net?
    Thanks guys.
    (hope that makes sense.)

    Select the text, then Format->Change Case->Title Case (Word 2004).

  • Apple wireless keyboard misses first letter in some words

    When I am typing, particularly in Word 2011, with my Apple Wireless Keyboard, it frequently does not type the first letter of a word.  I have searched and can find no resolution to this problem.  I have messed with Accessibility but that is all turned off.  The only other bluetooth device is my mouse.

    Hi,
    Thanks for this. It isn't the computer though, as it will happen very quickly. For example I can type in a web address, then look up to read the web page for 20 seconds or so, then if I type again it will miss the first key stroke.
    I am starting to get used to typing the first letter twice!
    I can see that it is a widely reported issue with Apple Macs, but I can't find a fix for Windows. I am keen not to have to buy a new keyboard!
    T23

  • Replacing first Character of every word in a string with an Uppercase

    Hi,
    Is it possible to replace all first character of every word in a string with UpperCase?
    $="autocad lite"
    Should look "Autocad Lite" .
    Thanks,
    François

    Hi FRacine,
    Please refer to the script below:
    $givenname="autocad lite"
    $givenname
    $givenname = $givenname.substring(0,1).toupper()+$givenname.substring(1)
    $givenname
    Edit: to change first character in every word, please refer to this script, this may not be the best way, but it can work:
    $givenname="autocad lite"
    $givenname
    $words=$givenname.split(" ")
    $givenname=""
    foreach ($word in $words){
    $givenname+=$word.substring(0,1).toupper()+$word.substring(1)+" "}
    $givenname=$givenname.trim()
    $givenname
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Extract First letter from each word

    Hi All,
    I have a requirement to extract first letter of each word as shown in below example
    input: abcd output: a
    input: abcd efgh output: ae
    input: abcd efgh ijkl output: aejany help will be highly appreciated
    I am on db version 11g

    jeneesh wrote:
    Just a note - This will not take care of spaces at the end of the line..You're right, and not just spaces but any non-word characters. Here is fixed solution:
    with t as (
               select 'abcd ' str from dual union all
               select 'abcd efgh.' from dual union all
               select 'abcd efgh ijkl,' from dual union all
               select ' a abcd efgh ijkl! ' from dual
    select  str,
            '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      from  t
    STR                 INITIALS
    abcd                [a]
    abcd efgh.          [ae]
    abcd efgh ijkl,     [aei]
    a abcd efgh ijkl!  [aaei]
    SQL> BTW, oldie_63's solution takes care of spaces but not:
    with t as (
               select ' abcd' str from dual union all
               select '.abcd efgh' from dual union all
               select ',abcd efgh ijkl' from dual union all
               select '! a abcd efgh ijkl' from dual
    select  str,
            '[' || trim(regexp_replace(str,'(\S)\S*\s*','\1')) || ']' initials
      from  t
    STR                INITIALS
    abcd              [a]
    .abcd efgh         [.e]
    ,abcd efgh ijkl    [,ei]
    ! a abcd efgh ijkl [!aaei]
    SQL> Also, OP needs to clarify what to do with hyphenated words:
    SQL> with t as (
      2             select 'sugar-free' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR        INITIALS
    sugar-free [sf]
    SQL> with t as (
      2             select 'sugar-free' str from dual
      3            )
      4  select  str,
      5          '[' || trim(regexp_replace(str,'(\S)\S*\s*','\1')) || ']' initials
      6    from  t
      7  /
    STR        INITIALS
    sugar-free [s]
    SQL>Or words like:
    SQL> with t as (
      2             select 'O''Reily' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR     INITIALS
    O'Reily [OR]
    SQL> with t as (
      2             select 'O''Reily' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR     INITIALS
    O'Reily [OR]
    SQL> SY.

  • Uppercase first letter of every new sentence

    Hi Guys,
    I am working on a design for a magazine for which, at the moment, I need to type a lot of the texts in InDesign instead of copy-pasting them from word or...
    This made me a little annoyed since I don't get to uppercase each first letter of each sentence automatically like Word etc. do?
    So: how can I automatically uppercase the first letter of each new sentence?
    Many thanks,
    Bob

    Unbelievable that I only found this now and that it is that simple!
    Thanks!!

  • I don't want the first letter of every line to be capitalized

    When I try to put in user id's and passwords on web sites, I don't always want the first letter to be capitalized.  How do you make the Ipad stop doing this?

    Settings -> General -> Keyboard
    Turn off Auto-Capitalization.
    Regards.

  • Getting the autocomplete setting to work by typing the first letter of a word

    Before I installed Firefox 5.0, I had made it so that whenever I visited a website that remembered an account/password of mine, this happened:
    1.- It asked for my master password.
    2.- After entering it, I would click on the form field and then type in the FIRST LETTER of the account.
    3.- When entering that exact first letter, Firefox would suggest in a drop-down menu the account or accounts that started with that letter on that particular site, e.g.: say I have a Twitter account that is "koko999". If I went to twitter.com and entered the letter "k" in the form field (after entering the master password), Firefox would suggest the account "koko999" in the drop-down menu.
    4.- After selecting the account that I desired from the drop-down menu, Firefox would automatically autocomplete the password.
    5.- Then, if I closed Firefox, all my active accounts would close/sign out. So, if afterwards I opened Firefox, I would have to repeat from Step 1 if I wanted to use an account, e.g.: if I closed FF while having my Twitter account logged in, and then opened FF again, I would have to start from Step 1.
    Now, I had this setting for a bunch of different websites. After installing Firefox 5.0, this configuration vanished or something. Now, when entering the master password, Firefox autocompletes EVERYTHING. Say, using the example from before, that I go to twitter.com. Firefox asks for the master password, I enter it and then the ID/password for the twitter account automatically fills in without me entering any letter in the form field. And I do not want Firefox to do that!
    So, I'm asking for help. I know that what I what to do is not impossible, I just can't find the way to do it! I kinda need the exact steps. Thanks a lot!

    See:
    * http://kb.mozillazine.org/Password_only_filled_after_entering_user_name
    * http://kb.mozillazine.org/signon.autofillForms (false)
    If you are in Private Browsing then Firefox wont fill the names and passwords automatically.
    You can set the pref <b>browser.sessionstore.privacy_level</b> to 2 (never) or 1 (non-HTTPS, default in Firefox 3 versions) on the <b>about:config</b> page to disable saving cookies via session restore.
    * http://kb.mozillazine.org/browser.sessionstore.privacy_level
    You can also use [[Clear Recent History]] to clear the "Active Logins" when you close Firefox.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    You can use the Filter bar at to top of the about:config page to locate a pref more easily.

  • First letter Capital of every word in a expression

    Hi Experts,
    I am trying to do a check using the match_regex to check in a expression if the first letter of every word are in capital.
    If it find all staring letter in capital for every word in an expression then only it should return 1 else 0
    Can anybody guide me on this.
    Example : I Will Go Home - should return 1
                      I will go home   - should return 0

    $num = 1;
    while(word($inputstr,$num) != NULL)
    begin
    if(word($inputstr,$num) != init_cap(word($inputstr,$num)))
    begin
    return 0;
    end
    $num = $num + 1;
    end
    return 1;

Maybe you are looking for

  • Problems embedding Japanese font

    I'm having problems embedding the font Ryumin-light. It's a Japanese font that is not essential to my document but I'm placing a PDF file that uses the font. I get the message that it can't be embedded at preflight. I don't have the full version of t

  • 2.0 fails to make uConnect connection on my 2008 Jeep Cherokee

    Just upgaded my iPhone to 2.0 and I cannot use it anymore through my car uConnect system. The older version of the Bluetooth software in the iPhone worked flawlessly with uConnect--- now it does not work. iPhone pairs with uConnect but does not make

  • I can't download acrobat.

    I press the download button on https://creative.adobe.com/products/acrobat and it brings up my adobe application manager but acrobat isn't there to install. Any ideas? I have creative cloud paid up. Thanks in advance.

  • When I swipe the home page the apps are staying and being superimposed by the next page of apps.

    why do the apps from the home page stay on the screen when swiping to another page of apps? It appears the home screen is locked and the other apps are then superimposed over them.

  • About e-commerec

    Please tell me what is e-commerece, what software, conecpts requirements are nedded to become an e-commerece professional, i am an oracle certified professional for oracle developer 2000 track ver.2 thanking you for your kind help Zahid Iqbal Note: p