on 12-14-2009 12:34 PM
Hi
I need to push a certain value as a default value based on a condition to the slection screen of search help in web UI.
Could you please let me know how can we do this?
When we try to open the 'F4' help in web ui then it should populate a certain value as a default value to the selection screen of this 'F4' help. We will get this default value based on condition.
Regards
Anil
DATA:
lv_title TYPE string,
lv_attribute TYPE string,
lv_model TYPE string,
lv_event_string TYPE string.
DATA lr_cnode TYPE REF TO cl_bsp_wd_context_node.
DATA lr_current TYPE REF TO if_bol_bo_property_access.
DATA lr_dquery TYPE REF TO cl_crm_bol_dquery_service.
DATA lr_col TYPE REF TO if_bol_bo_col.
cl_chtmlb_config_utility=>outbound_plug_event_info(
EXPORTING
iv_event_string = lv_event_string
IMPORTING
ev_model_name = lv_model
ev_index = gv_index
ev_attribute = lv_attribute ).
lv_title = 'XXXXXX'.
IF ischevaluehelp_popup IS NOT BOUND.
* lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/IB_SEARCH' ).
ischevaluehelp_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'MainWindow'
iv_usage_name = 'CUISCHEValueHelp'
iv_title = lv_title ).
ENDIF.
ischevaluehelp_popup->set_on_close_event( iv_view = me iv_event_name = 'SEL_ISCHE' ).
ischevaluehelp_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
ischevaluehelp_popup->open( ).
*-----------------------------------------------------------------------------------------------------------
"Set Default Value To the Search Help Component
lr_cnode = ischevaluehelp_popup->get_context_node( iv_cnode_name = 'BTQACT' ).
CHECK lr_cnode IS BOUND.
lr_dquery ?= lr_cnode->collection_wrapper->get_current( ).
CHECK lr_dquery IS BOUND.
lr_dquery->add_selection_param( iv_attr_name = 'PROCESS_TYPE' iv_low = 'ZSC1' iv_sign = 'I' iv_option = 'EQ' ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This depends on whether you are using search help objects or calling BSP components as popup. BSP components meant to act as search helps usually accept data via inbound plugs in their interface window controller. In case of search help objects, go to se11 and see what input fields it is accepting and you have to include them in your "inmap" parameter.
Regards,
Arun Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun
I'm using SE11 search help.I'm giving you my code for your reference here.
DATA:
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,
lr_qs TYPE REF TO cl_crm_bol_dquery_service,
lr_current TYPE REF TO if_bol_bo_property_access,
lv_category TYPE STRING.
ls_map-context_attr = 'struct.zzattr_i_1'.
ls_map-f4_attr = 'ATTRIBUTE'.
APPEND ls_map TO: lt_inmap,lt_outmap.
CLEAR ls_map.
ls_map-context_attr = 'struct.zzattr_i_1'.
ls_map-f4_attr = 'SERVICE_LINE'.
APPEND ls_map TO: lt_inmap.
CREATE OBJECT rv_valuehelp_descriptor
TYPE
cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'ZATTR1'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
iv_trigger_submit = abap_true
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Here 'ZATTR1' is my search help name in SE11 and the field which is having 'F4' help is 'ATTRIBUTE'.
Now when I press 'F4' on 'ATTRIBUTE' then it will give a popup and this popup is having 3 fields..
1.'ATTRIBUTE'
2.'SERVICE_LINE'
3.Description of 'SERVICE_LINE' and hence by pressing 'F4' i should get a value in the field 'SERVICE_LINE' based on
a condition.
However, if there is a value for ATTRIBUTE on the screen and when we press 'F4' on this then in the popup the value of
ATTRIBUTE which is there on the screen is appearing in the 'ATTRIBUTE' field and the same value is being copied to
'SERVICE_LINE' field in the popup.
Please guide me how do we populate the value to 'SERVICE_LINE' field inside the search help popup of 'ATTRIBUTE'.
Best Regards
Anil
Hi,
Notice this part of your code.
CLEAR ls_map.
ls_map-context_attr = 'struct.zzattr_i_1'.
ls_map-f4_attr = 'SERVICE_LINE'.
APPEND ls_map TO: lt_inmap.
You are passing the same attribute of your context node "zzattr_i_i" to both "ATTRIBUTE" and "SERVICE_LINE". That's why, if this field has any values it is copied to both the fields in the search help. Instead of struct.zzattr_i_1, you have to pass a different attribute from the same context node that you wish to pass to the f4 screen.
Regards,
Arun Prakash
Hello!
Have you already checked this Note:
[Note 1381285 - Prefilling of search attr. in the UI (eg. Contact search)|https://service.sap.com/sap/support/notes/1381285]
This explains how to default a value in a search.
Best regards
Arno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All
Could you please answer my question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reddy
I have a search help for the field 'Service type' in opportunity item.Now the requirement is to give a default
value to the selection screen of this search help when we press 'F4'.
Now as per your reply i didn't find 'GET_VALUE1 ' method in the context 'BTCUSTOMERI ' of 'BT130I_OPPT' component.
Also,fyi..this is a custom field.
I'm trying with the search help exit associated with this search help to push the default value but it is not working..
If search help exit is correct solution then can you please guide me how to do this or if there is other way please
let me know.
Regards
Anil
Hi Anil,
Please check with the below code snippet:
1. Redefine the method GET_DQUERY_DEFINITIONS if it has already not been done so.
2. CALL METHOD super->get_dquery_definitions
RECEIVING
rt_result = rt_result.
3. LOOP AT rt_result ASSIGNING <rl_result> WHERE field = '.........'. (Here specify your selection attribute field name)
lw_ddlb_options11-key = <key1>.
lw_ddlb_options11-value = <value to be defaulted>.
INSERT lw_ddlb_options INTO <rl_result>-ddlb_options INDEX 1.
ENDLOOP.
Data types: lw_ddlb_options TYPE crms_thtmlb_search_ddlb_nvp,
FIELD-SYMBOLS: <rl_result> TYPE crms_thtmlb_search_field_info.
Hope this would help you.
Thanks and Regards,
Radhika
Hi Radhika
It seems your answer is wrt the search criteria but my requrement is related to the search help.
When we press F4 we will get a popup where in we will have few input parameters(input fields)
to enter values..now in this input fields i need to push a default value (dynamic value not the constant value).
Component: BT130I_OPPT
View : BT130I_OPPT/ItemDetails
Could you please suggest me..
Regards
Anil
User | Count |
---|---|
5 | |
1 | |
1 | |
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.