Application Development and Automation 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: 
Read only

SELECT-OPTION

Former Member
0 Likes
1,319

Hi all,

selection-screen begin of block

select-option name user02-NAME.

END OF SELECTION-SCREEN

I WANT VALIDATE NAME FIELD

in the database name field contains both uppercase and lower caserecords

support user enter lower case record in the name field

but in the database it has upcase record

how to validate the case sensitive for name feld in the selection screen

Plz send the reply or sample code for this

i look forward to your reply

Thanks & Regards

SEK

8 REPLIES 8
Read only

Former Member
0 Likes
1,136

Hi,

Just declare Select opton like this,

select-options name for user02-name LOWERCASE.

Then it will be case sensitive, it will take both upper and lower case letters

Sreedhar

Read only

Former Member
0 Likes
1,136

if u use select-option name user02-NAME no need to specify, but when user enters name and press execute it gets converted to upper case automatically....so, the data ur fetching from database, modify this data to uppercase and then compare with the selection-screen option...

Read only

suresh_datti
Active Contributor
0 Likes
1,136

Use the TRANSLATE TO UPPER CASE & then compare..

~Suresh

Read only

Former Member
0 Likes
1,136

hi,

Give this way ..

<b>

select-option name user02-NAME UPPERCASE.

</b>

Regards,

Santosh

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,136

Translate the values in the Select-option to uppercase. Then validate.

Loop at name.
  translate name-low to upper case.
  translate name-high to upper case.
  modify name.
endloop.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,136

Hi Raja,

You can use TRANSALTE TO UPPER CASE/LOWER CASE to change a string from upper to lower case and vice versa. Are you going to do a select using the name that user enters or is it just a user id?

checkout the domain of user02-name, there should be a check box lower case. IF this is checked then data in DB will be as we enter it (both lower case or upper case). If it is not checked then its always stored in upper case -- this case is easy since you can translate what ever user enters to UPPER CASE and do a select on DB. But if the data can be either in lower/upper or both then you might have to do little bit more work.

Hope this information helps.

Cheers

Read only

Former Member
0 Likes
1,136

Hi,

convert the string entered into upper case using

s_name2 = s_name1.

translate s_name2 into uppercase.

Now write ur select this way

select X Y Z from user02 where name in s_name1 or s_name2.

hope this gives u an idea.

regards,

keerthi

Read only

Former Member
0 Likes
1,136

Validate it against view USER_ADDR, field MC_NAMELAS. This is how SAP does it in search helps.

Rob