Application Development and Automation 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: 
Read only

Convert variable having value 'MONDAY' to 'Monday'

vinay_pasalkar
Participant
0 Likes
3,326

Hi,

I have a variable of type CHAR length 250 having value 'MONDAY'

How can i convet it to value 'Monday' i.e. only first letter in caps.

Thanks

Vinay

Hi,

I have a variable of type CHAR length 250 having value 'MONDAY'

How can i convet it to value 'Monday' i.e. only first letter in caps.

Thanks

Vinay

12 REPLIES 12
Read only

Former Member
0 Likes
2,386

Hi,

use function module ISP_CONVERT_FIRSTCHARS_TOUPPER

YOUR PROBLEM SOLVED NOW..

Regs,

Lokesh.

Edited by: Lokesh Tarey on Apr 29, 2010 3:12 PM

Read only

0 Likes
2,386

Hi Lokesh,

I am getting the message Function module does not exist.

My version of SAP is 4.6.c

Thanks

Read only

Former Member
0 Likes
2,386

hi

do in this way

translate <variable name>+1(249) to lower case.

done .

reply for futher help.

Edited by: gaurav.singh on Apr 29, 2010 3:12 PM

Edited by: gaurav.singh on Apr 29, 2010 3:13 PM

Read only

Former Member
0 Likes
2,386

Which version of SAP are you using. In ECC 5.0 FM ISP_CONVERT_FIRSTCHARS_TOUPPER is not available.

Is your value 'MONDAY' in quotes?

It's better to use offset.

Read only

0 Likes
2,386

@Gaurav: translate <variable name>+1(249) to lower case

to lower case is not accepted. Can we use offset in TRANSLATE Keyword.

Read only

0 Likes
2,386

hi,

manas i didnt get wat is not accepted offset ??.

Read only

vinay_pasalkar
Participant
0 Likes
2,386

Not able to translate

Read only

0 Likes
2,386

Let us know your solution... I tried this way. Copy paste and check.

DATA : e_head TYPE c,
       e_tail(20) TYPE c,
       Res(13) type c.
CALL FUNCTION 'C147_STRING_SPLIT_AT_POSITION'
  EXPORTING
    i_string   = 'MONDAY'
    i_position = 1
  IMPORTING
    e_head     = e_head
    e_tail     = e_tail.

TRANSLATE e_tail TO LOWER CASE.
CONCATENATE e_head e_tail into res .

WRITE : res

.

Edited by: Mishra.Manas on Apr 29, 2010 3:36 PM

Read only

0 Likes
2,386

hi vinay ,

i m using this code and it is working fine.

wats problem in yours let me now.

TRANSLATE lv_city+1(24) to LOWER CASE

Thanks,

Gaurav.

Read only

0 Likes
2,386

Ya it is working. Thanks a lot for your help Gaurav.

Read only

vinay_pasalkar
Participant
0 Likes
2,386

It is working

Read only

Former Member
0 Likes
2,386

Moderator message - Please do not ask or answer basic questions - thread locked and points unassigned Rob