on 05-20-2013 11:27 AM
Hi All,
How to make a date field trigger a round trip after user chosed a date?
I did the following in P, but it does not trigger it.
case iv_property.
when if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>if_bsp_dlc_view_descriptor~field_type_input.
when if_bsp_wd_model_setter_getter=>fp_server_event .
rv_value = 'ENTER'.
endcase.
tks for your hints in advance.
Hi Joshua,
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.
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.
Thanks & Regards
NIkhil H
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Had you found solution for this issue?
I done the exactly same thing now and i getting the short dump CNTL_ERROR:
DATA:
lv_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_index = iv_index.
CONCATENATE 'TABLE[' lv_index '].DATUM' INTO ls_map-context_attr.
CONDENSE ls_map-context_attr NO-GAPS.
ls_map-f4_attr = 'DATE_CHAR'.
APPEND ls_map TO: lt_inmap, lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor TYPE CL_BSP_WD_VALUEHELP_F4DESCR
EXPORTING
iv_help_id = 'BU_DATE_CHAR'
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joshua,
This code is not for dropdown list,This is for value help.
'WDR_TEST_DATE' Is nothing but the search help for date,so just create your own search help and give that name in the iv_help_id.
I know seach help will automatically comes when you declare variable as DATS type.
but you want to trigger server round trip for that reason i have given you this solution,
Hope it will solve your problem definately
Thanks & regards
NIkhil H
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just go to se11,create your own search help,in that give your table name,and give your date field name in the search help parameter and data element of it. and activate .
After that add this search help name to iv_help_id.
Your problem is solved,I dont understand where your facing problem as i have given u whole coding with respect to that.
And its a general search help itself.
Try out this code it will definitely work.
If You have any problem let me know
Thanks & Regards
Nikhil H
Hi, as following.
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_CHAR'.
ls_map-f4_attr = 'DATE_CHAR'.
append ls_map to: lt_outmap.
create object rv_valuehelp_descriptor type
cl_bsp_wd_valuehelp_f4descr
exporting
iv_help_id = 'BU_DATE_CHAR'
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 debugged, it happened when in FM F4_DATE_CONTROL when it going to call screen100 to create instance of CL_GUI_CUSTOM_CONTAINER.
HI,
ls_map-context_attr is nothing but the name what you have provided while creating context node.
ls_map-f4_attr is nothing but the name which is der in search help.
so check out with those name.
or else better you create your own search help.
and provide me your code.
As i am not able to understand why this error message is coming.
I have checked with the code its working perfectly fine.
Hi Joshua,
I think something wrong with ur other coding,
As what code i have provided you i dnt think u will get any dump,as my self have tested it.
When you create search help in se11, just give any table name in which you have date field and just add date field in search help parameter.So obviously you will get standard date f4 help.
Thanks & Regards
Nikhil H
Hi Joshua,
I think it will not possible to trigger an event on selection of Date field in UI.
Regards
Rajarama U
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joshua,
try to enter the date field in order to trigger the server event that you add
hopes it helps
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.