cancel
Showing results for 
Search instead for 
Did you mean: 

how to display uppercase letters to lower case in scripts

Former Member
0 Kudos

Hi ALL,

can any one suggest me as how to display the upper case letter to LOWER case in scripts.

i have a field which i added in scripts for eample ;

&itab-txt01&

which display the output as : ' MAULREN'.

now i want to display it as : 'maulren'.

please suggest

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Sri,

You can use the following Function Module in the driver program itself.

ISM_CONVERT_TO_LOWER_CASE

Give the Input Parameter as itab-txt01 (E.g. MAULREN), ur variable

and declare another variable

E.g. v_temp and give it as the export parameter to the function module

after the function module is executed, the value of v_temp will be maulren

later u can simply write itab-txt01 = v_temp.

this will assign the lowercase word to ur itab field and u can print it in ur script as usual &itab-txt01&

Since It is a Name and u may want the 1st alphabet as Capital then u can also try the function module

HR_P06I_CONVERT_TO_LOWERCASE

I hope the above steps will help to resolve ur query

Regards,

Radhika

Former Member
0 Kudos

This message was moderated.

former_member585060
Active Contributor
0 Kudos

HI,

Just create a Separate Paragraph format, in that Pragraph format, click on on Outline button, there you will find a check box for Uppercase, select that. Now use that Paragraph format to display.

Regards

Bala Krishna

Former Member
0 Kudos

Hi all,

the data is taken from the structure as i have no option to write a routine.

is there any possibilty of making it to display in lower case like 'M.Lauren'.

I mean &itab-txt01( ? ) & which make it display in above format.

former_member194416
Contributor
0 Kudos

you can also use translate command for this in the program you call script search translate in help documentation.

Former Member
0 Kudos

Hi all,

the data is taken from the structure as i have no option to write a routine.

is there any possibilty of making it to display in lower case like 'M.Lauren'.

I mean &itab-txt01( ? ) & which make it display in 'M.Lauren'.

Former Member
0 Kudos

You can write a subroutine to achieve your requriments. Below is the sample code.

Code to be written in script

Perform convert_case in program ztest

Using &var1&

Changing &var2&

endperform

code to be written in program ztest

FORM convert_case TABLES p_input_table STRUCTURE itcsy

p_output_table STRUCTURE itcsy.

READ TABLE p_input_table WITH KEY name = u2018VAR1 (should be in uppercase).

If sy-subrc = 0.

l_var1 = p_input_table-value

Endif.

convert the value of var1 in lowercase

READ TABLE p_output_table WITH KEY name = u2018VAR2'

IF sy-subrc = 0.

MOVE l_var1 TO p_output_table-value.

MODIFY p_output_table INDEX sy-tabix.

Endif.

Endform.

Former Member
0 Kudos

Hi all,

the data is taken from the structure as i have no option to write a routine.

is there any possibilty of making it to display in lower case like 'M.Lauren'.

I mean &itab-txt01( ? ) & which make it display in 'M.Lauren'.

Former Member
0 Kudos

Hi,

Try with below FM

ISM_CONVERT_TO_LOWER_CASE

This will convert Upper case to Lower Case

Former Member
0 Kudos

Hi all,

the data is taken from the structure as i have no option to write a routine.

is there any possibilty of making it to display in lower case like 'M.Lauren'.

I mean &itab-txt01( ? ) & which make it display in 'M.Lauren'.