Skip to Content
author's profile photo Former Member
Former Member

problem in Search Help

Hello All,

I have One Problem in search help.

I have made one search help for one 'screen field' from our Ztable. field name is 'Material no.' in this i have same no of material more then 2 times. when i am click F4 all duplicate material number also getting in search help.

i req. is, to not get depulicate values.

Thanks

Rajesh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 02, 2006 at 07:51 AM

    Hi Rajesh,

    Please create a search help for the field that you want to create unique entries and pass the name to se11 transacrion search field name. while creation you have a user exit FM name that it asks while creation in search help.

    Create this FM in se37 and write the case as below in that search help as follows as per your requirement of ztable.

    types : begin of t_z46638skil,

    empid like z46638skil-empid,

    posnr like z46638skil-posnr,

    skill like z46638skil-skill,

    knowldge like z46638skil-knowledge,

    end of t_z46638skil.

    data : i_z46638skil type standard table of t_z46638skil,

    wa_z46638skil type t_z46638skil,

    l_skill type z46638skil-skill.

    • Basically CALLCONTROL-STEP contains the values of the different stages

    • of the database operations in the particular flow as follows

    • 1) SELONE

    • 2) PRESEL1

    • 3) SELECT

    • 4) DISP

    • 5) RETURN

    • The search help exit will be called in all the five steps

    • so we need to restrict this values of steps based on the user requirements

    • Else the search help exit can be time consuming

    if callcontrol-step = 'DISP'.

    select empid

    posnr

    skill

    knowledge

    from z46638skil

    into table i_z46638skil.

    sort i_z46638skil by skill.

    delete adjacent duplicates from i_z46638skil comparing skill.

    clear record_tab.

    refresh record_tab.

    • passing the values of the internal table to the record_tab

    • that containes the possible values of the field when

    • search help exit is not being specified

    loop at i_z46638skil into wa_z46638skil.

    record_tab-string+11(20) = wa_z46638skil-skill.

    append record_tab.

    clear wa_z46638skil.

    endloop.

    • Passing this FM values, it will return with the optimized

    • set of values being overwritten to the search help

    call function 'F4UT_OPTIMIZE_COLWIDTH'

    tables

    shlp_tab = shlp_tab

    record_tab = record_tab

    changing

    shlp = shlp

    callcontrol = callcontrol.

    endif.

    This will return a unique search help. This will surely help you. please reward point if it helps y7ou.

    Regards,

    Brijesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 02, 2006 at 08:06 AM

    Hi Rajesh,

    *"----


    -


    ""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

    *"----


    pass this def to the TABLES and changing of FM....

    Regards,

    Brijesh Patel

    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.