01-28-2008 11:22 AM
Hi,
What is the function transforms tiny character in uppercase character?
Thanx in advance.
CV
01-28-2008 11:25 AM
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.
01-28-2008 11:25 AM
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.
01-28-2008 11:27 AM
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
01-28-2008 11:27 AM
hi,
TRANSLATE text TO UPPER CASE.
this will help you..
reward points if useful..
01-28-2008 11:27 AM
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.
01-28-2008 11:29 AM
01-28-2008 11:44 AM
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.