Changing data in hit list through search help exit
The following are the things i have implemented
1. i have attached the search help to a feild in a DB table and same i have created an input feild on the selection screen with same name (using DDIC).
2. I have given a search help exit function also to remove the duplicate enteries in the hit list.
Now when the user presses nothing on the dialog box which appears for value restriction i am getting some enteries which i dont want.
I want to manually write a select query in the search help exit to do that.
Kindly let me know how to do it.
I am new to programming in ABAP and a well commented code would be helpful.
The search help record values are stored in an unstructured string (SEAHLPRES-STRING). Thus, to figure out the records you want to delete you need to implement some logic, e.g.:
" Define a structure according to the definition of the search help parameters. TYPES: BEGIN OF ty_s_record. TYPES: ... TYPES: END OF ty_s_record. DATA: ls_record TYPE ty_s _record. DATA: ls_line LIKE LINE OF RECORD_TAB. LOOP AT record_tab INTO ls_line. CLEAR: ls_record. CALL METHOD cl_abap_container_utilities=>read_container_c EXPORTING im_container = ls_line-string IMPORTING ex_value = ls_record EXCEPTIONS illegal_parameter_type = 1 OTHERS = 2. IF ( ls_record-... = ... ). DELETE record_tab INDEX syst-tabix. ENDIF. ENDLOOP.