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: 

Function module?

former_member243716
Active Participant
0 Kudos

Hi,

What is the function transforms tiny character in uppercase character?

Thanx in advance.

CV

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Converting to Upper or Lower Case or Replacing Characters

The TRANSLATE statement converts characters into upper or lower case, or

uses substitution rules to convert all occurrences of one character to

another character.

Converting to Upper or Lower Case

TRANSLATE text TO UPPER CASE.

TRANSLATE text TO LOWER CASE.

These statements convert all lower case letters in the field <c> to

upper case or vice versa.

Substituting Characters

TRANSLATE text USING pattern.

This statement replaces all characters in the text field according to

the substitution rule stored in pattern. pattern contains letter pairs

where the first letter of each pair is replaced by the second. pattern

can be a variable.

For more variants of the TRANSLATE statement with more complex

substitution rules (obsolete variants!), refer to the keyword

documentation.

DATA: t(10) TYPE c VALUE 'AbCdEfGhIj',

string LIKE t,

rule(20) TYPE c VALUE 'AxbXCydYEzfZ'.

string = t.

WRITE string.

TRANSLATE string TO UPPER CASE.

WRITE / string.

string = t.

TRANSLATE string TO LOWER CASE.

WRITE / string.

string = t.

TRANSLATE string USING rule.

WRITE / string.

Regards.

6 REPLIES 6

Former Member
0 Kudos

Converting to Upper or Lower Case or Replacing Characters

The TRANSLATE statement converts characters into upper or lower case, or

uses substitution rules to convert all occurrences of one character to

another character.

Converting to Upper or Lower Case

TRANSLATE text TO UPPER CASE.

TRANSLATE text TO LOWER CASE.

These statements convert all lower case letters in the field <c> to

upper case or vice versa.

Substituting Characters

TRANSLATE text USING pattern.

This statement replaces all characters in the text field according to

the substitution rule stored in pattern. pattern contains letter pairs

where the first letter of each pair is replaced by the second. pattern

can be a variable.

For more variants of the TRANSLATE statement with more complex

substitution rules (obsolete variants!), refer to the keyword

documentation.

DATA: t(10) TYPE c VALUE 'AbCdEfGhIj',

string LIKE t,

rule(20) TYPE c VALUE 'AxbXCydYEzfZ'.

string = t.

WRITE string.

TRANSLATE string TO UPPER CASE.

WRITE / string.

string = t.

TRANSLATE string TO LOWER CASE.

WRITE / string.

string = t.

TRANSLATE string USING rule.

WRITE / string.

Regards.

former_member181962
Active Contributor
0 Kudos

As Sravan mentioned, TRANSLATE is the statement that does what you want.

IN case you still want the FM: Here is it SWA_STRING_TO_UPPERCASE

Regards,

Ravi

Former Member
0 Kudos

hi,

TRANSLATE text TO UPPER CASE.

this will help you..

reward points if useful..

Former Member
0 Kudos

Check these FMs

2054_TRANSLATE_2_UPPERCASE

AIPC_CONVERT_TO_UPPERCASE

HR_99S_CONV_UPPER_CASE

K_CATT_CONVERT_UPPER_CASE

STRING_UPPER_LOWER_CASE

TERM_TRANSLATE_TO_UPPER_CASE

TR_UPPERCASE_PARTS_OF_STRING

SWA_STRING_TO_UPPERCASE

SWF_SWCONT_TO_UPPER_CASE

Reward points if useful.

former_member404244
Active Contributor
0 Kudos

Hi,

check teh FM " STRING_UPPER_LOWER_CASE".

regards,

Nagaraj

Former Member
0 Kudos

Hi,

data : str type string value 'sreekanth',

resstr type string.

CALL FUNCTION 'AIPC_CONVERT_TO_UPPERCASE'

EXPORTING

I_INPUT = str

I_LANGU = SY-LANGU

IMPORTING

E_OUTPUT = resstr.

write : / resstr.