Application Development and Automation 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: 
Read only

Search help exit

TJRP
Participant
0 Likes
1,347

Hi,

I'm having problems with a search help exit in version 4.7.

The search help is based on F4IF_SHLP_EXIT_EXAMPLE. The problem that I'm having is with the hit list, incorrect values are shown in incorrect columns. The search help exit has been copied from a search help exit in 4.6C and the correct values are returned in the correct columns. I have search OSS and haven't found anything that is relevant can any one help?

Regards

Jim James

8 REPLIES 8
Read only

Former Member
0 Likes
1,174

Hi Jim,

Can u explain more the problem in details.

Do you mean that the search help exit does not drop down the required values? Or do you mean that the searc help exit is showing incorrect values for selection?

VJ

Read only

0 Likes
1,174

VJ

The searh help correctly gets the values which I can see displayed in table RECORD_TAB and the order they appear in the table is the order that I want to see them on the screen.

When the value get displayed they are shown in a different columns that I have specified in the position in the hit list of an elementary search help. the header columns are in the correct position but the values are in different columns.

Cheers

J-J

Read only

0 Likes
1,174

Hi Jim,

This is strange. Could you tell me which specific object you have enabled the exit. I mean which search help object.

We have implemented many search helps exists never faced such a problem.

Let me try checking in our exits if i can find something.

Cheers

VJ

Read only

0 Likes
1,174

VJ

The search help is KRED(Search Help for Vendors (Creditors))

The fields do not just move alone by 3 characters

I hope this helps

Cheers

J-J

Read only

0 Likes
1,174

Jim,

Are there any custom include search helps did u check the parameter assignements and also can you post the code in the exit.

Regards

Vick

Read only

0 Likes
1,174

Hi Jim,

Actually we have implemented the exit for this and it works fine for us. The positions are what we have defined in our custom search help which has been appended to the std search help.

We are 4.6C and 4.7 both and on both the system we have this and it works fine for us.

i hope your exit defined is in the correct format?

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

* 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.

  IF (  ( CALLCONTROL-STEP = 'SELONE' )
     OR ( CALLCONTROL-STEP = 'SELECT' )
     OR ( CALLCONTROL-STEP = 'DISP'   ) ).

*    PERFORM SELONE.
    CHECK (  ( SY-TCODE = 'ZXXXXX' )
         OR  ( SY-TCODE = 'ZXXXXX' )
        OR  ( SY-TCODE = 'SAPSTDTCODE'    )
        OR  ( SY-TCODE = 'SAPSTDTCODE'    ) ).
      DELETE SHLP_TAB FROM  1 TO 22.
      CLEAR SHLP_TAB.
      APPEND SHLP_TAB.
      EXIT.
    ENDIF.
  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'.
*   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.
    EXIT.
  ENDIF.
ENDFUNCTION.

Read only

0 Likes
1,174

VJ

I have copied the function module from the example and everything appears to be the same.

Not sure what you mean about the appending to the std search help, could u expand this area please

Regards

J-J

Read only

Former Member
0 Likes
1,174

Jim,

There is a additional field included ie mandt in 4.6c which needs to be removed, just a thought, is the whole row values are moving by atleast 3 values towards right.

Regards

Vick