on 12-07-2010 6:25 PM
hi,
I have got a date input field (a date picker). Is it possible to force a server roundtrip when the user has choosen a new date?
At the moment the user has to hit the enter key to send a request to the server.
Regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Did you try defining the GET_P method for your date attribute? Here, its possible to check for server-event as follows:
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>FP_SERVER_EVENT.
rv_value = 'date_selected'. "Here, you can give the name of your event handler without the EH prefix
Later on, you can define the event handler EH_ONDATE_SELECTED where you can handle the selected event.
Hope this helps.
Regards,
Nisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i think it is not possible to achive this requirement without modifications of the underlying WebUI-Framework / BSP-Technology.
Technically the valuehelp for the inputfield is generated via Javascript on the client side. If the user clicks a date the inputfield is updated but no roundtrip is triggered. The input field is configured to trigger a server roundtrip if enter is pressed.
The only chance to trigger the roundtrip would be the event of date selection on client side.
Regards,
Arne
Hello,
Maybe this helps, when being called from the set-method.
METHOD eh_onsubmitonenter.
DATA: lr_window TYPE REF TO cl_crm_bupa_window_controller.
DATA: lr_viewset TYPE REF TO cl_crm_bupa_view_controller.
TRY.
lr_window ?= me->view_manager->get_window_controller( ).
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error.
TRY.
lr_viewset ?= m_parent.
CALL METHOD lr_viewset->('SUBMITONENTER').
CATCH cx_sy_dyn_call_illegal_method cx_sy_ref_is_initial
cx_sy_move_cast_error.
RETURN.
ENDTRY.
ENDTRY.
IF lr_window IS BOUND.* data should be processed in a central place (= viewset)
TRY.
CALL METHOD lr_window->view_set->('SUBMITONENTER').
CATCH cx_sy_dyn_call_illegal_method cx_sy_ref_is_initial.
RETURN.
ENDTRY.
ENDIF.
ENDMETHOD.
Best regards,
Thomas Wagner
Hello,
This seems an old post but I am trying to answer:
It is possible to force a round trip for a date field.
You need to code in GET_V method and just take help of an search help (for example WDR_TEST_DATE) and create an F4 instance with iv_trigger_submit = abap_true.
Example:
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.
ls_map-context_attr = 'struct.date.
ls_map-f4_attr = 'FLDATE'.
APPEND ls_map TO: lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor TYPE
cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'WDR_TEST_DATE'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap
iv_trigger_submit = abap_true.
Please try.
Thanks
Krish
I was looking for information about roundtrip for date field, due to when I select the date nothings happen, I read your post and i was wondering if the folloging code has to be implemented in get_v method ?
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. ls_map-context_attr = 'struct.date.
ls_map-f4_attr = 'FLDATE'.
APPEND ls_map TO: lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING iv_help_id = 'WDR_TEST_DATE'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap
iv_trigger_submit = abap_true.
I don't undestand what means:
WDR_TEST_DATE and
ls_map-f4_attr = 'FLDATE ?,
WDR_TEST_DATE is a standar help?
FLDATE es a value or what is ?
Thanks for your help
John
User | Count |
---|---|
7 | |
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.