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

upper case / lower case issue

Former Member
0 Likes
4,742

Hello Friends,

I am facing following issue:

In database sometime one field contains values in lowercase or sometime in upper case. then while reading the table, the runtime environment automatically conver the import parameter in upper case and while reading the record in select statement I get subrc eq 4.

Any idea how I can fix this issue ( means force runtime environment not to translate the importing parameter in my fm to uppercase ) ....

Regards,

7 REPLIES 7
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,407

Hi,

The problem seems to be WITH DOMAIN Of the field that you use.

The DOMAIN of the filed in Database is Case sensitive where as your IMPORT parameter's DOMAIN is not case sensitive.

In SE11 open both domains and see if check box "Lower case" is checked for both the domains.

CASE will only be respected when you mark your DOMAIN as case sensitive by checking the CHECK BOX "Lower case' for the domain.

Regards,

Sesh

Read only

0 Likes
1,407

Hi,

Both domains are same i.e "VARIANT" and the lowercase checkbox is not marked.....

in fm the importing parameter is also of type "variant"

Regards,

Message was edited by:

Shah H

Read only

0 Likes
1,407

Hi,

If both the domains are same there Database cannot have the values in Lower case. It has to store the data in UPPER CASE. So if you read the database then it will give you in UPPER CASE.

May be you can try running the SQL trace(ST05) and see what is the query that is getting excuted.

Regards,

Sesh

Read only

0 Likes
1,407

in se16 I can see the data contents stored in lowercase or sometimes in uppercase , and same issue is while reading the data ( when in se16 i try to select the variant which is stored in database in lowercae, It says no data found, because when I type the variant in se16 in lowercase it automatially convert it into upper case....

any idea, why ?

Regards,

Read only

0 Likes
1,407

Hi,

The thing when you use a DOMAIN with "Lower case" not checked. What ever you input on the screen will be automatically converted to UPPER CASE.

So donot use Se16 to read instead try write a SELECT query and check what happens.

If you use SELECT query then you can avoid this Automatic conversion to upper case.

Regards,

Sesh

Read only

Former Member
0 Likes
1,407

Goto the DOMAIN of that field & uncheck the LOWERCASE checkbox & activate it

Read only

Former Member
0 Likes
1,407

Hi shah,

To ignore the case in select statement , you can try something liek this if it works for you

DATA:

lt_range TYPE RANGE OF ztable-txt,

ls_range LIKE LINE OF lt_range.

ls_range-sign = 'I'.

ls_range-option = 'EQ'.

ls_range-low = 'abc'.

APPEND ls_range TO lt_range.

<b>TRANSLATE ls_range-low TO UPPER CASE.</b>

APPEND ls_range TO lt_range.

SELECT * from ztable
                into table itab
                where txt in lt_range.   " this will ignore the case