‎2007 Sep 04 12:33 PM
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,
‎2007 Sep 04 12:36 PM
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
‎2007 Sep 04 12:39 PM
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
‎2007 Sep 04 12:41 PM
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
‎2007 Sep 04 12:43 PM
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,
‎2007 Sep 04 12:48 PM
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
‎2007 Sep 04 12:38 PM
Goto the DOMAIN of that field & uncheck the LOWERCASE checkbox & activate it
‎2007 Sep 04 12:44 PM
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