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 + uppercase; lowercase

Former Member
0 Likes
976

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,

7 REPLIES 7
Read only

Former Member
0 Likes
874

Hello,

before the select stmt use

<b>TRANSLATE TEXT TO LOWER CASE.</b>

Vasanth

Read only

Former Member
0 Likes
874

Hi Shah,

TRANSLATE Character conversion incharacter fields

Or

Check this Function Module,

HR_P06I_CONVERT_TO_LOWERCASE.

Thanks.

Reward If Helpful.

Read only

Former Member
0 Likes
874

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.

Read only

Former Member
0 Likes
874

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

Read only

kiran_k8
Active Contributor
0 Likes
874

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.

Read only

Former Member
0 Likes
874

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,

Read only

Former Member
0 Likes
874

Thanks kiran, it wroks for me too

Regards