Application Development 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: 

How to get Propper Alphabetical Case in ABAP Program?

akjayaa
Explorer
639

Hi Experts,

Good Evening! amount-in-words.png

I got a requirement to convert the Alphabetical case in Propper manner.

I have tried upper case and lower case both are working fine but proper case is not working.

I have tried many ways, but it is not help full. So kindly do the need full action.

  • Eg:-

Result:- FOUR LAKH TWENTY ONE THOUSAND FOUR HUNDRED EIGHTEEN Rupees NINETY TWO Paise

Expectation:- Four Lakh Twenty-One Thousand Four Hundred Eighteen Rupees Ninety-Two Paise

Thank You!

1 ACCEPTED SOLUTION

Shruthi29
Explorer
513

Hi Jayaprakash AK,

You can use the Class CL_HRPAYUS_FORMAT_STRING .

Thanks.

6 REPLIES 6

adityaIngale
Active Participant
0 Kudos
513

Hi akjayaa,

You can use FM 'FI_CONVERT_FIRSTCHARS_TOUPPER'.

Shruthi29
Explorer
514

Hi Jayaprakash AK,

You can use the Class CL_HRPAYUS_FORMAT_STRING .

Thanks.

513

Method 'CONV_FIRST_CHARS_TO_UPPER_CASE'.

ThorstenHoefer
Active Contributor
0 Kudos
513

Hi,

try:

write to_mixed( 'HELLO WORLD' ).

0 Kudos
513

Output = 'Hello world'.

Expected Output = 'Hello World'.

Sandra_Rossi
Active Contributor
0 Kudos
513

No need to include a screenshot of the text you post. Everyone has clicked the image for no added value, just time and finger energy lost...

I guess nobody noticed, but do you really want to add the hyphen between Twenty and One, and between Ninety and Two, or is it fine to have just a space instead of hyphen?

The conversion is easy with PCRE, but do you have ABAP 7.55 or more recent?