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

Search Help Exit

Former Member
0 Likes
1,192

Hi,

I am using search help exit for two parameters. I have created 1 function module for hel exit.

1 parameter is giving search help but second one is not giving search help. I have attached search help to field.

Plz update me, why it is happening as soon as possible.

Thanks

Ranveer

Hi,

I am using search help exit for two parameters. I have created 1 function module for hel exit.

1 parameter is giving search help but second one is not giving search help. I have attached search help to field.

Plz update me, why it is happening as soon as possible.

Thanks

Ranveer

5 REPLIES 5
Read only

Former Member
0 Likes
822

in SE11 follow the steps....

1. Create the search help.

2. Choose the Elementary srch hlp/ Collective search help

3. Provide the Selection method(give the DBtable name)

4. Give the parameters properly for search help

5. go to SE37

Create the Function Group

then Create the Function module with the name

F4UT_XXXXXXXXXX

it should start with the name F4UT*

then provide the interface

in the changing parameters provide the below..

SHLP TYPE SHLP_DESCR

CALLCONTROL LIKE DDSHF4CTRL

in the table params use the below..

SHLP_TAB TYPE SHLP_DESCT

RECORD_TAB LIKE SEAHLPRES

for any reference you can check any of the functions starts with

F4UT*

in the code you can see many steps.. for example if you want to display some extra information then you can use the step DISP. and you need to add the code under that block...

IF CALLCONTROL-STEP = 'DISP'.

If you have any issues let me know...

Read only

0 Likes
822

Thanks for reply.

I have done all things. but one parameter is giving search help and second one is not giving search help functionality (buble).

Read only

0 Likes
822

PARAMETERS: p_org LIKE t527x-orgeh MATCHCODE OBJECT <object name>.

Read only

Former Member
0 Likes
822

Hi,

1. Go to se11 create one search help.

2. create function module follow naming convention like

"F4UT_SHLP----


"

3. wirte down the code in function exit like

FUNCTION F4UT_SHLP_EXT_LGOBE.

*"----


""Local Interface:

*" TABLES

*" SHLP_TAB TYPE SHLP_DESCT

*" RECORD_TAB STRUCTURE SEAHLPRES

*" CHANGING

*" VALUE(SHLP) TYPE SHLP_DESCR

*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL

*"----


EXIT immediately, if you do not want to handle this step

IF CALLCONTROL-STEP 'SELONE' AND

CALLCONTROL-STEP 'SELECT' AND

" AND SO ON

CALLCONTROL-STEP 'DISP'.

EXIT.

ENDIF.

*"----


STEP SELONE (Select one of the elementary searchhelps)

*"----


This step is only called for collective searchhelps. It may be used

to reduce the amount of elementary searchhelps given in SHLP_TAB.

The compound searchhelp is given in SHLP.

If you do not change CALLCONTROL-STEP, the next step is the

dialog, to select one of the elementary searchhelps.

If you want to skip this dialog, you have to return the selected

elementary searchhelp in SHLP and to change CALLCONTROL-STEP to

either to 'PRESEL' or to 'SELECT'.

IF CALLCONTROL-STEP = 'SELONE'.

PERFORM SELONE .........

EXIT.

ENDIF.

*"----


STEP PRESEL (Enter selection conditions)

*"----


This step allows you, to influence the selection conditions either

before they are displayed or in order to skip the dialog completely.

If you want to skip the dialog, you should change CALLCONTROL-STEP

to 'SELECT'.

Normaly only SHLP-SELOPT should be changed in this step.

IF CALLCONTROL-STEP = 'PRESEL'.

PERFORM PRESEL ..........

EXIT.

ENDIF.

*"----


STEP SELECT (Select values)

*"----


This step may be used to overtake the data selection completely.

To skip the standard seletion, you should return 'DISP' as following

step in CALLCONTROL-STEP.

Normally RECORD_TAB should be filled after this step.

Standard function module F4UT_RESULTS_MAP may be very helpfull in this

step.

IF CALLCONTROL-STEP = 'SELECT'.

PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB

CHANGING SHLP CALLCONTROL RC.

IF RC = 0.

CALLCONTROL-STEP = 'DISP'.

ELSE.

CALLCONTROL-STEP = 'EXIT'.

ENDIF.

EXIT. "Don't process STEP DISP additionally in this call.

ENDIF.

*"----


STEP DISP (Display values)

*"----


This step is called, before the selected data is displayed.

You can e.g. modify or reduce the data in RECORD_TAB

according to the users authority.

If you want to get the standard display dialog afterwards, you

should not change CALLCONTROL-STEP.

If you want to overtake the dialog on you own, you must return

the following values in CALLCONTROL-STEP:

- "RETURN" if one line was selected. The selected line must be

the only record left in RECORD_TAB. The corresponding fields of

this line are entered into the screen.

- "EXIT" if the values request should be aborted

- "PRESEL" if you want to return to the selection dialog

Standard function modules F4UT_PARAMETER_VALUE_GET and

F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.

IF CALLCONTROL-STEP = 'DISP'.

PERFORM AUTHORITY_CHECK TABLES RECORD_TAB SHLP_TAB

CHANGING SHLP CALLCONTROL.

EXIT.

ENDIF.

ENDFUNCTION.

implement code in the perform authority_check.

FORM AUTHORITY_CHECK TABLES RECORD_TAB STRUCTURE SEAHLPRES

SHLP_TAB TYPE SHLP_DESCT

CHANGING P_SHLP TYPE SHLP_DESCR

P_CALLCONTROL TYPE DDSHF4CTRL.

data: wa_shlp type DFIES,

v_lgobe type zt001l-zlgobe_de,

lt_record type SEAHLPRES occurs 0 with header line.

read table shlp_tab index 1.

loop at record_tab.

read table shlp_tab-FIELDDESCR into wa_shlp with key tabname = 'T001L'

fieldname = 'WERKS'.

*if record_tab-string+3(4) = 1000.

lt_record-string = record_tab-string.

select single zlgobe_de

from zt001l

into v_lgobe

where werks = record_tab-string+3(4) and

lgort = record_tab-string+7(4).

if sy-subrc eq 0.

lt_record-string+11(16) = v_lgobe.

clear v_lgobe.

append lt_record.

endif.

endloop.

loop at lt_record.

record_tab-string = lt_record-string.

append record_tab.

clear record_tab.

endloop.

ENDFORM. " AUTHORITY_CHECK

Then activate and execute.the above example is implenmented for storage location.

Thanks,

suman

Read only

former_member156446
Active Contributor
0 Likes
822

Hi check my weblog @ https://wiki.sdn.sap.com/wiki/x/du0 for search help exit code