‎2013 Oct 17 2:02 PM
Hi Folks,
I have created a search help for a field.And when the F4 is pressed on that field the dialog box is opened.The problem in the dialog box the select option comes as "=" by default.I there any way i can change it to greater than or less than by default ,so that it doesn't need to be changed every time.
‎2013 Oct 17 3:01 PM
Hi Abhishek!
You have to create FM as search help exit (see picture).
Here is the code:
FUNCTION z_test.
*"-----------------------------------------------------------------
*"*"Local interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) TYPE DDSHF4CTRL
*"-----------------------------------------------------------------
DATA ls_opt TYPE ddshselopt.
IF callcontrol-step = 'PRESEL'.
CLEAR ls_opt.
ls_opt-shlpname = 'CARRID'.
ls_opt-shlpfield = 'CARRID'.
ls_opt-sign = 'I'.
ls_opt-option = 'GE'.
ls_opt-low = 'AZ'.
APPEND ls_opt TO shlp-selopt.
ENDIF.
ENDFUNCTION.
Result:
I hope it will be helpful.
-----
Best regards,
George Shlyahov
‎2013 Oct 17 2:08 PM
‎2013 Oct 17 3:01 PM
Hi Abhishek!
You have to create FM as search help exit (see picture).
Here is the code:
FUNCTION z_test.
*"-----------------------------------------------------------------
*"*"Local interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) TYPE DDSHF4CTRL
*"-----------------------------------------------------------------
DATA ls_opt TYPE ddshselopt.
IF callcontrol-step = 'PRESEL'.
CLEAR ls_opt.
ls_opt-shlpname = 'CARRID'.
ls_opt-shlpfield = 'CARRID'.
ls_opt-sign = 'I'.
ls_opt-option = 'GE'.
ls_opt-low = 'AZ'.
APPEND ls_opt TO shlp-selopt.
ENDIF.
ENDFUNCTION.
Result:
I hope it will be helpful.
-----
Best regards,
George Shlyahov