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: 

Upper Case to Lower case in Scripts

Former Member
0 Kudos

Hi all

I have a field called SPELL-WORD and am using that field in my SAP SCRIPT throught the internal table as TA_FINAL-WORD.The problem is that am gettin the output in UPPER CASE but i want the output to be in LOWER CASE.Please help and i will b really thankful if u can provide me with the code

With regards

Vijay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Please use the TRANSLATE TO Lowercase.

/: PERFORM TRANSLATION IN PROGRAM '<YOUR REPORT>'

USING &SPELL_AMOUNT&

CHANGING &LOWERCASE&.

In report:

FORM adr_win TABLES in_par STRUCTURE itcsy

out_par STRUCTURE itcsy.

DATA: Spell_amount(40).

READ TABLE in_par WITH KEY 'SPELL_AMOUNT'.

CHECK sy-subrc = 0.

Spell_amount = in_par-value.

TRANSLATE Spell_amount TO LOWERASE.

READ TABLE out_par WITH KEY 'LOWERCASE'.

CHECK sy-subrc = 0.

out_par-value = Spell_amount.

MODIFY out_par INDEX sy-tabix.

ENDFORM.

Any further help pls revert.

Regards,

A.Singh

7 REPLIES 7

Former Member
0 Kudos

Hi

Check with the TRANSLATE command

TRANSLATE <string> lower case

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos

Hi Vijay,

Just use this code:

DATA text TYPE string.

text = `Careful with that Axe, Eugene`.

TRANSLATE text TO LOWER CASE.

0 Kudos

Hi sam

But can i use the DATA statement in the script

Vijay

0 Kudos

Hi

Why you need DATA statement

just write

TRANSLATE TA_FINAL-WORD TO LOWER CASE

and see the output

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos

Please use the TRANSLATE TO Lowercase.

/: PERFORM TRANSLATION IN PROGRAM '<YOUR REPORT>'

USING &SPELL_AMOUNT&

CHANGING &LOWERCASE&.

In report:

FORM adr_win TABLES in_par STRUCTURE itcsy

out_par STRUCTURE itcsy.

DATA: Spell_amount(40).

READ TABLE in_par WITH KEY 'SPELL_AMOUNT'.

CHECK sy-subrc = 0.

Spell_amount = in_par-value.

TRANSLATE Spell_amount TO LOWERASE.

READ TABLE out_par WITH KEY 'LOWERCASE'.

CHECK sy-subrc = 0.

out_par-value = Spell_amount.

MODIFY out_par INDEX sy-tabix.

ENDFORM.

Any further help pls revert.

Regards,

A.Singh

0 Kudos

Pls read FORM 'TRANSLATION' instead of FORM adr_win

Regards,

A.Singh

0 Kudos

Hi amarjit Thanks a lot