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

Parameter Getting changed from lower to upper case

former_member396896
Participant
0 Likes
4,852

Hi guys,

I have a func module with one of the parameters as kna1-name1. When i pass value to this parameter as "La Quinta Hotel & Towers" it gets changed to "LA QUINTA HOTEL & TOWERS". My select query doesnt fetch any records on case conversion.

I checked in the data element kna1-name1 attributes, lowercase is checked.

Any suggestions..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,486

Hi,

If you are fetching the data from KNA1-NAME1..then it will be difficult to fetch the correct data...instead use the field KNA1-MCOD1 which stores the NAME1 value in Upper case. So you need to convert the entered value to FM in Upper Case and should fetch the KNA1 records using MCOD1.

10 REPLIES 10
Read only

Former Member
0 Likes
2,486

Have you seen in the table, what is the actual value in table. In table it will be stroed in based on your input.

Regards

Sasi

Read only

Former Member
0 Likes
2,487

Hi,

If you are fetching the data from KNA1-NAME1..then it will be difficult to fetch the correct data...instead use the field KNA1-MCOD1 which stores the NAME1 value in Upper case. So you need to convert the entered value to FM in Upper Case and should fetch the KNA1 records using MCOD1.

Read only

0 Likes
2,486

Hi,

Thnx man when i am using mcod1 its displaying the values.

Issue is resolved.

But is there any way we can prevent this happening in other cases.

My table stores data as "La Quinta Hotel & Towers" ( with capital letters n small letters ) for kan1-name1.

Read only

Former Member
0 Likes
2,486

Hi ,

I checked the issue in ECC system and i cannot replicate it , can you please check if the field has some conversion exit attached to it .

Regards

Arun

Read only

Former Member
0 Likes
2,486

Hi,

you must have created a screen from which you are entering input for name1.

so go to the "Screen attributes " of that input field and just check the check box for "Upper/Lower case".

it will solve your problem because now it will not convert your input into UPPER CASE and will be as you have enetered.

Regards,

neha

Edited by: Neha Shukla on Dec 29, 2008 1:54 PM

Read only

Former Member
2,486

Hi,

While passin the parameter use the following declaration to haev case- sensitive input.

parameters : p_name(15) type c LOWER CASE .

regards,

mansi.

Read only

Former Member
2,486

Hi Tajuddin,

As far as I know in SAP if we do not use the LOWER CASE addition, all input values are automatically converted into upper case

Eg:Suppose this is a test report

PARAMETERS: P_FIELD1(10),

P_FIELD2(10) LOWER CASE.

WRITE: FIELD1, FIELD2.

Input Selection Screen

P_FIELD1 : abcde

P_FIELD2 : fghij

Output:

ABCDE

fghij

Since the parameter declaration we have the syntax of LOWER.

Try this out if it works.

Thanks

Srikanth.P

Read only

0 Likes
2,486

I appreciate that,

But i am using this parameter kan1-name1 as import parameter in Function Module . Cant write "lower case" in import parameter.

And also no screen to make any changes in screen attributes. Since its a function Module.

Read only

0 Likes
2,486

Hi,

data lv_name type kna1-name1.

lv_name = p_name.

translate lv_name to lower case.

select single name1 from kna1 into e_name where name1 = p_name or name1 = lv_name.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
2,486

Hi,

Try this. It works fine.

tables kna1.

parameters p_name1 type kna1-name1 lower case.