on 09-08-2008 8:17 AM
Hi All,
We have a requirement where in customer likes to have a wild card search feature on Industry Sector Value help field. Say for example, i have given A* then the value help should show the entries starting with A only. Any pointers on how to achieve this functionality will be great.
Initally, Industry sector was a dropdown field, we have changed it to Value help by changing the attribute property in P Getter method and in GET_V_STRUCT we have written the logic to show the values .
DATA: ls_tabname TYPE ddobjname,
ls_fieldname TYPE fieldname.
DATA: lr_object_model TYPE REF TO if_genil_obj_model.
DATA: lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
me->ddlb_threshold = '0'. "0: DDLB n: 1-n:, DDLB >n: F4-Popup
IF component = 'INDUSTRY'.
CREATE OBJECT rv_valuehelp_descriptor
TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'CRMT_BUS_FRG0040-INDUSTRY' iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
ENDIF.
But for standard Value help attributes, wild card search is supported and the same is not workin in case of Industry Sector. Any pointers on this would be great.
Thanks,
Udaya
Edited by: Udaya Bhaskar Perecharla on Sep 8, 2008 12:53 PM
Issue is still persisting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I am facing an issue in populating Industry Sector attribute. My requirement is to show the value help based on Description and once the user selects the row in the Value Help pop up, i need to set the Key in the screen attribute. I will try to explain with an example, i get the following list of values on clicking Industry sector F4 Button on WEB UI.
0001 Dell
0002 Sap
0003 Siebel
In the screen, if i type S* Then i shouldget SAP & Siebel and on row selection it should populate the key(0002) and not Description(SAP).
I was able to get wild card search and show the relevant entries in the popup, but on selecting the value it is placing the Description instead of Key in the UI.
PFB the code i used for this. Any pointers on how to approach this req will be really helpful. I am trying ou to retireve selected row Key, Description and by using Set method trying to set the Key instead of Desc on the UI. But i am not finding how to retrieve the same.
i was able to provide the wild card search on Description by below code.Here i have given Value instead of key.
ls_map-f4_attr = 'VALUE'. "#EC NOTEXT
INSERT ls_map INTO TABLE lt_inmap.
INSERT ls_map INTO TABLE lt_outmap.
method GET_V_INDUSTRY.
*DATA: lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
* lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
DATA:
lv_fieldname TYPE name_komp,
ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
DATA: IV_NOPREFIX TYPE BOOLEAN VALUE ABAP_FALSE,
IV_FIELDNAME_ALTERNATIVE TYPE NAME_KOMP,
It_fieldname_additional TYPE crmt_attr_name_tab.
Lv_fieldname = 'INDUSTRY'. "#EC NOTEXT
INSERT Lv_fieldname INTO TABLE It_fieldname_additional.
DATA:
lv_fname_prefix TYPE string,
lv_idx_string TYPE string.
* determine prefix in case the F4 is called from a table view
IF iv_index IS INITIAL.
lv_fname_prefix = 'STRUCT'. "#EC NOTEXT
ELSE.
lv_idx_string = iv_index.
CONDENSE lv_idx_string.
CONCATENATE 'TABLE[' lv_idx_string ']' INTO lv_fname_prefix."#EC NOTEXT
ENDIF.
IF iv_noprefix = abap_true.
lv_fname_prefix = ''. "#EC NOTEXT
ENDIF.
* determine field name
IF iv_fieldname_alternative IS INITIAL.
lv_fieldname = 'INDUSTRY'. "#EC NOTEXT
ELSE.
lv_fieldname = iv_fieldname_alternative.
ENDIF.
* copy the F4 key attribute
IF lv_fname_prefix IS NOT INITIAL.
CONCATENATE lv_fname_prefix lv_fieldname INTO ls_map-context_attr SEPARATED BY '.'."#EC NOTEXT
ELSE.
ls_map-context_attr = lv_fieldname.
ENDIF.
ls_map-f4_attr = 'VALUE'. "#EC NOTEXT
INSERT ls_map INTO TABLE lt_inmap.
INSERT ls_map INTO TABLE lt_outmap.
* copy further F4 attributes (description, etc.)
IF it_fieldname_additional IS NOT INITIAL.
READ TABLE it_fieldname_additional INDEX 1 INTO lv_fieldname.
IF iv_index IS INITIAL. " is attribute in a table?
* COUNTRY_TEXT should be a value attribute, then no prefix is necessary
ls_map-context_attr = lv_fieldname.
ELSE.
CONCATENATE lv_fname_prefix lv_fieldname
INTO ls_map-context_attr SEPARATED BY '.'. "#EC NOTEXT
ENDIF.
ls_map-f4_attr = 'VALUE'. "#EC NOTEXT
INSERT ls_map INTO TABLE lt_outmap.
ENDIF.
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'CRMT_BUS_FRG0040-INDUSTRY' "#EC NOTEXT
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Hi Xavier,
Thanks for your help. PFB the details.
Component : BP_HEAD
View : Account Details
Context Node: Marketing
Attribute : Industry
PFB the cod i have placed in GET_P_INDUSTRY
method GET_P_INDUSTRY. CASE iv_property. WHEN if_bsp_wd_model_setter_getter~fp_fieldtype. rv_value = cl_bsp_dlc_view_descriptor=>FIELD_TYPE_INPUT. ENDCASE. endmethod.
Code in Get_v_industry
method GET_V_INDUSTRY.
*DATA: lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
* lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
DATA:
lv_fieldname TYPE name_komp,
ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
DATA: IV_NOPREFIX TYPE BOOLEAN VALUE ABAP_FALSE,
IV_FIELDNAME_ALTERNATIVE TYPE NAME_KOMP,
It_fieldname_additional TYPE crmt_attr_name_tab.
Lv_fieldname = 'INDUSTRY'. "#EC NOTEXT
INSERT Lv_fieldname INTO TABLE It_fieldname_additional.
DATA:
lv_fname_prefix TYPE string,
lv_idx_string TYPE string.
* determine prefix in case the F4 is called from a table view
IF iv_index IS INITIAL.
lv_fname_prefix = 'STRUCT'. "#EC NOTEXT
ELSE.
lv_idx_string = iv_index.
CONDENSE lv_idx_string.
CONCATENATE 'TABLE[' lv_idx_string ']' INTO lv_fname_prefix."#EC NOTEXT
ENDIF.
IF iv_noprefix = abap_true.
lv_fname_prefix = ''. "#EC NOTEXT
ENDIF.
* determine field name
IF iv_fieldname_alternative IS INITIAL.
lv_fieldname = 'INDUSTRY'. "#EC NOTEXT
ELSE.
lv_fieldname = iv_fieldname_alternative.
ENDIF.
* copy the F4 key attribute
IF lv_fname_prefix IS NOT INITIAL.
CONCATENATE lv_fname_prefix lv_fieldname INTO ls_map-context_attr SEPARATED BY '.'."#EC NOTEXT
ELSE.
ls_map-context_attr = lv_fieldname.
ENDIF.
ls_map-f4_attr = 'VALUE'. "#EC NOTEXT
INSERT ls_map INTO TABLE lt_inmap.
ls_map-f4_attr = 'KEY'.
INSERT ls_map INTO TABLE lt_outmap.
* copy further F4 attributes (description, etc.)
IF it_fieldname_additional IS NOT INITIAL.
READ TABLE it_fieldname_additional INDEX 1 INTO lv_fieldname.
IF iv_index IS INITIAL. " is attribute in a table?
* COUNTRY_TEXT should be a value attribute, then no prefix is necessary
ls_map-context_attr = lv_fieldname.
ELSE.
CONCATENATE lv_fname_prefix lv_fieldname
INTO ls_map-context_attr SEPARATED BY '.'. "#EC NOTEXT
ENDIF.
ls_map-f4_attr = 'VALUE'. "#EC NOTEXT
INSERT ls_map INTO TABLE lt_outmap.
ENDIF.
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'CRMT_BUS_FRG0040-INDUSTRY' "#EC NOTEXT
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
endmethod.
Thanks again for your time.
Regards,
Udaya
Hi, I just copy/pasted the code you sent in my system, and it work perfectly well ! I retrieve the Key and not the description.
So what i did is just implementing the GET_P and GET_V method for the attribute INDUSTRY and on the view, when i click the search help, both key and values are displayed, then if i click on an entry, the key is copied to the view.
So i really don't know what is going wrong on your side !
Have you restarted your web client after your different changes ??? Just in case
Xavier
Hi Xavier,
We need to provide wild card search on Description and on selecting the value it should place Key and not Description.
Can you try giving wild card search with Description, i guess it will not work.
The below lines of codes is controlling the functionality.
ls_map-f4_attr = 'VALUE'. "#EC NOTEXT
INSERT ls_map INTO TABLE lt_inmap.
ls_map-f4_attr = 'KEY'.
INSERT ls_map INTO TABLE lt_outmap.
awaiting your response..
Regards,
udaya
Of course it does not work, and also the field on the view only accepts 4 characters, since this is the key length !
In your case, what is behind the field INDUSTRY is a simple value table with only one field coming from CRMC_INDUSTRY and the description comes from CRMC_INDUSTRY_T.
So basically for what you need, you should first have a field on the view which is longer than the actual one to allow you to add more than 4 characters, then you also need to create your own search help in SE11 based on the 2 above tables to allow you to enter a description as input parameter and return the key as output parameter.
Good luck with that !
Xavier
Hi Xavier,
Thanks a lot for your help. Now i am working out with your idea. I am creating a new elementary search help and added two attributes Industry, Description and marked as Export parameters and in the Data Collection i have given CRMC_INDUSTRY_T. Now in the program i have updated the help id to the search help.
In the UI, i am getting a search help and nothing is happening. I am missing some thing here.. or i have done completely wrong..Can you just tel me wat is the expected procedure at yur convenient time.
Thanks a lot.
Regards,
udaya
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'CRMT_BUS_FRG0040-INDUSTRY' "#EC NOTEXT
iv_help_id = 'ZINDUSTRYSECTOR' "#EC NOTEXT
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Regards,
udaya
Hi Xavier,
I changed and still it is not working. The selected row is not getting setted and the wild card search is not working,instead it is displaying a search window with all values.
I am going wrong here..anyways really appreciate your help.
Thanks for the help on clearing search criteria. it worked.
Regards,
udaya
Hi,
I'm having a similar problem: the F4-help is shown but the wildcards are not working and when I select a line from the F4-help, the value is not tranferred to the field.
Anyone having an idea?
Here is my code (the search help is added to a field 'UOM' on a table) and the search help i'd like to use is a standard seach help H_T006.
DATA:
lv_str_index TYPE string,
ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
lt_inmap TYPE
if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
lt_outmap TYPE
if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
lv_str_index = iv_index.
CONCATENATE 'table[' lv_str_index '].uom' INTO ls_map-context_attr.
ls_map-f4_attr = 'MSEHI'.
APPEND ls_map TO: lt_inmap, lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor
TYPE
cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'H_T006'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Many thanks!
Hi all,
How will I implement wild card search for the field STRUCT.INDUSTRY in CRM WEB UI?
I used the code to bring search help...But wild card search is not working??
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'CRMT_BUS_FRG0040-INDUSTRY' "#EC NOTEXT
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap
iv_trigger_submit = abap_true.
PLZ help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.