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: 

Translate internal table field to upper case

Former Member
0 Kudos

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 )

5 REPLIES 5

Former Member
0 Kudos

before translating sort ur internal table and then use loop endloop.

within loop and endloop use translate ( This is best way )

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

Hi,

Thanks for your response.

The data comes from excel sheet and i cant control the users ...

0 Kudos

In your Program you can define the field in your itab with the data type CVAUTH_NAME_UPPER_CASE.

~Suresh