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

Question reg. table

Former Member
0 Likes
742

Hi,

A table has 3 fields. One is a key and the other non-key and the other is mandt.

I maintained custom entries in a table as for ex: 'Program' and 'Report'. I wrote a custom function module to pull records from this table. I tried testing the function module to retrieve the records from this table based on a field = 'Program'. But the sy-subrc is NE 0 !

The reason: I went in debugging mode and see what's happening. Looks like the query is being done based on 'PROGRAM' even though I input 'Program'. Can you help me out on how can I do the succesful query and get exactly what I want based on the values I input instead of having problem with those CAPS?

Thanks for your input.

Message was edited by:

Krishen

Message was edited by:

Krishen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
719

In SE37 there is a check box for "Uppercase/Lower case" use that. This preserves case sensitivity. During programmatic calling, this upper case conversion doesn't happen

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
719

Ahh... it is being converted to uppercase, yes? I would suggest entering your values in your custom table as uppercase and force this during update of the table. You can do this at the domain level, where you would not set the "Lowercase" checkbox. Program names should always be stored as uppercase since SAP makes no distinct between upper and lower case when storing program names. They are simply always stored as upper case.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
720

In SE37 there is a check box for "Uppercase/Lower case" use that. This preserves case sensitivity. During programmatic calling, this upper case conversion doesn't happen

Read only

0 Likes
719

Thanks friends.

In se37, that "Uppercase/Lower case" thing will work fine but not working in program.

Is there any other solution that you know?

Thanks

Read only

0 Likes
719

Yes, you should be passing the program name in full upper case format and the data in the database should be uppercase. This is the fix. There is no reason why the program name in your database table should be lower-case.

Regards,

RIch Heilman

Read only

0 Likes
719

thanks Rich. I may be creating another FM later similar to this but that may be not for program names. In that way, is mainitaining the data in tables always in CAPS the only fix?

Read only

0 Likes
719

I would say yes, there is no reason to have case-sensitive data stored in your database for key fields. You will see some fields as lower-case enabled, but they are usually text fields or description fields. You shouldn't have your key fields in any table which are case-sensitive, that just makes your job harder.

Regards,

RIch Heilman