Skip to end of metadata
Go to start of metadata

Scenario: Creating a customize search help in which a field is mandatory.

Process followed: Created a search help on a field with parameter AUFNR and AUFTYP, making the AUFNR field as mandatory.

1. In se11 create a search help 'ZSEARCH_EXIT', with AUFNR and AUFTYP of table AUFK

2. Set 'Dialogue with value restriction' in Dialogue type

3. In search help exit tab mention the name of the search help exit FM to be created in se37.

4. Fill in the LPOS and SPOS column.

Screen shot attached below:
5. In the FM define the following Changing and table parameters:

 6. Write the below code to make AUFNR as mandatorydata lv_shlp type SHLP_DESCR.
       parameter_required       = 'AUFNR'
*       NOT_REQUIRED             = ' '
       shlp_tab                 = shlp_tab
       record_tab               = record_tab
       shlp                     = shlp
       callcontrol              = callcontrol.

read table shlp_tab into lv_shlp index 1.
7. Declare 'SHLP' as the TYPE-POOLS in the global parameters.

8. Attach the search help to the field in the table

9. Save and activate the search help, function module and the table

10. Final result: