‎2006 Feb 02 12:22 AM
hi,
i have created custom search help with 4 fields. when i run in SE11 all fields are populated but when i call this in the selection screen or screens only the particular field is populated.how can i populate value in the other 3 fields in the selection screen.
thanks in advance.
‎2006 Feb 02 12:31 AM
Hi
You can't do it, the search help populates only the field where it's called.
You should use a search help automatically created by check table.
Anyway you can do it by abap in AT SELECTION-SCREEN VALUE-REQUEST event.
Here you can run your search help by FM F4IF_FIELD_VALUE_REQUEST, get out the values and transfer them to others fields of selection-screen by FM DYNP_VALUES_UPDATE.
Max
‎2006 Feb 02 12:25 AM
‎2006 Feb 02 12:31 AM
Hi
You can't do it, the search help populates only the field where it's called.
You should use a search help automatically created by check table.
Anyway you can do it by abap in AT SELECTION-SCREEN VALUE-REQUEST event.
Here you can run your search help by FM F4IF_FIELD_VALUE_REQUEST, get out the values and transfer them to others fields of selection-screen by FM DYNP_VALUES_UPDATE.
Max
‎2006 Feb 02 12:36 AM
What I mean is, if there is a default search help defined, chances are it is different than your custom search(otherwise what is the reason for the custom, right?) Anyway you must tell the program to use the other search instead of the default. Take the example below. Here we are using the TFDIR table for function modules. If you have a custom search help defined, you need to tell the program to use it instead of the default. In selection screens, you use the MATCHCODE OBJECT extension. In dynpros, there is a field in the screen elements tab, where you can specify the search help to use.
If this program, the standard search help is being fired for P_FUNC1, in P_FUNC2 we are telling it to fire a different one. So in your case, you can just specifiy the name of the search help after the MATCHCODE OBJECT and your search help should be fired. Make sense?
report zrich_0001.
PARAMETERS: p_func1 type tfdir-funcname.
parameters: p_func2 type tfdir-funcname
matchcode object SRM_FUNCNAME .
Regards,
Rich HEilman
‎2006 Feb 02 12:37 AM
So you got it working in a selection screen. All you need to do is specify the search help in the screen elements tab in your dynpro. It will fire there as well.
In the screen, click the Element List Tab.
Click the references tab.
Enter the name of the search help for your field in the Search Help column, save, activate, run the program. Your custom search help should fire now.
Regards
Rich Heilman
Message was edited by: Rich Heilman
‎2006 Feb 02 12:35 AM
Hi,
Thanks for your reply. Custom search help is only triggered in the selection screen. I have set the match code object to that parameter.
‎2006 Feb 02 12:46 AM
Hi
Try to use this code
PARAMETERS: P1 LIKE ....
P2 LIKE ....
P3 LIKE ....
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P1.
data: dynpfields like dynpread occurs 0 with header line,
return_tab like ddshretval occurs 0 with header line.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = SPACE
fieldname = SPACE
SEARCHHELP = <YOUR SEARCH HELP>
SHLPPARAM = ' '
dynpprog = SY-REPID
dynpnr = SY-DYNNR
dynprofield = 'P1'
tables
return_tab = return_tab
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4.
LOOP AT RETURN_TAB.
CASE RETURN_TAB-FIELDNAME
WHEN .... dynpfields-FIELDNAME = 'P1'.
WHEN .... dynpfields-FIELDNAME = 'P2'.
ENDCASE.
dynpfields-FIELDVALUE = RETURN_TAB-FIELDVAL.
APPEND dynpfields.
ENDLOOP.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = dynpprog
dynumb = dynpnr
tables
dynpfields = dynpfields.
Max
‎2006 Feb 02 1:08 AM
‎2006 Feb 02 1:17 AM
Hi Rich
I believe he want to populate more fields than one calling search help once.
So if you use MATCHCODE OBJECT extension you can fill only the parameter where that matchcode is used.
It should be good to consider the search help is a different object: it isn't a matchcode, they have only the same functionality.
Max
‎2006 Feb 02 1:21 AM
If you define a custom search help via SE11, say ZTEST, you can force the parameter to use this search help by using the MATCHCODE OBJECT extension.
parameters: p_test type c matchcode object ZTEST.
All he needs to do is add the fields that he wants to the search help and use the MATCHCODE extension. That's it.
Regards,
Rich Heilman
‎2006 Feb 02 1:26 AM
For example, I just create a search help called ZTEST using SE11. It is an elementary over TFDIR. I have included the following fields.
FUNCNAME
PNAME
INCLUDE
FREEDATE
APPL
MAND
FMODE
UTASK
PNAME_MAIN
Now I have a test program. Notice here that I am forcing my custom search help ZTEST.
report zrich_0001.
parameters: p_func type tfdir-funcname matchcode OBJECT ZTEST.
When I run the program, and hit F4 on the field, I'm getting my custom search help.
Regards,
Rich Heilman
‎2006 Feb 02 1:36 AM
Hi
I know but try to call your search ZTEST0123 and I think it won't work.
The name of matchcode can be long 5 characters, so you're lucky guy because the name of your search help is ZTEST.
Max
‎2006 Feb 02 1:40 AM
You may have a valid point. but in my WAS 7.0 engine, this is working fine.
report zrich_0001.
PARAMETERS: p_func1 type tfdir-funcname.
parameters: p_func2 type tfdir-funcname
matchcode object <b>SRM_FUNCNAME</b> .SRM_FUNCNAME is obviously greater than 5 characters. There may be a limit in eariler releases.
Regards,
Rich Heilman
‎2006 Feb 02 1:47 AM
Hi
If it works fine you I believe you, I remembered that an error occured on release 4.6X.
I used the extension matchcode object long time ago.
Max
‎2006 Feb 02 1:52 AM
‎2006 Feb 02 2:03 AM
I'm sure, perhaps not 4.6x, but 4.0x.
I started to work using release 3.0x and this was one of first things I noted when I begun to use 4.0B
If I tried to extension control the system signaled an error.
Max
‎2006 Apr 21 7:52 AM
Hello All,
I have created a webdynpro application, and would like to add a value help icon to one of the fields. On clicking the value help icon, the search functionality is launched.
Would appreciate any hints on -
1)How do I specify value help in my Webdynpro field
2)Is there any direct UI element which will create Value help field (with that button for value help against the input field)?
Please write in...
Many thanks !!!
Dhanya