Application Development 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: 

Search Help exit not working

former_member599006
Participant
0 Kudos

Hi All,

Could you let me know what is mistake am doing in my search help exit code as shown in screenshot. It is not working. After deleting duplicates in exit still it is displaying duplicates. I also tried using FM 'F4UT_PARAMETER_RESULTS_PUT' but still the result is same. it did not work.

FUNCTION z4fifm_exit_door.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCT
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(CALLCONTROL) TYPE  DDSHF4CTRL
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR
*"----------------------------------------------------------------------
  IF callcontrol-step = 'DISP' or CALLCONTROL-step = 'SELECT'.
    DELETE ADJACENT DUPLICATES FROM record_tab COMPARING ALL FIELDS. 
  ENDIF

Regards,

Mohan. V

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Just for a test can you replace your code with

IF callcontrol-step = 'DISP'.
  SORT record_tab BY string.    
  DELETE ADJACENT DUPLICATES FROM record_tab COMPARING string.
ENDIF.
6 REPLIES 6

Sandra_Rossi
Active Contributor
0 Kudos

did you debug?

VenkatRamesh_V
Active Contributor
0 Kudos

try,

Sort the internal table with key fields, then delete the internal table.

tamitdassharma
Active Participant
0 Kudos

Hi Kumar,

Before triggering the delete statement sort record_tab by string ascending. This will solve the issue.

0 Kudos

Hi all,

Thanks for reply, I have debugged and in debug it deleted the adjacent duplicates as already the records are default sorted as added in pic 2

, and record_tab is changed as required, but after that in output it is not reflecting.

Regards,
VM Kumar

Sandra_Rossi
Active Contributor
0 Kudos

You should do it only during the step = 'DISP' i.e. right before it's displayed (it's useless during the step 'SELECT' because the exit is called before the table of view defined in the search help is read by SAP). But that doesn't explain why it doesn't work if you remove successfully the duplicate lines ! (hence my question about doing a debug during the step 'DISP')

raymond_giuseppi
Active Contributor
0 Kudos

Just for a test can you replace your code with

IF callcontrol-step = 'DISP'.
  SORT record_tab BY string.    
  DELETE ADJACENT DUPLICATES FROM record_tab COMPARING string.
ENDIF.