cancel
Showing results for 
Search instead for 
Did you mean: 

Search Help in Webdynpro For ABAP

Former Member
0 Kudos

Hi Experts,

In my application I want to attach search help to a field. My problem is that table field for which I am creating search help contains duplicate values. I dont want those duplicate values. How can I achieve this?

I am using trfgr field of table T510.

Please help.

Thanks & Regards,

Pratibha Shukla

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

answered

Former Member
0 Kudos

Hi Experts,

I have used Search Help Exit which is a function module . The exit is running correctly but the search help is not showing any entries in the hit list. I am not getting where is the problem. Please help.

Thanks,

Pratibha.

Former Member
0 Kudos

Hi

You need to write your code under line if callcontrol-step = 'SELECT'

once you have done the data selection fill the result table using function module F4UT_RESULTS_MAP.

in parameters: source_structure = 'the table/view name in caps used as selection method in search help

shlp_tab = shlp_tab

record_tab = record_tab

source_tab = internal table which contains the data selected by you, without duplicate entries

shlp = shlp

callcontrol = callcontrol

This FM call will fill your search help with data in right manner

Regards

Vishal Kapoor

Former Member
0 Kudos

I have coded like this . But I am getting short dumb. It says field symbol not assigned. Please help.

FUNCTION zexit_search_trfgr.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCT
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     REFERENCE(SHLP) TYPE  SHLP_DESCR
*"     REFERENCE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
*"----------------------------------------------------------------------
  DATA : BEGIN OF it_trfgr OCCURS 10,
          trfgr TYPE pa0008-trfgr,
        END OF it_trfgr.
  DATA : itab LIKE LINE OF it_trfgr.

  IF callcontrol-step = 'SELECT'.
*******Fetch trfgr from table t510
    SELECT DISTINCT trfgr FROM t510 INTO TABLE it_trfgr WHERE molga = 40.

CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
   SOURCE_STRUCTURE         = 'T510'
*   APPLY_RESTRICTIONS       = ' '
  TABLES
    shlp_tab                 = shlp_tab
    record_tab               = record_tab
    source_tab               = it_trfgr
  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.

  ENDIF.

Former Member
0 Kudos

Hello,

The problem is with the structure name u passed to function module. Structure must be same as the line type of your internal table. in your case create a global structure 'ZTRFGR' in dictionary with only one field TRFGR and pass it to the function module instead of T510. It should be fixed,

Regards

Vishal Kapoor

Edited by: vishal kapoor on Jun 3, 2010 1:46 PM

Former Member
0 Kudos

Hi Experts,

Can Anybody tell me how to achieve search help exit to achieve my functionality?

Thanks in advance.

Pratibha Shukla

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Have you read the online help for search help exit:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm

A search help exit is basically a search help implemented via a function module instead of a single table or join data read. You write the logic in the Function Module to retrieve the data.

Another alternative is to use a freely programmed value help. Here you control both the data logic and visualization of the value help.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9ef8cc9b5e3c5ce10000000a421937/frameset.htm

Former Member
0 Kudos

Please check this link: http://wiki.sdn.sap.com/wiki/display/WDABAP/UsingSearchhelpattachmentsforWebDynproABAP

I think it will be helpful.