‎2008 Jun 27 1:59 PM
Hello friends.
below code ist the "searchhelp exit code" for my search help.
But it doesn't work properly.
I have a search help parameter (my input field later
on the search help pop up window). If somebody klicks
into this field and press F4 and then according to this
field there must be called FM C14F_LOV_WAID (see below)
But I cant relate to this search help parameter (input field)
FUNCTION z_search_help_exit.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----------------------------------------------------------------------
*
*write: ''.
DATA: gv_addinf LIKE rcgaddinf,
gv_selscr LIKE ccihs_wasel VALUE IS INITIAL,
e_waid LIKE ccihs_wahiot-waid.
gv_addinf-valdat = sy-datum.
IF callcontrol-step <> 'PRESEL' AND
callcontrol-step <> 'SELONE' AND
callcontrol-step <> 'SELECT' AND
callcontrol-step <> 'DISP' AND
callcontrol-step <> 'RETURN'.
EXIT.
ENDIF.
IF callcontrol-step = 'SELONE'.
MESSAGE 'SELONE' TYPE 'I'.
EXIT.
ENDIF.
IF callcontrol-step = 'PRESEL'.
MESSAGE 'PRESEL' TYPE 'I'.
EXIT.
ENDIF.
IF callcontrol-step = 'SELECT'.
CALL FUNCTION 'C14F_LOV_WAID'
EXPORTING
i_addinf = gv_addinf
IMPORTING
E_WAID = e_waid .
ENDIF.
IF callcontrol-step = 'DISP'.
MESSAGE 'DISP' TYPE 'I'.
EXIT.
ENDIF.
IF callcontrol-step = 'RETURN'.
MESSAGE 'RETURN' TYPE 'I'.
callcontrol-hide_list = 'X'.
EXIT.
ENDIF.
ENDFUNCTION.
‎2008 Jun 27 3:17 PM
where is the connection between the input field
(search help parameter my input field on the search help pop up window) and return value ?????????
How can I pass the selected value to export parameter and set callcontrol-step = 'RETURN'.
Edited by: Ilhan Ertas on Jun 27, 2008 4:18 PM
‎2008 Jun 27 2:21 PM
Hi,
you can - just define inputs in SE11 - you will receive a warning even if an EXIT is defined but you can proceed. Values will be in the select-options for the parameters defined. Pass values (one for each input parms ) to structure I_WASELSCR.
Looks like the selected value comes directly from C14F_LOV_WAID. If not you may poulate your list using FM F4UT*.
Pass the selected value to export parameter and set callcontrol-step = 'RETURN'.
Have fun,
HP
Edited by: Holger Pakirnus on Jun 27, 2008 3:22 PM
‎2008 Jun 27 3:17 PM
where is the connection between the input field
(search help parameter my input field on the search help pop up window) and return value ?????????
How can I pass the selected value to export parameter and set callcontrol-step = 'RETURN'.
Edited by: Ilhan Ertas on Jun 27, 2008 4:18 PM
‎2008 Jun 27 4:07 PM
Your search help exit should contain changing parameter SHLP of TYPE SHLP_DESCR. This is a deep structure. Table SELOPT should contain some single values for input parameters.
To export the selected value you need to append a single line to record tab. This is quite difficult because it should not be done directly but by using function modules F4UT_PARAMETER*. However, theese FM have good documentation. An intructive example is SAPBC_GLOBAL_F4_SFLIGHT .
Kind regards,
HP