05-31-2007 6:34 PM
I have a field in internal table and user might enter values in lower case.
I need to translate this to upper case to do my validations with ZTABLE data.
I can accomplish this inside loop
loop at itab
translate itab-field1 to upper case.
my mail issue is i need to sort this internal table by field1, field2 before i get to loop. Sort is having issues translating lower and upper case..
Is there any way that i can translate to upper case before sort statement ..( once i have internal table data , i need uppercase )
05-31-2007 6:36 PM
before translating sort ur internal table and then use loop endloop.
within loop and endloop use translate ( This is best way )
05-31-2007 6:43 PM
Hi Narendra,
You can do like this:
Decalre another interal table. loop the table into work area then translate the value of first field to upper case & append in the second table you declared. And the use the second table for sorting. Then you can assign the value of secnd table to first table by this statement:
itab[] = jtab[].
Reward poitns if helpful answer.
Ashven
05-31-2007 6:46 PM
You mentioned that it is a User input.. why don't you make the field of an UPPERCASE data type.. so that whatever case the user may enter, it is in upper case in the itab.
for ex: try the Data Type CVAUTH_NAME_UPPER_CASE.
~Suresh
05-31-2007 8:18 PM
Hi,
Thanks for your response.
The data comes from excel sheet and i cant control the users ...
05-31-2007 8:20 PM
In your Program you can define the field in your itab with the data type CVAUTH_NAME_UPPER_CASE.
~Suresh