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

custom search help exit

Vijay
Active Contributor
0 Likes
2,790

hi all,

i have to create a custom search help which will take matnr as input and need to return matcert and desc ( custom fields) as out put. so to achieve this i need to create custom search help exit that will be called with search help.

can anyone please tell me how to create custom search help exit and how the data will be returned from that exit as it uses two tables

SHLP_TAB TYPE SHLP_DESCT

RECORD_TAB STRUCTURE SEAHLPRES

what is the role of these tables? where to fill in the fetched data in matcert and desc fields?

regards

vijay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,839

Hi vijay,

go to se11..

select view-->enter custom view name -->enter two tables and relation ship and -->and enter the view fields..and activate...

again go to se11..

select the search help-->enter custom name and create -->craete with elementary search help..

-->enter view name above created in the Selection method.

-->and add the same fields in the search help paramater fields ..

and activate..

and call the search help

Parameters: matnr like mara-matnr matchcode object mat1. "Mat1 is the search help craeted above

use the same search help in the Programs..

regards,

Prabhudas

hi all,

i have to create a custom search help which will take matnr as input and need to return matcert and desc ( custom fields) as out put. so to achieve this i need to create custom search help exit that will be called with search help.

can anyone please tell me how to create custom search help exit and how the data will be returned from that exit as it uses two tables

SHLP_TAB TYPE SHLP_DESCT

RECORD_TAB STRUCTURE SEAHLPRES

what is the role of these tables? where to fill in the fetched data in matcert and desc fields?

regards

vijay

3 REPLIES 3
Read only

Former Member
0 Likes
1,840

Hi vijay,

go to se11..

select view-->enter custom view name -->enter two tables and relation ship and -->and enter the view fields..and activate...

again go to se11..

select the search help-->enter custom name and create -->craete with elementary search help..

-->enter view name above created in the Selection method.

-->and add the same fields in the search help paramater fields ..

and activate..

and call the search help

Parameters: matnr like mara-matnr matchcode object mat1. "Mat1 is the search help craeted above

use the same search help in the Programs..

regards,

Prabhudas

Read only

Vijay
Active Contributor
0 Likes
1,839

hi prabhu,

thanks for quick response, but the fields matcert and desc are not any particular table fields . i need to fill different values based on my requirement. and thats why i need to write search healp exit.

i need help reagarding how to creat custom search help exit.

thanks

vj

Read only

Former Member
0 Likes
1,839

Dear Vijay,

I hope you know how to create the search help using view in data dictionary.

you must create the view for this. once you create the SH the you can able to see the

Search Help Exit.

create a one function module under one function group. you can create the FM and FG in your own or company standard.

for that function module you must give the following parameter.

*" IMPORTING

*" VALUE(PARAMETER_OPTIMIZE) TYPE C OPTIONAL

*" TABLES

*" SHLP_TAB TYPE SHLP_DESCR_TAB_T

*" RECORD_TAB STRUCTURE SEAHLPRES

*" CHANGING

*" REFERENCE(SHLP) TYPE SHLP_DESCR_T

*" REFERENCE(CALLCONTROL) TYPE DDSHF4CTRL

once you create and activate the FM then you can give this FM in Search Help Exit text box.

then activate the Search Help.

after activate do the following thinks inside the FM.

data fieldprop_Wa like ddshfprop.

data dfies_wa like dfies.

data i type i.

field-symbols: <col>.

data: len type i, maxlen type i.

DATA: value LIKE DDSHIFACE-VALUE,

param_tab LIKE DD32P-FIELDNAME OCCURS 0 WITH HEADER LINE.

RANGES params FOR fieldprop_wa-FIELDNAME.

check callcontrol-step = 'PRESEL1'.

IF PARAMETER_OPTIMIZE IS INITIAL.

CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'

EXPORTING

PARAMETER = 'PARAMETER_OPTIMIZE'

IMPORTING

VALUE = value

TABLES

SHLP_TAB = SHLP_TAB

RECORD_TAB = RECORD_TAB

CHANGING

SHLP = SHLP

CALLCONTROL = CALLCONTROL

EXCEPTIONS

OTHERS = 2.

IF SY-SUBRC = 0.

SPLIT value AT ',' INTO TABLE param_tab.

ENDIF.

ENDIF.

<Your required logic come here>

<SHLP_TAB have the fld information which you created in the view>

<based on the fld order, RECORD_TAB will the maintain the data as one line for each record>

<if you want to change the data you want to use the offset based on the fld lenght in SHLP_TAB and then you change the data>

I hope I anw your qus.