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

former_member534411
Participant
0 Kudos

hello,

I created search help for a custom defined field it can have duplicate data in the table but while i am displaying i want to resrict the duplicates. I try to create exit and modify the displaying data but without luck.

Would appreciate if anyone let me know answer.

Regards, Suresh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

If you're using the table as method of your table you should use an exit (as copy of fm std F4IF_SHLP_EXIT_EXAMPLE ) to delete the duplicates data.

You should insert your code at this point of your exit:

IF CALLCONTROL-STEP = 'DISP'.

  • PERFORM AUTHORITY_CHECK TABLES RECORD_TAB USING SHLP.

EXIT.

ENDIF.

Max

Message was edited by: max bianchi

5 REPLIES 5

Former Member
0 Kudos

Hi,

Look at this code you need to delete duplicate data.

******************

data: begin of t_itab occurs 0,

pernr like zfdmr_records-pernr,

end of t_itab.

DATA: t_return like ddshretval occurs 0 with header line.

**----


*at selection-screen on value-request for s_pernr-low.

**----


  • perform get_values changing s_pernr-low.

*

**----


*at selection-screen on value-request for s_pernr-high.

**----


  • perform get_values changing s_pernr-high.

&----


*& Form get_values

&----


  • text

----


  • -->P_S_PERNR_LOW text

----


FORM get_values CHANGING P_S_PERNR.

refresh t_itab.

clear t_return.

select pernr from zfdmr_records into table t_itab.

************

delete adjacent duplicates from t_itab.

************

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'PERNR'

  • PVALKEY = ' '

DYNPPROG = sy-cprog

DYNPNR = sy-dynnr

DYNPROFIELD = 'ZFDMR_RECORDS-PERNR'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

MULTIPLE_CHOICE = ' '

DISPLAY = 'F'

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

TABLES

VALUE_TAB = t_itab

  • FIELD_TAB =

RETURN_TAB = t_return

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE t_return INDEX 1.

p_s_pernr = t_return-fieldval.

ENDFORM. " get_values

*******************************

Thanks.

If your issue is solved award points and close the thread.

Former Member
0 Kudos

Hi

If you're using the table as method of your table you should use an exit (as copy of fm std F4IF_SHLP_EXIT_EXAMPLE ) to delete the duplicates data.

You should insert your code at this point of your exit:

IF CALLCONTROL-STEP = 'DISP'.

  • PERFORM AUTHORITY_CHECK TABLES RECORD_TAB USING SHLP.

EXIT.

ENDIF.

Max

Message was edited by: max bianchi

Former Member
0 Kudos

Hi,

Use this FM

<b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>

for user defined Search help.

Former Member
0 Kudos

Hi Suresh,

you may have a look at search help SFLIGHT_MIN_FREE and its search help exit. I think some of the techniques demonstrated in this exit are usefull for your problem, too.

Greetings

Stephan

Former Member
0 Kudos

Hi Suresh,

You better create a Search help exit. A function module with import/input parameters and export/output(to lilst) parameters.

I designed a search help exit for the product field.

On the search help screen(SE11), LPos represent the fields which will appear on the hit list after the search help is executed, SPos represnt the list of fields to be input ot the search help(Using which search is made). Please remember to do the parameter assignment(It is mandatory).

Refer function module : F4IF_SHLP_EXIT_EXAMPLE.

Here the coding has to be done in TIME POINTS. This will solve your problem of duplicate entries.

Hope this will help you.

Regards,

Kapil