Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

search help problem not solved

Former Member
0 Likes
596

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
483

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

3 REPLIES 3
Read only

Former Member
0 Likes
483

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

Read only

Former Member
0 Likes
484

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

Read only

0 Likes
483

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