Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

How to handle the case sensitive description fields in the Search Help

$
0
0

1.0 Introduction

The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field.

But description fields in search help are case sensitive so it does not allow the user to display the list of possible values.

To handle this problem we have come up with this Solution.

 

2.0 Description of the actual problem- Example

This is the Custom elementary search help “Customer func by partner” that we have attached to the collective search help DEBI (Search help for customers).

The problem we where facing in our search help was for the descriptive fields like Name, city etc.

1.JPG

 

Here when we try to search entries which start with “t“indifferent of small or capital letter. But the description fields are case sensitive so if we try to search with small letter only Name starting with small letter would be fetched.

2.JPG

 

Only those entries in the Name field are picked up that start with small letter t.

3.JPG

 

Again if we try to search entries which start with “T“ indifferent of small or capital letter. But the Name field is case sensitive so if we try to search with capital letter only Name starting with capital letter would be fetched.

4.JPG

 

Only those entries in the Name field are picked up that start with capital letter “T”.

5.JPG

 

So we need to solve this problem where if we try to search with “T” or “t” all the data need to be fetched indifferent of small or capital letter.

 

 

3.0 How to handle case sensitive description field in Search help (Name, city, street etc).

In SAP database all the description fields are maintained in a separate field specially for Match codes.

Suppose the Name1, City1 and Street in table ADRC are maintained in another capital letter in these three fields MC_NAME1, MC_CITY1 & MC_STREET.

The difference between Name 1 and MC_NAME1 is the data element for these two fields are maintained in a different way.

6.JPG

 

If we double click on this data element AD_NAME1.

7.JPG

 

Now click on the domain.

8.JPG

 

Here we can see the domain for the field Name 1 is maintained in Lower case. Now when we check the domain for MC_NAME1 we can see that the Lowe case check box is not checked .That means the field MC_NAME1 is maintained in capital letter.

9.JPG

 

Click on the data element.

10.JPG

 

Click on the domain.

11.JPG

 

Now when we check the domain for MC_NAME1 we can see that the Lower case check box is not checked. Now we need to use these two fields in such a way that when we try to search a description with “t” or “T” all the description in the Name field needs to be fetched. Previously we where using only NAME1, CITY1 and STREET in the search help. But now to handle this problem we need to pass the fields MC_NAME1, MC_CITY1 & MC_STREET which are maintained for the search help only. Previously in the elementary Search help ZES445 had the following parameters:-

12.JPG

 

In this case the description field becomes case sensitive. To handle this problem the following fields MC_NAME1, MC_CITY1 & MC_STREET are added in the search help ZES445 which are same as the fields NAME1, CITY1 and STREET in the table ADRC table but maintained in Uppercase for the search help.

13.JPG

 

SPOS-Position in dialog box of an elementary search help

Position of the search help parameter in the dialog box for limiting the hit list. Here we need the parameters MC_NAME1, MC_CITY1 & MC_STREET should appear in this dialog box, so we number the fields as they should appear in the dialog box.

 

LPOS -Position in the hit list of an elementary search help

Position of the parameter in the hit list. Here we need the parameters NAME1, CITY1 and STREET should appear in the hit list, so we number the fields as they should appear in the hit list.

 

Now when we search Name field based on “T” or “t” all the Name field that start with the letter “T” and “t” appears in the list.

14.JPG

 

Now the display of all the possible entries for the description field is enhanced by this technique.



Viewing all articles
Browse latest Browse all 935

Trending Articles