‎2008 Dec 29 8:10 AM
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..
‎2008 Dec 29 8:20 AM
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.
‎2008 Dec 29 8:20 AM
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
‎2008 Dec 29 8:20 AM
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.
‎2008 Dec 29 8:31 AM
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.
‎2008 Dec 29 8:20 AM
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
‎2008 Dec 29 8:23 AM
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
‎2008 Dec 29 8:25 AM
Hi,
While passin the parameter use the following declaration to haev case- sensitive input.
parameters : p_name(15) type c LOWER CASE .
regards,
mansi.
‎2008 Dec 29 8:26 AM
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
‎2008 Dec 29 8:35 AM
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.
‎2008 Dec 29 8:41 AM
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.
‎2008 Dec 29 8:29 AM
Hi,
Try this. It works fine.
tables kna1.
parameters p_name1 type kna1-name1 lower case.