Skip to Content

search help

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2005 at 01:30 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2005 at 01:25 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2005 at 07:21 PM

    Hi,

    Use this FM

    <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>

    for user defined Search help.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 04:50 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 06:12 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.