Skip to Content

Displaying first letter as Capital

HI all,

I want to print the first letter as Capital in the word.

For ex: 'Five Hundred Twenty Five'.

We can print the sentence aither all capital/ small. But, hw can we print First letter as capital.

Is there any possibity to print like this.

If possible. How can we do it.

Can any one help me please.

Regards,

vinod

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 10, 2008 at 05:52 AM

    use this ISP_CONVERT_FIRSTCHARS_TOUPPER

    Import parameters Value

    INPUT_STRING murali poli

    SEPARATORS -.,;:

    Export parameters Value

    OUTPUT_STRING Murali Poli

    Reward points...

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      I am working on ECC6.0 as well and it shows in my system.Anyways,you can do this:

      data: pos like sy-fdpos,

      pos_max like sy-fdpos.

      field-symbols: <poi>, <hpoi>, <rest>.

      *

      check not input_string is initial.

      *

      call function 'ISM_CONVERT_TO_NORMAL_FORM'

      exporting

      input = input_string

      importing

      output = input_string.

      output_string = input_string.

      translate output_string to lower case. "#EC SYNTCHAR

      *

      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.

      where:

      INPUT_STRING TYPE C

      SEPARATORS TYPE C DEFAULT ' -.,;:'

      OUTPUT_STRING TYPE C.

      Hope this helps you.

      Reward if helpful.

      Thanks,

      Dishant

  • Apr 16, 2008 at 12:09 PM

    hi ..

    use function module 'STRING_UPPER_LOWER_CASE'

    Regards,

    vinod

    Add comment
    10|10000 characters needed characters exceeded