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

fetching data based on mixed case parameter in SE37

Former Member
0 Likes
957

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

4 REPLIES 4
Read only

Former Member
0 Likes
656

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

Read only

0 Likes
656

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.

Read only

amit_khare
Active Contributor
0 Likes
656

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.

Read only

0 Likes
656

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.