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

Dictionary Search Help

Former Member
0 Likes
1,404

I am using Dictionary Search Help to search and display employee nam. Just wondering how can I exclude all withdrawn employees from the list displayed.

Thanks

12 REPLIES 12
Read only

Former Member
0 Likes
1,340

Hi Kim,

Since you want to exclude some of the entries from search help result i think you have write search help exit here. By default Dictionary Search help return you all employee but for your application you want to exclude withdrawn employee based on some flag i suggest

create the Search help exit

OR

see if you can put flag to indicate the withdrawn employee and make the default value of that flag. So that search help work accordingly.

Thanks,

Rahul

Read only

0 Likes
1,340

Thanks Rahul for your kind help.

With my lack of experience of Webdynpro for ABAP....Can you please show me step by step of how to created Search Help Exit.

Thanks with regards,

Kim Nguyen.

Read only

0 Likes
1,340

Hi,

You can refer to ABAP general forum for the same for more information on SH exit...

Regards,

Lekha.

Read only

0 Likes
1,340

Hi Kim,

go thru this tutorial

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0629eb0-6332-2c10-bf9c-c37ae21d6855&override...

it gives you step by step procedure

regards

anand

Read only

0 Likes
1,340

Hi Kim,

WebDynpro has nothing to do here.

This is pure DDIC issue.

Please refer to online help as given in other reply.

Thanks,

Rahul

Read only

0 Likes
1,340

Hi,

You can refer the below thread on creating the search help exit.

[;

Priya

Read only

0 Likes
1,340

Hi Everyone,

Thanks for your quick replieds

As your suggest I have given a search help exit function module (from SAP) F4IF_SHLP_EXIT_USER_COMP.

Now i want to modify this FM (or copy then create new one) but not sure where i write a select query in the search help exit to delete all withdrawn employees. I search around but could not find the answer I want.

Kindly let me know how to do it.

I am new to programming in ABAP too and a well commented code would be helpful.

Kim Nguyen.

Read only

0 Likes
1,340

Hi,

You may refer this Search help exit.

In this I have filtered the records based on Company code by writing a select query.

I have another field in selection criteria( doctor id ).

Code for your reference :

DATA : lw_selopt TYPE ddshselopt,
         l_org TYPE z3af_hcp-org.
DATA: r_doctorid TYPE RANGE OF z3af_hcp-doctor_id,
      w_doctorid LIKE LINE OF r_doctorid.
  
  CASE callcontrol-step.
    WHEN 'SELECT'.
      CLEAR : gt_select_list[].

      IMPORT l_bukrs TO ls_bukrs FROM MEMORY ID 'Z3AF_BUKRS'.
       SET LOCALE LANGUAGE sy-langu.

*Convert the Search help fields
      LOOP AT shlp-selopt INTO lw_selopt.
        CASE lw_selopt-shlpfield.

          WHEN 'DOCTOR_ID'.
            w_doctorid-sign = lw_selopt-sign.
            w_doctorid-option = lw_selopt-option.
            w_doctorid-low = lw_selopt-low.
            w_doctorid-high = lw_selopt-high.
            APPEND w_doctorid TO r_doctorid.

                  ENDCASE.
      ENDLOOP.
*-----Selecting data from HCP table based on Criteria in Range table and company code--------*
      SELECT  doctor_id
              lname
              fname
              city
              state
              post_code
              degree
            FROM z3af_hcp INTO TABLE gt_select_list
               WHERE  bukrs EQ ls_bukrs
                  AND doctor_id IN r_doctorid.
*-------FM to Map Values in table--------------------------------------------
      CALL FUNCTION 'F4UT_RESULTS_MAP'
        TABLES
          shlp_tab          = shlp_tab
          record_tab        = record_tab
          source_tab        = gt_select_list
        CHANGING
          shlp              = shlp
          callcontrol       = callcontrol
        EXCEPTIONS
          illegal_structure = 1
          OTHERS            = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

      callcontrol-step =  'DISP'.
      CLEAR l_lname.

    WHEN 'DISP'.
*------Loop the table to append it to the record Structure-------------------
      LOOP AT gt_select_list INTO lw_select_list.
        APPEND lw_select_list TO record_tab.
      ENDLOOP.
  ENDCASE.

I hope it helps you in some aspect.

Read only

0 Likes
1,340

Hi everyone,

I got Collective Search Help ZUSER which included 2 elementary search User_LOGON and USER_ADDR

Is there any way that I can mix up and display 1 Search criteria which include both parameters from 2 elementary search above

Example: I want my display search criteria include: USER_ADDR (User, FirstName, LastName,) and USER_LOGON (GLTGV (valid from), GLTGB (valid to)...).

I filtered out all withdrawn users from the hit list of Search Help Exit by using USER_LOGON (data collection USER02) elementary search. However the search help parameter from USER02 does not have Fistname and LastName parameters, and I want these two parameters displayed on the Search Criteria...Can you please show me how to?

Thanks.

Read only

0 Likes
1,340

Your search help is Z (Custom one ) you can do is

1. Copy the database view USER_ADDR as ZUSER_ADDR

2. In this Table/Join Condition tab add table USR02 into it. ( Please remember that ZUSER_ADDR already contains the First Name and Last Name in the field list)

3. In the selection condition tab you can filtered out the withdrawn records

4. Create a elementary search help and use this database view (ZUSER_ADDR) in the selection method

Still do you want more filtering then use the exit

This will solve your issue.

a®

Read only

0 Likes
1,340

Hi a@s,

In step 3: In the selection condition tab you can filtered out the withdrawn records

i tried filter out CLASS ( user group) = 'WITHDRAWN' but it does not work.

And addition to my hit list displayed I want to delete duplicate records by using

DELETE ADJACENT DUPLICATES FROM record_tab comparing all fields.

However, it's only delete the first few records but not all duplicate ones.

Please pin point me where I were wrong...

Thanks for your help

Read only

Former Member
0 Likes
1,340

Hi kim,

go thru this onlne help

http://help.sap.com/saphelp_nw70/helpdata/en/47/9b298c66eb3376e10000000a421937/content.htm

from this you can get a lot on dictionary search help which might solve your problem

for more references go thru this thread

regards,

anand