01-12-2019 9:39 AM
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
01-14-2019 7:42 AM
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.
01-12-2019 9:51 AM
01-12-2019 10:24 AM
try,
Sort the internal table with key fields, then delete the internal table.
01-12-2019 7:19 PM
Hi Kumar,
Before triggering the delete statement sort record_tab by string ascending. This will solve the issue.
01-13-2019 2:42 PM
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
01-13-2019 6:30 PM
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')
01-14-2019 7:42 AM
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.