Skip to Content
avatar image
Former Member

Issue in Search Help exit KRED when control step = DISP

Steps in Search Help are

1) SELONE - in this step FM 'DD_SHLP_GET_DIALOG_INFO' is called to populate the internal description of the fields for search help fields in table  SHLP_TAB
2)       PRESEL1 - in this step the maximum records, internal length, offset attributes of the fields are set
3)       PRESEL - in this step a pop-up is displayed for the user to enter the selection criteria.
4)       SELECT - in this step based on the selection criteria entered by the user data will be selected to RECORD_TAB internal table based on the selection method specified for the search help
5)       DISP - this is the final step before the result list is displayed to the user.

But  when I tried to debug in the exit ZF4IF_SHLP_EXIT_KRED for Kred , its just going in debug mode when control step = SELONE and then directly showing the result, but never when control step= DISP

I need to modify the Record_tab internal table based on some condition, when control step = DISP.I am working in R/3 4.7.

Please let me know how to do this?

Thanks & regards

Kakoli

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Mar 21, 2012 at 11:54 AM

    Hello,

    I do not exact reason of the porblem but suggest one solution..

    Please press F5 ( do not press F8) and go throuhg all step to display PRESALE1 and then same for further button till DISP...

    Thanks

    Krish

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      The control goes into the exit only when CALLCONTROL-STEP = 'SELONE'

      but i need to code when CALLCONTROL-STEP = 'DISP' or 'PRESEL'

      please suggest what need to be done so that control goes in the exit for every step.

      when I debug (F5 ) CALLCONTROL-STEP changes from  'START' - 'SELONE' -'PRESEL' and it is not even changing to 'DISP' before the output is displayed. when

      TABC_SHLPTAB-CALLCONTROL-STEP =DISP

      callcontrol-step = PRESEL

      record_tab[] is getting filled . But then too the control is not going inside Exit .

      The exit looks like :

      FUNCTION ZF4IF_SHLP_EXIT_KRED.
      *"----------------------------------------------------------------------
      *"*"Local interface:
      *"  TABLES
      *"      SHLP_TAB TYPE  SHLP_DESCT
      *"      RECORD_TAB STRUCTURE  SEAHLPRES
      *"  CHANGING
      *"     VALUE(SHLP) TYPE  SHLP_DESCR
      *"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
      *"----------------------------------------------------------------------

        BREAK userid.


      * EXIT immediately, if you do not want to handle this step
      *  IF CALLCONTROL-STEP <> 'SELONE' AND
      *     CALLCONTROL-STEP <> 'SELECT' AND
      *     " AND SO ON
      *     CALLCONTROL-STEP <> 'DISP'.
      *    EXIT.
      *  ENDIF.

      *"----------------------------------------------------------------------
      * STEP SELONE  (Select one of the elementary searchhelps)
      *"----------------------------------------------------------------------
      * This step is only called for collective searchhelps. It may be used
      * to reduce the amount of elementary searchhelps given in SHLP_TAB.
      * The compound searchhelp is given in SHLP.
      * If you do not change CALLCONTROL-STEP, the next step is the
      * dialog, to select one of the elementary searchhelps.
      * If you want to skip this dialog, you have to return the selected
      * elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
      * either to 'PRESEL' or to 'SELECT'.
        IF CALLCONTROL-STEP = 'SELONE'.

      *   PERFORM SELONE .........
      *    EXIT.
        ENDIF.

      *"----------------------------------------------------------------------
      * STEP PRESEL  (Enter selection conditions)
      *"----------------------------------------------------------------------
      * This step allows you, to influence the selection conditions either
      * before they are displayed or in order to skip the dialog completely.
      * If you want to skip the dialog, you should change CALLCONTROL-STEP
      * to 'SELECT'.
      * Normaly only SHLP-SELOPT should be changed in this step.
        IF CALLCONTROL-STEP = 'PRESEL'.
           BREAK userid.
      *   PERFORM PRESEL ..........
      *    EXIT.
        ENDIF.
      *"----------------------------------------------------------------------
      * STEP SELECT    (Select values)
      *"----------------------------------------------------------------------
      * This step may be used to overtake the data selection completely.
      * To skip the standard seletion, you should return 'DISP' as following
      * step in CALLCONTROL-STEP.
      * Normally RECORD_TAB should be filled after this step.
      * Standard function module F4UT_RESULTS_MAP may be very helpfull in this
      * step.
        IF CALLCONTROL-STEP = 'SELECT'.
      *   PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
      *                       CHANGING SHLP CALLCONTROL RC.
      *   IF RC = 0.
      *     CALLCONTROL-STEP = 'DISP'.
      *   ELSE.
      *     CALLCONTROL-STEP = 'EXIT'.
      *   ENDIF.
      *    EXIT. "Don't process STEP DISP additionally in this call.
        ENDIF.
      *"----------------------------------------------------------------------
      * STEP DISP     (Display values)
      *"----------------------------------------------------------------------
      * This step is called, before the selected data is displayed.
      * You can e.g. modify or reduce the data in RECORD_TAB
      * according to the users authority.
      * If you want to get the standard display dialog afterwards, you
      * should not change CALLCONTROL-STEP.
      * If you want to overtake the dialog on you own, you must return
      * the following values in CALLCONTROL-STEP:
      * - "RETURN" if one line was selected. The selected line must be
      *   the only record left in RECORD_TAB. The corresponding fields of
      *   this line are entered into the screen.
      * - "EXIT" if the values request should be aborted
      * - "PRESEL" if you want to return to the selection dialog
      * Standard function modules F4UT_PARAMETER_VALUE_GET and
      * F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.
        IF CALLCONTROL-STEP = 'DISP'.
      *   PERFORM AUTHORITY_CHECK TABLES RECORD_TAB SHLP_TAB
      *                           CHANGING SHLP CALLCONTROL.

      delete record_tab index 2.

          BREAK userid.
      *    EXIT.
        ENDIF.
      ENDFUNCTION.

  • Mar 21, 2012 at 12:18 PM

    Is CALLCONTROL-STEP modified in your Z-exit, if yes to which value ?

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 21, 2012 at 12:30 PM

    Set the Breakpoint and then Restart the Transaction with /n for example /NSE11.

    This should help!

    KR

    Alfons

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 23, 2012 at 11:56 AM

    Hi

    I have find the solution from the below discussion .

    http://scn.sap.com/thread/1831345

    Kakoli

    Add comment
    10|10000 characters needed characters exceeded