‎2007 Apr 19 8:05 AM
Hi,
I have created a function module(in se37) where the input is Last name(PA0002-NACHN). My requirement is i have to fetch data from PA0002 based on last name. But the problem is if i give a name in mixed case(both upper and lower) sap converts the last name into Capital letter and starts searching the database.
But i tried in abap editor. here SAP accept the parameter(last name) as mixed case and starts searching. Why in function module the parameters are converted into upper case. How to restrict it.
If i will create a domain with LOWER CASE check box checked and try to call the dataelement in import part of function module then also it's converting it inot upper case. If i uncheck the lower case check box then also it's taking it as upper case.
How to process the input parameter in function module(SE37) which should take the input as user enters,i.e if user enters small letter it should take it as small letter , if mixed letter it should take it as mixed letter and start searching.
regards
sandeep
Message was edited by:
Sandeep Sahoo
‎2007 Apr 19 8:22 AM
HI Sandeep,
Declare the variable as a normal char type(char40) in the fm interface.
When testing from an abap program, the parameter must be declared like this.
parameters: p_name type pa0002-nachn lower-case.
Regards,
Ravi
‎2007 Apr 19 8:36 AM
My requirement is i have to create the parameter in import part of SE37. For that i am creating a structure in se11 ans calling the structure-NACHN in import parameter of SE37. 'parameters: p_name type pa0002-nachn lower-case.' will not work here.
‎2007 Apr 19 8:23 AM
Hi,
First the most important thing avoid doing search on string values as it is performance issue many times.
Now for your query, instead using the value directly in select statement, select all the values in an internal table, translate the field to uppercase and then do read on the basis of the entered value.
Regards,
Amit
Reward all helpful replies.
‎2007 Apr 19 8:44 AM
Thanks for the replr Amit but the problem is I am creating function module that is remortly enabled. it will be called by Enterprise portal.
Whatever you tol me that is applicable if user input the full name but User can input last name(PA0002-NACHN) like Amit or Am* or *mit.based on that ihave to search in PA0002 table.
if first of all i'll fetch all the data into one internal table and convert it into capital letter,then how i will seach in internal table for lower and mixed case. again how i will use LIKE statement in loop statement of IF statement as because user can input wild card(*) also.