2011 Jun 23 4:21 PM
Hi,
I create a search help exit, it working ok, the only problem its when I double click on the value I choosed from the return list, this value is not displayed in the field.
I guess I didnt set wich of all the colums od the return table its the value to write in the field.
How do I do that?
Thanks!
Hi,
I create a search help exit, it working ok, the only problem its when I double click on the value I choosed from the return list, this value is not displayed in the field.
I guess I didnt set wich of all the colums od the return table its the value to write in the field.
How do I do that?
Thanks!
2011 Jun 23 4:30 PM
Hello,
Give the dialog type as 'Display value immediately' and the sample code is,
IF callcontrol-step = 'SELECT'.
get values of default
LOOP AT shlp_tab.
LOOP AT shlp_tab-fieldprop INTO lv_wa_fieldprop.
IF lv_wa_fieldprop-fieldname = 'SRCSTRUCT'.
lv_tabname = lv_wa_fieldprop-defaultval.
REPLACE ALL OCCURRENCES OF '''' IN lv_tabname WITH space.
CONDENSE lv_tabname.
ENDIF.
ENDLOOP. "INTERFACE
ENDLOOP. "SHLP_TAB
get fields of structure from DDIC
CALL FUNCTION 'DDIF_TABL_GET'
EXPORTING
name = lv_tabname
state = 'A'
langu = sy-langu
TABLES
dd03p_tab = lt_dd03p
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
flow control: go directly to last step
callcontrol-step = 'DISP'.
put selected entries into internal table for returning
REFRESH record_tab.
LOOP AT lt_dd03p WHERE fieldname NA '.'.
RECORD_TAB-STRING = LV_TABNAME.
record_tab-string(30) = lt_dd03p-fieldname.
record_tab-string+30(60) = lt_dd03p-ddtext.
APPEND record_tab.
ENDLOOP.
ELSE.
exit if no valid entries are found
callcontrol-step = 'EXIT'.
ENDIF.
ENDIF.
Thanks.
Ramya.
2011 Jun 23 4:33 PM
Hi Nicolas
You need to use the function module to insert all the fields that you are to return to the search help. Also check also if the field you want to pass to screen field is specified under definition of search help as an exporting parameter.
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
parameter = 'LIFNR'
fieldname = 'LIFNR'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lt_data01
CHANGING
shlp = shlp
callcontrol = callcontrol.
regards
PrinceIsaac
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |