Skip to Content

Search Help exit not working

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

pic.jpg (332.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • did you debug?

  • 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')

  • Get RSS Feed

3 Answers

  • Best Answer
    3 days ago

    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.
    Add comment
    10|10000 characters needed characters exceeded

  • 5 days ago

    try,

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

    Add comment
    10|10000 characters needed characters exceeded

  • Hi Kumar,

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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

      pic2.jpg (262.3 kB)