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

Upper Case to Lower case in Scripts

Former Member
0 Likes
1,036

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
Read only

Former Member
0 Likes
876

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
Read only

Former Member
0 Likes
876

Hi

Check with the TRANSLATE command

TRANSLATE <string> lower case

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
876

Hi Vijay,

Just use this code:

DATA text TYPE string.

text = `Careful with that Axe, Eugene`.

TRANSLATE text TO LOWER CASE.

Read only

0 Likes
876

Hi sam

But can i use the DATA statement in the script

Vijay

Read only

0 Likes
876

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

Read only

Former Member
0 Likes
877

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

Read only

0 Likes
876

Pls read FORM 'TRANSLATION' instead of FORM adr_win

Regards,

A.Singh

Read only

0 Likes
876

Hi amarjit Thanks a lot