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

Problem with Search Help

Former Member
0 Likes
3,783

Hi All,

Long time back we appended a custom field to MARA table and every thing used to work fine. Even search help used to work fine for that particular field in all clients. But recently we created new clients and now the search help is not working properly in those clients. When ever we input a field(Even with wild cards) we are not geeting any data even though the data exists in database. Still its working fine in old clients but we are getting problem in new clients. Can any one suggest what might be the reason for the problem. Anyone suggest how can i debug a search help.

6 REPLIES 6
Read only

Former Member
0 Likes
1,130

Hai.

check the example.

) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

3)An elementary search help defines the standard flow of an input help.

4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.

5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.

CREATION:

Go to SE11 Tcode

select search help

give the 'z' search help name and create

select the selection method ur table name eg : 'mara'

dialog module 'display value immediately'.

add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.

where left position when displaying and spos = search position

and then save and activate ..

See the links:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619

pls go through this for search help creation

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm

check the example code.

See the following ex:

TYPES: BEGIN OF TY_MBLNR,

MBLNR LIKE MKPF-MBLNR,

END OF TY_MBLNR.

DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.

data: it_ret like ddshretval occurs 0 with header line.

At selection-screen on value-request for s_mat-low.

Select MBLNR from mkpf into table it_mblnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'MBLNR'

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_MBLNR

  • FIELD_TAB =

RETURN_TAB = IT_RET

  • 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.

IF SY-SUBRC = 0.

read table it_ret index 1.

move it_ret-fieldval to S_mat-low.

ENDIF.

Go through the test program.

REPORT Ztest_HELP .

TABLES : MARA.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS : P_MATNR(10) TYPE C.

SELECTION-SCREEN END OF BLOCK B1.

DATA : BEGIN OF ITAB OCCURS 0,

MATNR TYPE MATNR,

END OF ITAB.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.

SELECT MATNR

FROM MARA

INTO TABLE ITAB

UP TO 10 ROWS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'MATERIAL NUMBER'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_MATNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = ITAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

regards.

sowjanya.b.

Read only

Former Member
0 Likes
1,130

Hi Ben,

Can you be more specific with the missing data you mentioned? Is it the data of the search help it self or the master data in MARA that can not be retrieved?

Also could you mention what is the source of the (working) SH value? is it from check/value table, explicit search help attached to the field in data dictionary, or self define search help from the program?

If you can give those info maybe we can help you more.

Thanks.

Jeffrey Satriadi

Read only

0 Likes
1,130

The data i am looking is the material data based on the input to the search help.its attached to the data element.

Read only

0 Likes
1,130

If I understand it correctly, I think the retrieval of the master data is not depend on the SH itself, it is depend on the value in the field (regardless there is a SH or not).

Where do you use the field (with the SH)? in your own report's selection screen(what is the type? select options or parameters)? or on a dialog program's screen?

Jeffrey Satriadi

Read only

0 Likes
1,130

We appended the another old material number field (for another plant) in MARA long time ago. When we try to search for a material in mm02/mm03 by "search by old material number", it used to work in the old clients when we input the value in this old material number field using search help. But now in new clients when we try to search based on the old material number its not working.

Read only

0 Likes
1,130

Hi,

I am confused now, you said in your 1st post you use a new appended field (I assumed customer field with custom SH), now you said the field is Old Material Number (MARA-BISMT) which is a standard field and does not have any (standard) Search Help. If you really talking about MARA-BISMT then the problem must be in your data and not the search help especially if it is working in another clients because SH is a workbench object (cross client).

Jeffrey Satriadi