Applying filters to F4 Search help - how so with many entries?
Hello all,
I have a problem that I have to filter a search help for employees. We use a DB view that unions infotypes 1, 2 and 105. Now I need to restrict potential employees to a given company code BUKRS.
I now invoke search help in REQUEST ON-VALUE REQUEST within a DynPro screen and call function module F4IF_INT_TABLE_VALUE_REQUEST which I am passing the restricted internal table.
Fine, that works - however, in the DynPro (which is actually used as an EWT within our portal), the entire internal table is sent to the frontent instead of, say, 250 or so.
The search help dialog offers the possibility to manually restrict for first and last name - is it perhaps possible, that this search only applies on the server (ITAB) and just returns the results according to the user input?
Otherwise, sending all potential employees to the frontend is consuming too much resources (time and traffic).
In function group SDHI there is an "example" module F4IF_SHLP_EXIT_EXAMPLE which tries to explain how to use callbacks but from my point of view I understand very few (it misses the big picture).
Do you know an alternative, e.g. using the other module F4IF_FIELD_VALUE_REQUEST and to apply a filter to BUKRS using a callback mechanism? There are module parameters indicating that possibility (passing some report?). Perhaps one of you has some sample code, because I am much more trained in BAPI and web stuff only...
Any hints? Thank you in Advance!
Regards,
Timo
Hi,
if I can understand you, you tell me that you search information in the view and all found records (let´s say 300) are saved in the internal table, which in time you pass to function F4IF_INT_TABLE_VALUE_REQUEST for display. Now, you think it is too much to display 300 records because of time and traffic.
Try this:
REPORT ztest NO STANDARD PAGE HEADING.
TABLES mara.
DATA: mytable TYPE TABLE OF ddshretval WITH HEADER LINE.
DATA l_repid TYPE syrepid.
PARAMETERS p_mtart LIKE mara-mtart.
AT SELECTION-SCREEN ON VALUE-REQUEST
FOR p_mtart.
l_repid = sy-repid.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'MARA'
fieldname = 'MTART'
dynpprog = l_repid
callback_program = l_repid
callback_form = 'F4CALLBACK'
TABLES
return_tab = mytable
EXCEPTIONS
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
START-OF-SELECTION.
*& Form F4_form
Exclude all material types that start with F & H
FORM f4callback
TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr
callcontrol LIKE ddshf4ctrl.
DATA: aux_struc TYPE ddshselopt.
MOVE: 'H_T134' to aux_struc-shlpname,
'MTART' TO aux_struc-shlpfield,
'E' TO aux_struc-sign,
'CP' TO aux_struc-option,
'F*' TO aux_struc-low.
append aux_struc to SHLP-SELOPT.
MOVE: 'H_T134' to aux_struc-shlpname,
'MTART' TO aux_struc-shlpfield,
'E' TO aux_struc-sign,
'CP' TO aux_struc-option,
'H*' TO aux_struc-low.
append aux_struc to SHLP-SELOPT.
ENDFORM. "F4_form
Similar Messages
-
Hi,
I would like to create filters in the search helps on input fields. Somehow i don't find a way to create filters in the search helps.
Thanks
AmanHi Amandeep,
I think you need to re do the whole results view of your search.
1. You have a collection of objects/entities (result of your search).
3. You need to display only those which match the filter set by user. Full list will be displayed for start.
4. Create new input fields for every column you want users to filter and provide a filter button.
5. Once user has entered the filter prompt them to click on filter button and display only those objects which match the criteria. How will you do it. you'll have to loop through teh collection of entities and check each one for matching the filter you know get_property..... methods. You can achive this by having two contect nodes of same type so that you can retain the orignal list incase user wants to revert or with one context object you'll have re run teh querry every time user wants to return to full list.
Warm Regards,
Anuj Nagpal -
Qtn: I have 10 standard elementary search helps in collective standard search help, how to deactivate the 10th elementary search help?
Hello,
this topic is still a problem for me, does anybody have an idea.
Just to show what's my problem:
Collective Search help KRED does include a SAP append-search help ASH_KRED which holds the elementary search helps KREDC, KREDE, KREDM, KREDW.
The search helps KREDE, KREDM, KREDW should not be displayed, so I added another Serach-Help-Append ZKRED_CUST at the end of CSH KRED which holds these 3 SH's with the hidden flag.
That works, the SH's are not shown anymore.
I also added some other of the Original SAP SH's (e.g. KREDA) with the hidden flag and added changed copies of these (e.g ZKREDA) there to be shown instead.
All this can be done modification free by appends.
The folders of the elementary search helps are shown in the order as they are found included in the KRED SH and the append to this SH.
This means that the not hidden Sh KREDC from ASH_KRED is shown before all the "custimized" ZKREDx -SH's. But we need this SH not very often, so that I want it to displayed al the right-most position of the folders of SH's or at the most down postition of the drop-down-selection of SH's.
But I have not found any way to do this modification free.
The only way to archive this is to modify ASH_KRED by setting the Hidden-Flag for KREDC and add this SH at the end of append-SH ZKRED_CUST again.
But I want avoid this modification.
So, is there any way to do this without modifing any of the original SAP SH's ?
Helmut Fischer -
Dictionary Search Help - how to trigger an event after F4 help
Hi,
I been searching the web lately to find a way to trigger an event after using the F4 input help.
Here is an example of what I would like to do:
- I have a WD form with a inputfield in it.
- The input field is bound to datalement "LIFNR".
- In my context I have specified the Input Help Mode to "Dictionary Search Help"
- And the Dictionay Search Help is set to "KRED"
A user will the click on F4 to start the Search help, then pick a LIFNR and the WD inputfield wil be filled.
What I want is to trigger an event when this is happening.
Does anyone have som tips or guides for me regarding this problem?
Thanks in advance! =)Hi Mathias Hagen
Actually there is no straight way of doing this , but still you can trigger a event in F4 search help ... below is very informative blog to trigger the F4 search help by chris
Firing a WDA event on using a Search Help - how to do it, without an NDA
regards
Chinnaiya P -
Search help - how to further restrict its values
Hi,
I have a question here regarding search helps and I hope you all could provide me with some useful pointers.
There is a select-option of the type bkpf-blart (document type) in the selection screen. I have a problem with retrieving the data properly from the table bkpf for the search help values bkpf-blart so that it will only return 3 values, kr, re and zb values. How may I achieve this properly using a select statement and then using the function module f4if_int_table_value_request?
(I am referring to a tutorial from the SAP technical website as a guide to use the function module f4if_int_table_value_request.)
Appreciate any inputs here, as I am still learning the ropes in abap.
Many thanks in advance.Hi,
try using this demo program
MODULE GET_F4_HELP INPUT.
TYPES : BEGIN OF EMPLOYEE,
EMPNO TYPE ZTG_EMP-EMPNO,
END OF EMPLOYEE.
DATA : EMPTAB TYPE STANDARD TABLE OF EMPLOYEE WITH HEADER LINE,
TB_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
PLAN_ID TYPE ZTG_HEALTH-PLAN_ID.
CLEAR: TB_DYNPFIELDS.
REFRESH: TB_DYNPFIELDS.
MOVE 'ZTG_EMP-HLTH_PLAN' TO TB_DYNPFIELDS-FIELDNAME.
APPEND TB_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = 'SAPMZTG01'
DYNUMB = '1010'
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = ' '
* START_SEARCH_IN_MAIN_SCREEN = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
DYNPFIELDS = TB_DYNPFIELDS
* 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
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE TB_DYNPFIELDS INDEX 1.
IF SY-SUBRC EQ 0.
PLAN_ID = TB_DYNPFIELDS-FIELDVALUE.
ENDIF.
SELECT EMPNO FROM ZTG_EMP
INTO TABLE EMPTAB
WHERE HLTH_PLAN = PLAN_ID.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'EMPNO'
* PVALKEY = ' '
DYNPPROG = 'SAPMZTG01'
DYNPNR = '1010'
DYNPROFIELD = 'TB1'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = EMPTAB
* FIELD_TAB =
* RETURN_TAB =
* 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.
ENDMODULE. " GET_F4_HELP INPUT
Thanks
Arun Kayal -
Search help how to restrict number of hits.
Hi,
I have created a search help in SE11, the search help reads a table view and the search help is connected to
exit HRMC_PREM_EXIT_A in HR. Everything works fine except for that I want to restrict the number of hits to 500, I don't want to get a result of 5000 hits because that search takes too long time.
Br BenitaHello Benita
Set the dialog type of your search help = 'A' (dialog depends on set of values).
Regards
Uwe -
Search Help User Exit (if "one" entry in hit list, skip hit list and export)
Hi everyone,
I hope you can help me. I spent many hours on this one but I just could not find a solution (by myself and by searching google and searching the SCN).
Problem like thread subject.
I have the requirement to create a search help using search help exit. Done so far. My search help works fine. There´s a Sel Opt and I get the hit list with several entries. "But" I have one problem. If there is only one entry I have to skip the hit list and just export the value straight to the caller.
I just don´t get it to work. I used the function module F4UT_PARAMETER_RESULTS_PUT but there was no value in shlp-interface-value. Record Tab was written, but value is not exported.
Maybe you got some hints for me?`
Best regards
DominikHi Raymond,
I passed as followed:
***CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
*** EXPORTING
*** PARAMETER = 'DOC_ID'
*** VALUE = ls_disp_data-doc_id
*** fieldname = 'DOC_ID'
*** TABLES
*** SHLP_TAB = SHLP_TAB
*** RECORD_TAB = RECORD_TAB
*** SOURCE_TAB = lt_disp_data
*** CHANGING
*** SHLP = SHLP
*** CALLCONTROL = CALLCONTROL
*** EXCEPTIONS
*** PARAMETER_UNKNOWN = 1
*** OTHERS = 2.
LT_DISP_DATA is filled with one entry only. DOC_ID is the name of the field I want the value to be set.
Update: It´s fixed. I reset the whole thing. I did set callcontrol-step = 'RETURN' after function call, "but" at the end of the coding there was a leftover from previous tries (an empty if callcontrol-step = 'RETURN' -shell). By setting this condition explicitly the "standard flow" was interrupted.
So, in short: I had to delete the empty if-condition for callcontrol-step = RETURN and then it worked.
Thank you all for your feedback, hints and suggestions!
Best regards,
Dominik -
Help, how to check anonymous entry from access logfile.
Can someone tell me how to check anonymous entry from logfile?
From which field I can tell it's an anonymous entry?
Thanks!
MarvinIn the Directory's access log you will see a RESULT entry like the following, where the dn="" indicates an anonymous BIND
[01/Mar/2007:14:24:59 -0500] conn=7 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0.127000 dn=""
If an actual user logged in the RESULT line would include the user's DN, like below
[01/Mar/2007:14:24:59 -0500] conn=2019877 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0.127000 dn="uid=myuserid,ou=people,dc=test,dc=com"
If you are deloyed on a Unix/Linux system you can count all the anonymouse BINDS using the following
grep -c "tag=97 .*dn=\"\"" access -
Search Help for Ename with any character
Hi Gurus,
I provided the Personnel no( pernr ) with input field, once if we press the f4 on pernr. It opens the dialog box which contains
the pernr and ename from pa0001. Now my requirement is, i will provide the value for ename i.e. kumar . so it has to bring the values i.e kumar , before kumar and after kumar values. I'm using OVS in wd abap but not getting exactly. Please provide the logic for this.
Thanks & Regards
ChaitanyaHi.,
Read the name value using get_attribute method. let say lv_name.,
now.,
concatenate '%' lv_name '%' into name.
select pernr ename from pa0001 into lt_tab where name like name.
now set lt_tab to result list.
hope this helps u.,
@moderators: move this to Web dynpro forum, instead of closing this.,
Thanks & Regards,
Kiran -
How to create user exit search help
Hi,
I have created a search help from se11 with a field (PT9653-ZDOCENTE) of table control.
Now I want to fill another field (PT9653-ZMATERIA) of table control when the user select a value in the search help.
How do I do it?
I read that I must use a user exit, is it correct?
could you give me some examples?I have created a exit that should upgrade the second field with the function
dynpvaluetab2-fieldname = 'PT9653-ZDOC_TXT'.
WRITE wa_nome TO dynpvaluetab2-fieldvalue.
dynpvaluetab2-stepl = sy-stepl.
APPEND dynpvaluetab2.
CLEAR dynpvaluetab2.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'MP965300'
dynumb = '2000'
TABLES
dynpfields = dynpvaluetab2.
but it is not work.
Instead, if the first use F4IF_INT_TABLE_VALUE_REQUEST to see the search help and then the DYNP_VALUES_UPDATE to update the other fields work.
SELECT objid stext FROM hrp1000
INTO CORRESPONDING FIELDS OF TABLE tab_materie
WHERE plvar EQ '01'
AND otype EQ 'ZM'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'OBJID'
dynpprog = sy-repid
dynpnr = '2000'
dynprofield = 'PT9653-ZMATERIA'
value_org = 'S'
TABLES
value_tab = tab_materie
return_tab = tb_ret_conc
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE s000(zh) WITH 'Non trovati record per questa selezione'.
ENDIF.
GET CURSOR FIELD pt9653-zmateria LINE riga_corrente.
READ TABLE tb_ret_conc INDEX riga_corrente.
REFRESH dynpvaluetab.
dynpvaluetab-fieldname = 'PT9653-ZMATERIA'.
WRITE tb_ret_conc-fieldval TO dynpvaluetab-fieldvalue.
dynpvaluetab-stepl = riga_corrente.
APPEND dynpvaluetab.
CLEAR dynpvaluetab.
READ TABLE tab_materie WITH KEY objid = tb_ret_conc-fieldval.
dynpvaluetab-fieldname = 'PT9653-ZMAT_TXT'.
WRITE tab_materie-stext TO dynpvaluetab-fieldvalue.
dynpvaluetab-stepl = riga_corrente.
APPEND dynpvaluetab.
CLEAR dynpvaluetab.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = dynpvaluetab.
bold The problem is that for this field, I need a collective search help , and therefore I can not use the F4IF_INT_TABLE_VALUE_REQUEST. bold -
How to add search help to custom infotype listbox??
Hi All,
How to add search help to custom infotype listbox??
Thanks in advanceHi Vinay,
We have search help and list box as 2 different options.
At a time we can make a field a list box or a search help.List box is restricted and we can pick values from the defined list whereas in search help we can allow more entries and then validate the value entered later.
Implementing a listbox or search help in infotype is same as that of implementing it in a modulepool .
for search help..we can create a custom search help or check for existing search help in se11
then in the screen on infotype field..assign the search help direcly at the screen painter level..
double click on the field in screen painter -> change mode and then in the space for "search help" enter the search helps name
for list box..in the screen painter ,make sure the field is selected as list box..then in PAI of screen we do a
(Process on value-request..field fieldname module module name)..check syntax and other details...
Using function module vrm_set_value fill the field and populate it as required
Pls check and revert
Regards
Byju -
How to code my logic in Search Help Exit
Hi,
I need to add my own Search Help say MATOG in Material MATNR Collective Search Help MAT1-> Collective Search help MAT1_A.
Is it possible?
And , when I need to add my own logic in Search Help exit for my particular Search Help, how should I code?
Thanks,
Shivaa..Hi,
Go through below link, it gives you step by step approach in implementing search help exit.
https://wiki.sdn.sap.com/wiki/display/Snippets/ImplementingSearchHelp+Exits
Regards,
Raghavendra -
Restrict dictionnary Search help displayed values.
Hi,
my problem is that I have to display a search help. The search help already exists in the dictionnary and is defined using a Dictionnary Table.
I need to display the same serach help but I have to filter the results using a range of values for one of the fields and I would like to know how to proceed.
I know that user-exit exists in some search help, it's not the case here.
The kind of solutions I'm looking for is :
- directly restrict the existing search hellp values
- found a way to display a search help from abap using an internal table ( cause it's easy in this case to do fill a internal table doing the sql request myself)
- if the solutions above can't apply, doing my own search help in the dictionnary but in this case, I don't know to make this search help for values restriction.
I specify that the screen use the screen painter, it may be important ?
Thanks for your help
best Regards,
MorganHi,
Search Hels exits is only for exceptions, so in our case, we won't use the search help exits, it is better create/change the Custome one and attach the same to the fiels, there you can give the Default value for the fileds, so there you can restrict the values
or else, we have an option like, APPEND SEARCH HELPS, so by using this, we can restrict some field values, this Append Search helps, can be append to Standard Search helps also, so do Append the Standard Search help and add your field and give the Default values to restrict the user
hope you get the answer
Regards
Sudheer -
Hide all tabs in Personal Number Search Help
Hi Experts,
In Assest Master AS01, there is a personal number field. When user click on search icon from this field, system has to show only newly added elementary search help tab and hide all standard elementary search helps tabs tagged to Collective Search help PREM.
Collective search help tagged to Personal number is PREM. I am able to hide all elementary search helps by adding some code in search help exit "HRMC_PREM_EXIT_A " and can see newly added search help. But with addition to this tab there is one more search help tab is apperaing. Name of the appered search help is "Free Search". I checked PREM but there is no any elementary search help with this name.
The reason behind adding new search tab is user should not see sensitive data and personal details.
Can anybody tell me how to hide this tab? Your suggation(any enhancement point) is highly needed for me.
Thanks in advance!
Regards,
Meera.Hi,
In the P_Pernr object for field, AUTHC add M as well. Refer the below link for more detals.
http://help.sap.com/erp2005_ehp_02/helpdata/en/ef/4aba3b3bf00152e10000000a114084/content.htm
Regards,
Gowrinadh -
GL Account Search Help...
We do not assign GL Accounts. We force the user to select one. We prefer that they use the supplied search help to select the GL.
Currently, we are swithing one of our system from an R/3 backend to a non-R/3 backend. For detailed reasons, we are storing the GL Accounts locally. We would like to provide a search help with these values and the texts, but the standard access for search helps is not available in the BADI's.
Any ideas on how to populate the search help for GL with local data?
Thanks
DaveSundeep,
Thanks for the response.
My problem is that the standard BADI does not include a method that will effect the GL Account. It has about 15 or 20 methods to deal with the other Search Helps, but not the GL Account.
If it is there, could you point me to the specific method, because none of them seem to point the GL Account or Account Assignment. There is one for Account Assignment Category...but I don't think that is what I want.
One more issue here. I am using the NOR3 modules as templates. In the Search Help meta function for the NOR3 modules, the case statement does not include data or call back program and function for the GLAccount. So even getting the search help process functioning is going to be a trick.
Let me know if you have any ideas,
Thanks,
Dave
Maybe you are looking for
-
HelloWorldSwing tutorial -- still in need of repair?
hello, as a new SDN member, i may be posting this in the wrong place -- if so, please let me know where to re-post, and i'll do so. yesterday, 3/22/2009, i was following the Swing tutorial at http://java.sun.com/docs/books/tutorial/uiswing/start/comp
-
Machine authentication not working with peap mschapv2
I have installed ACS ver 4.1.1 trial downloaded from cisco web sites. I have configure 802.1x machine authentication using self generated certificate with unknown user policy configure for windows database authentication. I can authenticate user via
-
IPhoto won't open after sharing on local network
I have a Mac Mini OS 10.6.8 and an iMac OS 10.7.3 both running on a local network. The Mac mini has iPhoto 8.1.2 on it and the iMac has iPhoto 9.2 on it. I accessed the Mini's iPhoto library from the iMac to do a project, and now I can't get iPhoto t
-
Reconfigure EM for auto backup
Hi Experts, We have 10.2.0.4 RAC database. I configured a auto database backup by EM. When node down, the auto backup job does not work. how to remove this schdule backup job and reset new schdule backup job? I could not find any buttom to remove old
-
I called vodafone to unlock my iphone 4 by IMEI, they told me that now they are waiting the password from Apple, how many days are necesary for it? thanks