03-31-2008 8:23 PM
Hi,
I have includes an elementary search help in a standard SAP collective search help. I manage the selection myselt through a function module. The data gets displayed successfully but when the user double-click on a line, it is not returned to the field.
Have you ever seen that? Any idea?
DATA:t_bankdetails LIKE bapibus1006_bankdetails OCCURS 0 WITH HEADER LINE,
w_partner LIKE bapibus1006_head-bpartner.
DATA:t_out LIKE zbca_bp_bank_details OCCURS 0 WITH HEADER LINE.
CASE callcontrol-step.
WHEN 'SELECT'.
* Next two lines are only for test purpose. To be removed.
* sy-lisel = '3029'.
* SET PARAMETER ID 'BPA' FIELD sy-lisel.
* Get current business partner
GET PARAMETER ID 'BPA' FIELD sy-lisel.
WRITE sy-lisel TO w_partner RIGHT-JUSTIFIED. OVERLAY w_partner WITH '0000000000'.
* Get bank details for current business partner
CALL FUNCTION 'BAPI_BUPA_BANKDETAILS_GET'
EXPORTING
businesspartner = w_partner
TABLES
bankdetails = t_bankdetails.
* Populate temporary table with result for the F4UT_RESULTS_MAP function
REFRESH t_out.
LOOP AT t_bankdetails.
t_out-bankland = t_bankdetails-bank_ctry.
t_out-bankkey = t_bankdetails-bank_key.
t_out-acnum_ext = t_bankdetails-bank_acct.
APPEND t_out.
ENDLOOP.
* Map the result list
CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
source_structure = 'ZBCA_BP_BANK_DETAILS'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = t_out
CHANGING
shlp = shlp
callcontrol = callcontrol.
IF NOT record_tab[] IS INITIAL.
callcontrol-step = 'DISP'.
ELSE.
callcontrol-step = 'EXIT'.
ENDIF.
* WHEN 'RETURN'.
* CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
* EXPORTING
* parameter = 'ACNUM_EXT'
** OFF_SOURCE = 0
** LEN_SOURCE = 0
** VALUE =
* fieldname = 'ACNUM_EXT'
* TABLES
* shlp_tab = shlp_tab
* record_tab = record_tab
** SOURCE_TAB =
* CHANGING
* shlp = shlp
* callcontrol = callcontrol.
** EXCEPTIONS
** PARAMETER_UNKNOWN = 1
** OTHERS = 2
* .
** IF sy-subrc <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
WHEN 'DISP'.
ENDCASE.
04-01-2008 12:37 PM
JUst check whether ur exporting parameter is only 1 in the search help .... not multiple ...
04-01-2008 3:57 PM
No, you can have more than one export parameter. In fact, I use 3 of them and they are coming back to screen, now.
What was missing is that at the collective search help level, there is a button I needed to push to assign the parameters.
Thanks.