on 10-29-2007 10:56 AM
Hi there,
I have created a search help based on a single table ( QPCD ) with two exporting parameters CODEGRUPPE and CODE. When the user selects a their desired entry i would like it to poulate the relevant two fields on the web dynpro screen. I know in a normal dialog screen you could get this to happen automatically, but when implementing it into a web dynpro from abap screen it only returns the first value into the field that the search help was called from. Anyone know how i could get both fields populated?
Thanks in advance
Regards
Mart
Hi Mart,
This can be done without freely programming also if
-> CodeGruppe and Code fields exists in a DDIC structure
-> if exists Strucutre can be changed
In that case, this can be done using field assignment for Search help.
Select the CODEGRUPPE attribute in the structure
goto ENTRYPHELP/CHECK tab
Click on SEARCHHELP button that exists in the tool bar of the table.
Mention the Search help name in the pop up.
Click on PROPOSE which automatically proposes the assignments.
If those assignements are wrong, do it manually. i.e, for CODEGRUPP export parameter select the codegrupp in the structure and for CODE export parameter of search help give CODE attribute of the structure.
In the webdynpro, for the CODEGRUPP and CODE attributes, selecte the search help type as AUTOMATIC.
In this way, corresponding fields will be populated without any coding or without creation of freely programmable search help.
Hope I understood you problem correctly.
Thanks,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Doh! oh yeah you have to assign the search help to the actual table dont you, thought it was strange why it did not just work:-). Thanks very much Prashanth that has worked a treat. Could not assign it directly to the table as it was a SAP standard but have created my own Z version, assigned the search help to it and then used that in my web dynpro.
Thanks again
Mart
Hi,
have you tried the OVS search help?
It seems easier to have that solution (only one table, name description..)
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/30/d7fa41c915da6fe10000000a1550b0/frameset.htm">documentation</a>
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mart.
You can achieve this using freely programmed input help.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check http://help.sap.com/saphelp_nw04s/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm
It is not that hard.
Create a new webdynpro component and implement IWD_VALUE_HELP in this component.
go to the component controller of you new component and add a new attribute:
listener type ref to IF_WD_VALUE_HELP_LISTENER.
in the method set_value_help_listener add the line:
wd_this->listener = listener.
then you can create as much views and things you need for your search help.
To set a selected value just add a method to your component controller which takes the values as import parameters. if you only want to set the value for the attribute it was requested for:
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = wd_this->listener->F4_ATTRIBUTE_INFO-name
value = <value>
).
This is the save way
But you can also call
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = 'CODEGRUPPE'
value = <value_codegruppe>
).
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = 'CODE'
value = <value_code>
).
But keep in mind that if the structure of the element changes, this could lead to short dump if the name of the attribute changes or the attribute was deleted.
if you want to close the search help window call wd_this->listener->close( ).
Hope this helps.
Cheers,
Sascha
Hi Sascha,
Thanks for your reply, sorry if im sounding a bit dumb but have not really worked with web dyn pros before. I have done the steps as you described i think:-) but im a little unsure how i then add this as the input help of the field. i have chosen 'freely programmed' as the input help mode then entered my web dynpro component name which is ZQPCD_SH. I then get the following error messsage:
ZQPCD_SH is not component usage of an implementation of IWD_VALUE_HELP.
I have added it to the 'implemented interfaces' tab which gave me the 'set_value_help_listener' method where i added your code. I then just put the wd_this->listener->F4_CONTEXT_ELEMENT... code in the WDOINIT method just to set a default value so that i could see it working, or not!
Any ideas why i get this error message?
Regards
Mart
Any ideas?
and now, if you like the freely programmed Search Helps, have a look to http://code.google.com/p/sapelegantfinder/ and to
/people/sergio.ferrari2/blog/2007/09/11/sap-elegant-finder-was-born--it-is-the-open-source-that-makes-a-pleasure-to-search-on-web-dynpro-for-abap
Sergio
Hi Sascha,
Just a quick question about the following comand:
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = 'CODEGRUPPE'
value = 'AA'
).
When ever i execute it i get a short dump with the following error, 'Access via 'NULL' object reference not possible'. do you know what this means?
Regards
Mart
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.