Exit: Standart Search Help
Hi.
I am involved in an upgrade Project and I am having problems with one transaction that was enhanced in a Match Code.
I found the match code (search help) that was enhanced in the last version (4.6C) and I realized that in the new version it was not changed, so I did it manually. When I tested the match code in last version I put break points in the function module related with the search help and when I press the match code, the debug showed to me the function module related with the enhanced search help. I did the same in the new version, but the search help did not attach the function module enhanced.
I dont really know which the problem is, but I can see that it is like if the search help that was modified were not the correct one.
So, what I want to know is how I could find in a standard transaction, the name of the search help (match code) that I need to change.
Thanks..
Diana.
You may need to find out where or at what level the search help is attached. There is a hierarchy for this, the below link may help you.
http://help.sap.com/saphelp_47x200/helpdata/en/0b/32e9b798da11d295b800a0c929b3c3/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/8b/415d363640933fe10000009b38f839/content.htm
Regards,
Anish Thomas
Similar Messages
-
How to add the custom help exit to search help in SE11
Hi All,
I am trying to add the ZF4IF_SHLP_EXIT_EXAMPLE to search help exit in SE11 for search help LART . But system is asking for the access key.
Is there any way we can achieve this with out using access key?
Please suggest me.
Regards
SubhaskarHi,
To add a Search help exit goto SE11 -> in Search help option enter 'LART' -> click on display.
once you have entered in you will have to click on change button. This will give on information message first, then it will ask if you have to maintain in the original language itself(only if you have logged in with any language other than DE). You can select your option in that then you will be able to view the same in EDIT mode. now you can go ahead and add your search help exit.
Hope it helps.
Thanks & Regards,
Praveenkumar T. -
Search Help Exit - Dependent Search Help
Hello All
My question is related to Sarch Help in SE11.
I have created a Search Help and implemented a Search help Exit.In My search help i have PLANT and LGORT(storage loc.).
and i have taken the Search help of PLANT and LGORT from T001L table( H_T001W and H_T001L).
Now on the SELECTION SCREEN of SEARCH HELP ,based on PLANT selected, the Storage Location should come with filtered records based PLANT.
A kind of Dependent Seach help.
I have Checked that in TABLE T001L, when i do F4 on PLANT and then if i do F4 on LGORT it comes with the filtered records.
Kindly Help.
Points will be Awarded.*Below is the Code:-
IF callcontrol-step <> gc_selone AND "SELONE
callcontrol-step <> gc_select AND "SELECT
callcontrol-step <> gc_disp AND "DISP
callcontrol-step <> gc_presel. "PRESEL
EXIT.
ENDIF.
"Checking Call Control Step is "PRESEL" For doing Validation and
"changing the field Label before displaying the Scren.
IF callcontrol-step = gc_presel."'PRESEL'.
ASSIGN shlp TO <fs_shlp1> .
READ TABLE <fs_shlp1>-interface ASSIGNING <fs_shlp2> WITH KEY f4field = gc_x."X
IF sy-subrc = 0.
<fs_shlp2>-f4field = gc_space."' '.
ENDIF.
*Renaming Internal Characteristic to Characteristics Name
LOOP AT <fs_shlp1>-fielddescr ASSIGNING <fs_shlp3>.
IF <fs_shlp3>-fieldname = gc_flag."Renaming "FLAG" to "NO ZERO STOCK BATCH"
<fs_shlp3>-fieldtext = text-001.
<fs_shlp3>-reptext = text-001.
<fs_shlp3>-scrtext_s = text-002.
<fs_shlp3>-scrtext_m = text-001.
<fs_shlp3>-scrtext_l = text-001.
ELSEIF <fs_shlp3>-fieldname = gc_lgort."Renaming "STORAGE LOCATION".
<fs_shlp3>-fieldtext = text-005.
<fs_shlp3>-reptext = text-005.
<fs_shlp3>-scrtext_s = text-006.
<fs_shlp3>-scrtext_m = text-005.
<fs_shlp3>-scrtext_l = text-005.
ENDIF.
ENDLOOP.*Validation for PLANT
CALL FUNCTION 'F4UT_PARAMETER_REQUIRED'
EXPORTING
parameter_required = gc_werks "Field to be mandatory('WERKS')
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
CHANGING
shlp = shlp
callcontrol = callcontrol.
ENDIF.
IF callcontrol-step = gc_select. "SELECT*Reading all the Values given at screen.
PERFORM read_shlp USING shlp.
IF ( r_atwrt IS NOT INITIAL OR r_atinn IS NOT INITIAL ).*If user has only given CHARACTERISTICS and VALUE as selection criteria.
PERFORM char_value_fetch.
ELSEIF r_matnr IS NOT INITIAL OR r_werks IS NOT INITIAL OR r_lgort IS NOT INITIAL.*If user has only given any value other than CHARACTERISTICS and VALUE as selection criteria.
PERFORM fetch_other_details.
IF gv_flag = gc_x. "'X'
DELETE gt_final WHERE clabs = gc_labst.
DELETE gt_final WHERE cinsm = gc_labst.
ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.*Prepare Final Table
ENDIF.
IF callcontrol-step = gc_disp. "DISP*Refreshing the RECORD_TAB and Populating it with values of GT_FINAL
REFRESH:record_tab.
callcontrol-maxexceed = gc_x. "X*This Method Fills the RECORD_TAB from GT_FINAL to display.
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = gt_final
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
IF sy-subrc <> 0.* Implement suitable error handling here
ENDIF.*Refreshing GT_FINAL
REFRESH: gt_final,r_matnr,r_atwrt,r_atinn,r_klart,r_werks,r_lgort,shlp_tab,gt_mchb,gt_mara,gt_makt,gt_ausp,gt_mcha.
CLEAR:gv_flag.
ENDIF. -
Steps for creation of search help exit for a search help
Hi,
I have created a search help. I need to create a search help exit for this search help.
Please let me know how to create a search help exit as well as how to link it to my search help.1)Copy the FM F4IF_SHLP_EXIT_EXAMPLE to write your own FM. (check the documentation and coding of FM F4IF_SHLP_EXIT_EXAMPLE).
2)write your code depending upon the functionality you want.
3)attach the FM in search help through SE11 in "search help exit" field.
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
This module has been created as an example for the interface and design of Search help exits in Search help.
All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
A search help exit is called repeatedly in connection with several events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
For more detailed information please refer to the documentation describing the concept of the search help exit.
The module must react with an immediate EXIT to all steps that it does not know or does not want to handle. -
Need selection screen values in Search help user exit in same report
Hi Experts,
I am using Logical Data Base PNP.
Created a custom search help to validate the records for IT000 based on the selection screen dates.
Enter the DATEs for Data Selection Period and Person selection period in the selection screen.
When I for search help for PERNR field in the same report, I need the selectin screen DATE values to be in user-exit of search help.
This will help me in validating the records for specific employees within the date range of given DATE in selectin period.
As of now it's picking the employees based on the DATE selection of selection screen,
Regards,
PrasadHi,
Go Ahead as mentioned by Satyesh T - (Option two).
Reading Select Options from DYNP_VALUES_READ
reffer the above link for getting more clarity for using 'DYNP_VALUES_READ'
Regards.
Arun -
Search help behavior with user exit
When a search help is executed you get a result (that appears in the internal table record_tab that satisfies your selection criteria. If, without leaving the search help, you enter a new selection it can return an entirely different set of records. That is the normal behavior and what users expect.
However, I do some processing in the CALLCONTROL-STEP = 'DISP' that pares down the result set in record_tab based on the users authorization. When I return to another selection it operates on the pared down result set in record_tab and does not make another selection. i.e. record_tab is not refereshed for the new selection. I am clearly doing something wrong.
This is the specific case: Users are limited to customers in their specific sales group defined in KNVV-VKGRP. I use an exit in search help DEBIS to check whether the user is authorized for the sales group. A user is authorized for users in group 001 and 042. There first selection is from sales group 001. It returns 50 records. They decide that they chose the wrong group so they select sales group 042. It returns 0 records. However, had they selected from group 042 from the outset they would have had two hits. The second pass is working on the selection set from the first pass. (or so it seems)
Any thoughts?Hi Corwin
<REMOVED BY MODERATOR>
FUNCTION z_shlp_exit_bpartner_reltyp.
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
DATA: rc LIKE sy-subrc,
dialog_canceled TYPE c,
lc_bp_shlp_badi TYPE funcname VALUE 'BUP_SHLP_EXIT_BADI'.
TYPES: BEGIN OF ls_view.
INCLUDE STRUCTURE but050.
TYPES: END OF ls_view.
DATA: lt_view TYPE STANDARD TABLE OF ls_view,
wa_view TYPE ls_view.
DATA: wa_shlp LIKE LINE OF shlp-fielddescr.
CALL FUNCTION 'F4UT_OPTIMIZE_COLWIDTH'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
CHANGING
shlp = shlp
callcontrol = callcontrol.
*------ Rolle auf jeden Fall als Mußfeld ------------------------------
CALL FUNCTION 'F4UT_PARAMETER_REQUIRED'
EXPORTING
parameter_required = 'RELTYP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
CHANGING
shlp = shlp
callcontrol = callcontrol.
* 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'.
*--... Datendeklartionen.
CLASS cl_exithandler DEFINITION LOAD.
DATA: lv_exit_object TYPE REF TO if_ex_bupa_augrp, "#EC NEEDED
ls_auth_selopt TYPE ddshselopt,
lt_auth_selopt TYPE TABLE OF ddshselopt WITH DEFAULT KEY.
CALL FUNCTION 'F4UT_PARAMETER_REQUIRED'
EXPORTING
parameter_required = 'RELTYP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
CHANGING
shlp = shlp
callcontrol = callcontrol.
* Call "AUGRP" badi
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = lc_bp_shlp_badi
EXCEPTIONS
function_not_exist = 1
OTHERS = 2.
IF sy-subrc EQ 0.
CALL FUNCTION lc_bp_shlp_badi
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
CHANGING
shlp = shlp
callcontrol = callcontrol.
rc = sy-subrc.
ENDIF.
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'.
DATA: BEGIN OF ls_result,
partner LIKE but000-partner,
weekday LIKE crmm_tour_i-weekdayfrom,
terr_id LIKE crmm_territory-terr_id,
mc_name1 LIKE but000-mc_name1,
mc_name2 LIKE but000-mc_name2,
reltyp LIKE but050-reltyp,
partner2 LIKE but000_td-partner,
city LIKE adrc-city1,
post_code1 LIKE adrc-post_code1,
tel_number LIKE adrc-tel_number,
region LIKE adrc-region,
END OF ls_result.
* Local Variables
DATA: lv_resultcount TYPE i,
lv_adrno TYPE but020-addrnumber,
lv_name1 TYPE but000-mc_name1,
lv_name2 TYPE but000-mc_name2,
lv_pc TYPE adrc-post_code1,
lv_tele TYPE adrc-tel_number,
lv_guid TYPE but000-partner_guid,
lv_last TYPE adrc-name1,
lv_first TYPE adrc-name2,
lv_region TYPE adrc-region,
lv_city1 TYPE adrc-city1,
lv_trguid TYPE crmm_territory-terr_guid.
* Local Tables
DATA: ls_ddshselop TYPE ddshselopt,
lt_ddshselops TYPE ddshselops,
lt_result LIKE STANDARD TABLE OF ls_result,
wa_result LIKE ls_result.
* Ranges
RANGES: lr_reltyp FOR but050-reltyp,
lr_partner FOR but000-partner,
lr_name1 FOR but000-mc_name1,
lr_name2 FOR but000-mc_name2,
lr_region FOR adrc-region,
lr_city FOR adrc-city1,
lr_tele FOR adrc-tel_number,
lr_pc FOR adrc-post_code1.
SELECT rltyp FROM z_bupar_td INTO TABLE lt_view.
lt_ddshselops = shlp-selopt.
LOOP AT lt_ddshselops INTO ls_ddshselop.
CASE ls_ddshselop-shlpfield.
WHEN 'RELTYP'.
MOVE-CORRESPONDING ls_ddshselop TO lr_reltyp.
APPEND lr_reltyp.
WHEN 'PARTNER'.
MOVE-CORRESPONDING ls_ddshselop TO lr_partner.
APPEND lr_partner.
WHEN 'MC_NAME1'.
MOVE-CORRESPONDING ls_ddshselop TO lr_name1.
APPEND lr_name1.
WHEN 'MC_NAME2'.
MOVE-CORRESPONDING ls_ddshselop TO lr_name2.
APPEND lr_name2.
WHEN 'REGION'.
MOVE-CORRESPONDING ls_ddshselop TO lr_region.
APPEND lr_region.
WHEN 'CITY'.
MOVE-CORRESPONDING ls_ddshselop TO lr_city.
APPEND lr_city.
WHEN 'TEL_NUMBER'.
MOVE-CORRESPONDING ls_ddshselop TO lr_tele.
APPEND lr_tele.
WHEN 'POST_CODE1'.
MOVE-CORRESPONDING ls_ddshselop TO lr_pc.
APPEND lr_pc.
ENDCASE.
ENDLOOP.
SELECT * FROM but050 INTO TABLE lt_view
WHERE reltyp IN lr_reltyp
AND partner1 IN lr_partner.
LOOP AT lt_view INTO wa_view.
wa_result-partner = wa_view-partner1.
wa_result-reltyp = wa_view-reltyp.
*___ adress details
SELECT SINGLE addrnumber FROM but020 INTO lv_adrno
WHERE partner EQ wa_result-partner.
SELECT SINGLE post_code1 tel_number name1 name2 region city1 FROM adrc
INTO (lv_pc , lv_tele, lv_last, lv_first, lv_region, lv_city1)
WHERE addrnumber EQ lv_adrno AND region IN lr_region
AND city1 IN lr_city AND tel_number IN lr_tele
AND post_code1 IN lr_pc.
*___ names
SELECT SINGLE mc_name1 mc_name2 FROM but000
INTO (lv_name1 , lv_name2)
WHERE partner IN lr_partner
AND mc_name1 IN lr_name1
AND mc_name2 IN lr_name2.
*___ CRM patner guid
SELECT SINGLE partner_guid FROM but000
INTO lv_guid
WHERE partner EQ wa_result-partner.
*___ Territory guid
SELECT SINGLE terr_guid FROM crmm_territory_v
INTO lv_trguid
WHERE guid EQ lv_guid.
SELECT SINGLE terr_id FROM crmm_territory
INTO wa_result-terr_id
WHERE terr_guid EQ lv_trguid.
*__ weekfrom
SELECT SINGLE weekdayfrom FROM crmm_tour_i
INTO wa_result-weekday
WHERE guid EQ lv_guid.
wa_result-post_code1 = lv_pc.
wa_result-tel_number = lv_tele.
wa_result-mc_name1 = lv_name1.
wa_result-mc_name2 = lv_name2.
wa_result-partner2 = lv_first.
wa_result-region = lv_region.
wa_result-city = lv_city1.
APPEND wa_result TO lt_result.
lv_resultcount = lv_resultcount + 1.
IF lv_resultcount GE callcontrol-maxrecords.
EXIT.
ENDIF.
CLEAR: lv_pc,lv_tele,lv_name1,lv_name2,lv_first,lv_region,lv_city1.
CLEAR: wa_view, wa_result.
ENDLOOP.
* Prepare for output
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lt_result
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
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.
Edited by: Alvaro Tejada Galindo on Jan 24, 2008 4:32 PM -
Search help exit for field name: BANKL (bank number)
Is there any search exit that can be used on field BANKL to display only some bank based on user defined criteria?
Regardswe can create the search help ..
we dont need to use CMOD or SMOD for this .
The search help exit are implemented as function module (newly created) .
The place for exit in search help is blank but we can assing our exit ( FM created ) into that . Take the F1 help of that in change mode of search help .
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
well which search help you want to change. and what changes are needed .? -
Can somebody help me on how to create Search help exit?
I have requirement where in i have to use search help exit in search help .Based on the value in the GET parameter id i have to extract the value in the search help can somebody help me in this.
HI
In order to offer a meaningful input help for as many screen fields as possible, the R/3 System uses a number of mechanisms. If there is more than one such mechanism available for a field, the one that is furthest left or at the top of the above hierarchy is used.
In addition to the options described above for defining the input help of a field in the ABAP Dictionary, you can also define it in the screen field. The disadvantage, however, is that there is no automatic reuse.
With the screen event POV, you can program the input help of a field by yourself. You can adjust the design of the help to the standard help using the function modules F4IF_FIELD_VALUE_REQUEST or F4IF_INT_TABLE_VALUE_REQUEST. However, you should check to see if the part of the input help that you programmed yourself should be implemented as a search help exit instead (see Appendix).
You can also attach a search help to a screen field in the Screen Painter (Module Pool programming). There are some functional restrictions on this kind of attachment as compared with attachment in the Dictionary.
You should no longer use the input checks defined directly in the flow logic of the screen, from which it is also possible to derive input helps.
The function Technical info is offered in the hit list in the menu of the right mouse key. It can be used to find out which of the specified mechanisms is being used.
Check these links
Search Help Exits:
Re: dynamic values for search help
Re: Dynamic search help
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818
check out this link, it gives step by step example of implementing search help exit.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/implementing%2bsearch%2bhelp%2bexits -
Normally you relate a search help to a input box and let SAP to handle the F4. So after selecting a value, this value will be returned to the input box.
But i want to react on the value and don't put it automatically in the box, but process it first.
So my question is : is there a function module or class-method that simulates the search help for a given input and returns the chosen value ?
regards
Hans
[email protected]Hi
As Sergei told, it needs some further coding. I do not know a way to interfere standart search help functions even there is something like "Search help exit", I think it is just an exit for the search help designer about adjusting column widths etc... interfering standart action.
So it seems you should code your own POV in this case. There has been two long threads in this forum. You can search it. It is about coding POV and deals with "F4IF_FIELD_VALUE_REQUEST"/"F4IF_INTTAB_VALUE_REQUEST". Here are the URLs:
1. Re: POV : TableControl Multi-line User selection
2. Re: POV : SAP User Input F4 Value Help
Hope this helps...
*--Serdar -
Need some help in creating Search Help for standard screen/field
I need some help in adding a search-help to a standard screen-field.
Transaction Code - PP01,
Plan Version - Current Plan (PLVAR = '01'),
Object Type - Position ( OTYPE = 'S'),
Click on Infotype Name - Object ( Infotype 1000) and Create.
I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
I specify again, I have to add a new search help to standard screen/field and not to enhance it.
This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
It's urgent.
Thanks in advace. Suitable answers will be rewardedHi Pradeep,
Please have a look into the below site which might be useful
Enhancing a Standard Search Help
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
edc983384237
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
timepoints
The following timepoints are defined:
1. SELONE
Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
2. PRESEL1
After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
3. PRESEL
Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
4. SELECT
Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
5. DISP
Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
6. RETURN (usually as return value for the next timepoint)
The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
7. RETTOP
You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
8. EXIT (only for return as next timepoint)
The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
9. CREATE
The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
10. APP1, APP2, APP3
If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
F4IF_SHLP_EXIT_EXAMPLE
This module has been created as an example for the interface and design of Search help exits in Search help.
All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
A search help exit is called repeatedly in connection with several
events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
Hope this info will help you.
***Reward points if found useful
Regards,
Naresh -
Hi friends,
In dialog programming i am using table control for getting material details
in material number field i am using search help "sales material description(MAT1S)"
if i select the material number using search help then it display the sales organization
i give "conver. exit" = MATN1
"search help" = MAT1S
Thanks & Regards,
Vallamuthu.MI solved my own
-
SY-TABIX within a search help exit...
Hallo all,
I tried to find an answer in earlier postst, but did not succeed, therefore this message.
I have built a customtabel with several columns. For one of the columns I have built a custom search help, including some coding in the search help exit. In this coding I want to do a different selection based on the value in another column (BUKRS) of the same table. Do you understand what I mean?
The trick is to retrieve the right value of in the column BUKRS in the same line of the table, at the moment I am pushing F4 for another column.
And I dont know how to do this. I dont have the right SY-TABIX value, so this is not helping.
Does anybody have an idea as how to tackle this?
Kind regards,
ErikHello Francois & Holger,
Thanks for the reply, but Iu2019m calling this searh help from the transaction SE16 itself, so I donu2019t have my own table control. I am also using the search help in another situation (from a custom-made screen) and here I can pass on the value via a parameter, but this is not working in the case I described.
So the SY-STEPL is not working too....
Kind regards,
Erik -
Hi,
I need to enhanse search help and add F4 functionality to display list of company codes when cursor is in PBUKR field. I put F4IF_INT_TABLE_VALUE_REQUEST
into the user exit but nothing works.
I get error that PROCESS is not defined. If I remove that line there is no error but nothing works.
Can someone tell me what is wrong in the code below.
Thank you.
FUNCTION z_hr_shlp_wbs_element.
""Local interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
TABLES: prps.
DATA: it_prps LIKE prps OCCURS 0 WITH HEADER LINE.
DATA: status_tab LIKE jstat OCCURS 0 WITH HEADER LINE.
DATA: l_posid LIKE prps-posid.
DATA: l_subrc LIKE sy-subrc.
DATA: l_pbukr LIKE prps-pbukr, " Added by vr
value TYPE DDSHIFACE-VALUE.
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.
------------------------------------------------------ added by vr
PROCESS ON VALUE-REQUEST.
FIELD PRPS-PBUKR MODULE PBUKR.
DATA: BEGIN OF VALUE_TAB OCCURS 0,
LPBUKR LIKE PRPS-PBUKR,
LPOSID LIKE PRPS-POSID,
END OF VALUE_TAB.
DATA: BEGIN OF RETURN_TAB OCCURS 0.
INCLUDE STRUCTURE DDSHRETVAL.
DATA END OF RETURN_TAB.
SELECT PBUKR POSID FROM PRPS UP TO 20 ROWS
INTO TABLE VALUE_TAB WHERE SLWID = 'QLT UDF'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'PBUKR'
WINDOW_TITLE = 'Statusselektion'
VALUE_ORG = 'S' "hierdurch kann die Struktur genommen werden
TABLES
VALUE_TAB = VALUE_TAB
RETURN_TAB = RETURN_TAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
end of additions
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'.
Maximum records are set to 0 because the counter for Max records keeps
running, even if you filter out certain records. This is a similar
problem as described in OSS Note 148525.
Feb 3, 2004 LS: devk907353
(maxrecords = 0 defaults to maxrecords 500)
As of release 4.7, it appears that maxrecords is
being considered on the read of the view, rather
than prior to presenting the selection list.
When only 500 records are passed into this exit,
the subsequent evaluation yields very few records
in the selection list. By setting maxrecords to
8000, the entire contents of the view are passed
to this user exit, and therefor the search help
yields a reasonable selection list to the user
(as was the case in release 4.6b).
callcontrol-maxrecords = 0. " devk907353
callcontrol-maxrecords = 8000. " devk907353
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.
Added by vr, Nov. 2007 ---------------------------
CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
EXPORTING
PARAMETER = 'PBUKR' " Reference to search help parameter
IMPORTING
VALUE = value
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol.
l_pbukr = value.
End of additions by vr ---------------------------
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'.
DEVK909420 Begin
SELECT * FROM prps INTO TABLE it_prps
WHERE belkz = 'X'.
Changed by vr, Nov. 2007
IF l_pbukr <> ''.
SELECT * FROM prps INTO TABLE it_prps
WHERE belkz = 'X'
AND fkstl <> ''
AND pbukr = l_pbukr.
ELSE.
SELECT * FROM prps INTO TABLE it_prps
WHERE belkz = 'X'
AND fkstl <> ''.
ENDIF.
End of changes
DEVK909420 End
SORT it_prps BY posid.
LOOP AT record_tab.
l_posid = record_tab+96(24).
READ TABLE it_prps WITH KEY posid = l_posid.
IF sy-subrc = 0.
CALL FUNCTION 'STATUS_READ'
EXPORTING
objnr = it_prps-objnr
only_active = 'X'
TABLES
status = status_tab.
DEVK909329 Begin
read table status_tab with key inact = ''
stat = 'E0001'.
if sy-subrc is initial.
read table status_tab with key inact = '' "DEVK909345
stat = 'I0002'. "DEVK909345
endif.
DEVK909329 End
ENDIF.
IF sy-subrc NE 0.
DELETE record_tab.
ELSE.
IF record_tab+114(1) EQ '.' AND
record_tab+115(1) EQ '9'.
DELETE record_tab.
ELSE.
DEVK909420 Begin
IF record_tab+102(1) EQ '9'.
DELETE record_tab.
ELSEIF record_tab+104(1) EQ '9'.
DELETE record_tab.
ENDIF.
DEVK909420 End
ENDIF.
ENDIF.
ENDLOOP.
EXIT.
ENDIF.
ENDFUNCTION.Hi Vitaly,
Process on Value Request and search help exit is entirely two idea to display the f4 values.please remove the PROCESS ON VALUE REQUEST from the function module.write the required select statements after CHECK callcontrol-step EQ 'SELECT' . and pass the value to the function module
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = l_record
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.
IF ( sy-subrc = 0 AND l_record IS INITIAL ).
MESSAGE 'No values found' TYPE 'S'.
ENDIF.
callcontrol-step = 'DISP'.
Find the documentaion for this function module for further help
message edited by
shibu -
Help with DYNP_VALUES_READ and DYNP_GET_STEPL in search help exit
Hi,
I'm coding a search help exit for a field on a table control and I need to get access to the value of another field that's on the same line in order to limit the hit list. I can use DYNP_VALUES_READ to return the values from the step loop, but I can't find out which line of the step loop I'm on. DYNP_GET_STEPL always returns 0, presumably because I'm now in a function group and the step loop is getting reset. Any ideas?
Thanks in advance,
AndrewI want to read EBELP and INFNR.
Below is code that i'm using:
MOVE 'MEPO1211-EBELP' TO t_campos-fieldname.
APPEND t_campos.
MOVE 'MEPO1211-INFNR' TO t_campos-fieldname.
APPEND t_campos.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = 'SAPLMEGUI'
DYNUMB = '1211'
TABLES
DYNPFIELDS = t_campos
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
READ TABLE t_campos INDEX 1.
l_ebelp = t_campos-fieldvalue.
READ TABLE t_campos INDEX 2.
l_infnr = t_campos-fieldvalue.
The sy-subrc = 0, but the FM didn't bring the values of the screen fields. Is there some wrong with the filed name?
Thanks. -
Getting values from screen to search help exit
Hi Experts,
I have created a search help in which I am not using selection method but search help exit. Dialog type is 'Dialog with value restriction'. My requirement is to get the values entered in restriction screen into search help exit. Please suggest a parameter which will hold this value in search help exit function module.Hi M,
As you know there are 5 steps in search help exit. For each step, the values in parameter of your search help exit is different.
For your requirement, you need process in step 'DISP', and get the selection value from 'SHLP-SELOPT'.
Example:
*Build range for customer number
LOOP AT shlp-selopt INTO ls_selopt WHERE shlpfield = 'KUNNR'.
lr_kunnr-sign = ls_selopt-sign.
lr_kunnr-option = ls_selopt-option.
lr_kunnr-low = ls_selopt-low.
lr_kunnr-high = ls_selopt-high.
APPEND lr_kunnr.
CLEAR: lr_kunnr.
ENDLOOP.
Then using the lr_kunnr range in your select statement.
regards,
Archer
Maybe you are looking for
-
Syntax error when creating input-ready query
Hi, When creating an input-ready query, I set the key-figure to 'Data can be changed by user entries or Planning Functions' in the Planning Properties in the query designer. When I execute the query, I get the following error: Syntax Error in : CL_RS
-
OBJECTIVE: Write a program that will produce 15 random numbers. Print out, on one line, only the numbers who are divisible by 2, and multiples of 5 in between 10 and 40. Use any logic gates as necessary. Below is the source code of the program I have
-
Hello, Does anyone know if they updated the scrolling lists for mobile applications in the new Flash CS6? I'm talking about the smooth iOS type scroll. Since they have it in Flash Builder i really hope they put it in Flash Professional.
-
Can't open certain websites?
The website that I always downloaded Korean contents (movies, dramas, songs, etc...) is not accessible when I use a Mac, with any web browsers... Are there restricted sites or incompatible sites with macs?
-
Lightroom 5 - sync in develop is erratic
In develop, when I select a group of images in the thumbnail filmstrip at the bottom and apply snyced settings, lightroom will sometimes apply these settings to the next image I select, even though it wasn't highlighted when syncing. Also there is so