Search help for selection screen field
Hi ,
steps for creating search help for a key field in selection screen..
tables is a userdefined from which the field is taken..
thxs,
vind
hi,
c this.
REPORT ZXYZ_0002 .
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
PARAMETERS: P_BUKRS type T001-BUKRS.
selection-screen comment 30(20) BUTXT for field p_bukrs.
selection-screen end of line.
selection-screen end of block b1.
at selection-screen output.
if butxt is initial.
select single butxt into butxt
from t001
where bukrs = p_bukrs.
endif.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
Get the company code from db and add to dynpro
data: xt001 type t001.
clear xt001.
select single * into xt001
from t001
where bukrs = return-fieldval.
dynfields-fieldname = 'BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
rgsds
anver
if hlped mark points
Similar Messages
-
Regarding Search help on selection-screen field
Hi there,
I am working on custom tables.
I have a requirement to maintain search pattern on a selection-screen field.
selection-screen parameter: p_name which is company name filed from Z table.
By giving a string like Holl* and by pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
Thanks in advance.
-TulasiHi
Go through the link given below :
How to create a search help for my own fields in selection screen
F4 search help on report selection screen
also try :
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'VKORG'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKORG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
TABLES
VALUE_TAB = T_TABLE1
FIELD_TAB = field_tab
RETURN_TAB = RET_TAB
DYNPFLD_MAPPING = DYN_TAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
With Regards
Nikunj shah -
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 -
Assign search help for a screen field in standard program?
Hi All,
Is there any other way to assign search help to a standard SAP screen field? (to be precise i want to assign search help to Recipient field in table control of components tab in transaction IW32/IW31)
I know we can do this by assigning search help through screen painter (by changing standard program, which is my last option).
Any advice/help will be greatly appreciated.Hi,
I think you will find solution in below <b>threads</b>:
Re: Search Help for standard field
How to assign a search help
Search help for Standard SAP field
<b>Reward if helpful</b>
Rgds, -
Need help on search help on selection screen field
Hi guyz,
Please tell me how to pass the parameter or restrict the below search help.
*s_bsart FOR ekko-bsart . " Doc. Type*
For the above selection screen field i need to display the data only for cat = F if i click search help.
Thanks,
Mohamed KaleelHi,
Use At selection-screen for value-request for s_bsart.
SELECT_OTPIONS: s_bsart FOR ekko-bsart.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bsart.
CALL SCREEN 100 STARTING AT 10 5
ENDING AT 50 10.
MODULE value_list OUTPUT.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
NEW-PAGE NO-TITLE.
s_bsart-low = 'F' / 'CAT=F'.
write :/ s_bsart-low.
Hide: s_bsart-low
clear s_bsart-low.
ENDMODULE.
AT LINE-SELECTION.
LEAVE TO SCREEN 0.
This will resolve the issue.
Regards,
Gurpreet -
Search Help for selection screen select-option
Hi Friends,
I want have search help for KSCHL with only the condition types starting with Z. I need your help to do that.
Thanks in Advance.hi,
chek a sample code, for restricting the serach help.
REPORT Z_CONECT_A.
Include type pool SSCR
TYPE-POOLS sscr.
TABLES : marc.
defining the selection-screen
select-options :
s_matnr for marc-matnr,
s_werks for marc-werks.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA : optlist TYPE sscr_opt_list,
*** type sscr_***.
INITIALIZATION.
Restricting the MATNR selection to only EQ and 'BT'.
optlist-name = 'OBJECTKEY1'.
optlist-options-eq = 'X'.
optlist-options-bt = 'X'.
APPEND optlist TO restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_MATNR'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY1'.
APPEND *** TO restrict-***_tab.
Restricting the WERKS selection to CP, GE, LT, NE.
optlist-name = 'OBJECTKEY2'.
optlist-options-cp = 'X'.
optlist-options-ge = 'X'.
optlist-options-lt = 'X'.
optlist-options-ne = 'X'.
APPEND optlist TO restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_WERKS'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY2'.
APPEND *** TO restrict-***_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regards
anver
<b><i>if helped pls mark points</i></b> -
Search help for selection screen
Hi experts,
I have a selection screen - and the user want that the asearch help will be :
For example: Equi-eqtyp with search help: eqtyp_sh_wd or
equi-matnr with search help mat1.
how can i do this?
thanks,
Michal.Hi, Michal
Are you talking about some thing like bellow ?
PARAMETERS: eqtyp TYPE equi-eqtyp MATCHCODE OBJECT eqtyp_sh_wd,
matnr TYPE equi-matnr MATCHCODE OBJECT mat1.
Please Reply if else.
Faisal -
Attaching search help to a screen field
Hi all,
I've created a search help (zhlp) and want to attach it to the screen field in the selection screen of my report.
SELECT-OPTIONS KSCHL FOR VAKE-KSCHL
MEMORY ID VKS.
I've attached zhlp to the screen by defining it on the element list of the screen 1000.
And the original db table T685 already got a search help H_T685, when I run my report and press F4 in the field, it calls the default search help H_T685 but not mine.
Could anyone help me? Thanks.here is the syntax for assiging search help to selection screen field.
SELECT-OPTIONS KSCHL FOR VAKE-KSCHL MATCHCODE OBJECT ZHLP.
Regards
Raja -
How to create an search help for standard Screen
Hi,
Can any one help me out ... How to create a search help for standard screen field.......
thanks & regards,
Naveen...Hi Naveen.
I would like to suggest a couple of references,
[SDN - Standard Reference for create a search help for own fields in selection screen |How to create a search help for my own fields in selection screen;
[SDN - Standard Reference for Attaching search help to standard screen|Attach search help to standard screen;
[SDN - Reference for want to add a field in standard search help screen|want to add a field in standard search help screen;
[SDN - Reference for Attaching a search help to a standard screen - Case 2 |attaching a search help to a standard screen;
Hope that's usefull.
Good Luck & Regards.
Harsh Dave -
Search help in selection screens for interactive report
A search help can only be assigned to DB table.
So my doubt is can it also be used for seletion screens created for an interactive report?
If yes what is the procedure.. Please give me one example at least...
waiting for your valuable suggestions.....
Thanks,
regards,
ChinmayHi Chinmay,
I suppose your requirement is to give search help to selection screen elements.
Here is the code.
REPORT ZSHAIL_F4HELP .
parameters: name(10) type c .
TYPES: BEGIN OF VALUES,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
END OF VALUES.
dATA: PROGNAME LIKE SY-REPID,
DYNNUM LIKE SY-DYNNR,
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
at selection-screen on value-request for name.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'DEMOF4HELP'
fieldname = 'CARRIER1'
SEARCHHELP = ' '
SHLPPARAM = ' '
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'CARRIER'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
IMPORTING
USER_RESET =
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
PROGNAME = SY-REPID.
DYNNUM = SY-DYNNR.
CLEAR: FIELD_VALUE, DYNPRO_VALUES.
FIELD_VALUE-FIELDNAME = 'CARRIER'.
APPEND FIELD_VALUE TO DYNPRO_VALUES.
I hope your query is solved.
If so,please award points.
Regards,
Sylendra. -
How to add a search help on a screen field from screen painter
Hi,
I would like to add an existing Search Help on a screen field in Screen painter.
Of course it's possible to just click on th screen field and in the property box, I just have to set the name of teh search help.
The problem is that I need the screen field to be grey and user musn't be able to change the field value if he doens't use the search help.
I'm not allowed to modify the existing search help or to built it on my own from source code, I must use the existing one.
Do you have an idea on how to do so?
Regards,
MorganDropdown Box:
In the screen painter for that field goto properties -> Dropdown ->select listbox.
Option 1:
Instead let that field be in change mode and if user enters any wrong entry which is not there in the table give a error messgae.
CHAIN.
FIELD addr1_data-country.
MODULE modify_screenfields1.
ENDCHAIN.
MODULE modify_screenfields1 INPUT.
CASE sy-ucomm.
WHEN 'ENTER' OR 'EXECUTE'.
IF NOT addr1_data-country IS INITIAL.
SELECT SINGLE landx FROM t005t INTO lws_landx WHERE
land1 = addr1_data-country
AND spras = 'EN'.
IF sy-subrc <> 0.
MESSAGE e000(zo_spa) WITH text-022. " Invalid Country code
ELSE.
t005t-landx = lws_landx.
ENDIF.
ELSE.
CLEAR: t005t-landx.
ENDIF.
ENDCASE.
ENDMODULE. " modify_screenfields1 INPUT
Option 2: Other than if u want the way u like, let that field be greyed out. don't attach the search help.
In the PROCESS ON VALUE-REQUEST.
FIELD addr1_data-region MODULE region_pov.
MODULE region_pov INPUT.
Using the F4IF_INT_TABLE_VALUE_REQUEST table value request show the search help.
also make that field input enabled.
ENDMODULE. " region_pov INPUT
I think this will solve ur problem.
Regards,
Prakash.
Message was edited by: Prakash Ramu -
Search Help for Infotype Custom Field
Hi,
I have created a search help for a custom field in an infotype. What would be the best way of filtering the help selection based on infotype values such as molga, begda, endda?
Thanks in advance.
/ElvezHi Nishanth,
thanks for your reply, perhaps I should clarify my question:
1) I have a custom field in an infotype
2) I have a table containing the search help information
3) I assigned a search help to the custom field
4) I have activated a search help exit
The problem is that the information that I get from the custom field is not sufficient for making the selection. Therefore, I would like to somehow get hold of the addition information, such as BEGDA, ENNDA, MOLGA, to do a proper selection in the search help exit. How can I achieve that?
I read something about function module DYNP_VALUES_READ -would it be possible to call this function module from my search help exit and thereby reach my goal?
/Elvez
Message was edited by: Elvez -
Default value for selection screen field
Hi all,
I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
How can I do it?
Thanks
RahulHi Rahul,
In the INITIALIZATION event we can set the default values for selection screen fields.
INITIALIZATION.
loop at screen.
if screen-name = 'S_MATNR-LOW'.
CLEAR S_MATNR.
s_matnr-low = '1234'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr.
CLEAR S_MATNR.
s_matnr-high = '5678'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr
clear s_matnr.
endif.
endloop.
Hope it helps.
Mark if useful
Regards,
Saumya -
Problem on Search Help for select-option
Hi,
Iam working on a search help for select-option,
is there a way to incorporate select-all or multiple
selection on this?
Thanks!Hi catherine,
1. Just copy paste this program.
(It will POPULATE the SELECT-OPTION,
based upon
MULTIPLE Selection,
selected by the user,
in the help provided thru F4IF_INT_TABLE_VALUE_REQUEST.)
2. Eg. is for BUKRS (company code)
3.
REPORT ABC.
TABLES : T001.
DATA : ITAB LIKE TABLE OF T001 WITH HEADER LINE.
DATA : RETURN LIKE TABLE OF DDSHRETVAL WITH HEADER LINE.
SELECT-OPTIONS : BUKRS FOR T001-BUKRS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-LOW.
PERFORM MYPOPULATE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-HIGH.
PERFORM MYPOPULATE.
FORM MYPOPULATE.
REFRESH ITAB.
SELECT * FROM T001 INTO TABLE ITAB.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynprofield = 'BUKRS'
dynpprog = sy-REPID
dynpnr = sy-dynnr
multiple_choice = 'X'
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return.
IF RETURN[] IS NOT INITIAL.
REFRESH BUKRS.
CLEAR BUKRS.
LOOP AT RETURN.
BUKRS-SIGN = 'I'.
BUKRS-OPTION = 'EQ'.
BUKRS-LOW = RETURN-FIELDVAL.
BUKRS-HIGH = RETURN-FIELDVAL.
APPEND BUKRS.
ENDLOOP.
ENDIF.
ENDFORM.
regards,
amit m. -
Change Search Help for Payment Terms Field
Hi,
I would like to change the Search Help for Payment Terms Field, in Customer Master (KNVV-ZTERM). and in Sales Document. I believe it is the same.
Default is From Table T052 / T052U
ZTERM and TEXT1 Fields
I would like to have
From Table TVZBT
ZTERM and VTEXT
PayT Own Explanation Field.
Can we change the Search Help.Hi,
The search help for the payment terms is not coming from the DDIC search help..
It is coded in the process on value-request event...
The function module FI_F4_ZTERM is called for this..you have to change this function module in case if you want the values from a different table..
OR do implicit enhancement in the subroutine FORM HELP_ZTERM in the include MF02DFH0 to call your search help instead of the function module FI_F4_ZTERM ..And do the same for the sales order also..
Thanks
Naren
Maybe you are looking for
-
Unwanted record in v$archived_log
Hello All, v$archived_log view shows archive log record for previous incarnation also. Is there any way we can exclude these record from this view i mean it should show record for current incarnation only not for the previous one Database version Ora
-
General query regarding availability of Older Versions of Connector bundles
Hi Guys, How can I download the older versions of Connector bundles. I wish to download PeopleSoft User Management Connector 9.1.0. But the official Oracle website shows only some 11.x.x version. If I want to download some older versions, is there a
-
Logoncount Attribute on Computer objects in Active Directory
Hello, I have one question about the logoncount Attribute on Active Directory objects. As I understood on user objects this attribute counts the number of logons per DC (because it is not replicating). My question is: What exactly is count here on co
-
To reiterate, my address bar and my entire toolbar have disappeared. I cannot enter any new websites, and I cannot control anything on the websites that I can enter, because my buttons are gone. The only websites I can access are the ones already loc
-
Reduce image quality (and file size)
Is there a simple way to reduce the quality of all backgroung images ? (there are all bitmap images, about 3 MB each of them) I imagine that by reducing the image quality, the file size will be less huge... But I wasn't able to find a way to do that.