‎2007 Jun 15 11:45 AM
Hello Friends,
I am facing a problem:
I need to write a simple select satement, in on FM, :
My select statement was not working, however when I go directly to database, it works fine, and then in debug mode I found out that runtime environment automatically convert the value in uppercase. for example my FM recieved the value "Test", then when I read on table the runtime environment makes it "TEST", how I can avoid this issue ?
I cannot convert in lowercase, as "test" is also not working...
Regards,
‎2007 Jun 15 11:47 AM
Hello,
before the select stmt use
<b>TRANSLATE TEXT TO LOWER CASE.</b>
Vasanth
‎2007 Jun 15 11:48 AM
Hi Shah,
TRANSLATE Character conversion incharacter fields
Or
Check this Function Module,
HR_P06I_CONVERT_TO_LOWERCASE.
Thanks.
Reward If Helpful.
‎2007 Jun 15 11:51 AM
Hi,
If u are passing the value to a FM, then there is a check box
"Upper/lower case".
Check this check box.
Rgds,
Prakash.
‎2007 Jun 15 11:51 AM
hi shah,
check in the domain of that field if the <b>Lowercase</b> checkbox is checked for that field, i think this is not checked for that field, if that is a Z domain then you can check that to avoid that error or
follow Vasanths solution
‎2007 Jun 15 11:59 AM
Shah,
Say thanks to Himanshu Agarwal,who helped me with this program long back.
&----
*& Report ZKK12
*&
&----
ALL THE BEST IS SHOWN AS All The Best.
*&
*&
&----
REPORT ZKK12.
data:begin of itab occurs 0,
str(35),
END OF ITAB.
data : str type string value 'ALL THE BEST ? '.
*data : str type string value 'all the best ? '.
SPLIT str AT SPACE INTO TABLE ITAB.
loop at itab.
CALL FUNCTION 'STRING_UPPER_LOWER_CASE'
EXPORTING
DELIMITER = ' '
STRING1 = ITAB-STR
IMPORTING
STRING = ITAB-STR
EXCEPTIONS
NOT_VALID = 1
TOO_LONG = 2
TOO_SMALL = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MODIFY ITAB index sy-tabix.
ENDLOOP.
clear str.
loop at itab.
concatenate str itab-str into str separated by space.
endloop.
write:/ str.
‎2007 Jun 15 12:04 PM
hello,
You guys, I dont want to make it lowercase, I want it remains as it is, as I mentioned, if the value is Test, then it should remain Test, and not using lowercase, test ?
Regards,
‎2007 Jun 15 12:22 PM