Thursday 31 December 2020

How to get fuzzy search for multiple columns other than the standard search help.

Introduction:

I am going to explain, how to add new fields in standard search help and make it available as fuzzy search help in dictionary(SE11) level and as well as report level.

Custom fuzzy search help in report level:

Step1:

Go to tcode SE11 and Create a custom table with the following fields, here I want to add a new field PO text to be displayed in the search help so added a field for PO text.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Step2:

Create an elementary search help giving the table created in selection method.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Here in the enhanced options section ‘Multi-Column Full Text Search (Database Specific)’ need to be checked if we want to get fuzzy search help for multiple fields.

We’re done with the search help. Now use it in a test report.

Step3:

Go to SE38 and create a report.

Here I’ve used the following syntax with helps to access the custom search help in the report.

PARAMETERS: P_MATNR TYPE MATNR MATCHCODE OBJECT ZMM_PO_TEXT_EL

Here ZMM_PO_TEXT_EL is our custom search help created.

Step 4:

Now test the report.

Output:

Case1:

Give Input as ‘W’ to check with material number:

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Case 2:

Give input as Maintain to check for PO text:

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Custom fuzzy search help in standard tcode level:


Step 1:

Create an append search help in SE11. Include the elementary search help created here.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

The standard search help for MM transactions is ‘MAT1’ which looks as below.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Step 2:

Open it in SE11 and click on Goto->Append Search Help, a pop up appears, select the append search help created..

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Now the search help we created is appended to standard search help MAT1.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

Step 3:

Now open tcode MM03 and check here.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

The custom fuzzy search help created is available here.

SAP ABAP Tutorial and Material, SAP ABAP Guides, SAP ABAP Learning, SAP ABAP Prep, SAP ABAP Career

No comments:

Post a Comment