on 10-14-2011 3:30 AM
Hi Experts,
I have one requirement like " In powl application i need to set default value for Selection Parameter. This Selection Parameter type is Input Type. I know if it is Type "D" (Drop down) i can pass values for that one. But in my case i need to set up default value for Selection Parameter(TYPE "I") value only."
Please share anybody your thoughts.
Regards,
Sri
Dear Sri,
You can pass data to the parameter C_DEFAULT_VALUES.
For ex :
Data :
ls_seldef TYPE powl_selcrit_sty,
ls_default_val TYPE rsparams,
lt_default_val TYPE rsparams_tt,
lt_seldef TYPE powl_selcrit_tty .
**-----------PERIOD----------------**
ls_seldef-selname = 'PERIOD'.
ls_seldef-kind = 'S'.
ls_seldef-param_type = 'I'. "Input field
ls_seldef-allow_admin_change = abap_true.
ls_seldef-datatype = 'HAP_SEL_VAL_DATE_FROM'.
ls_seldef-quicksearch_crit = 'X'.
**-----------PASSING DEFAULT VALUES FOR BEGIN DATE END DATE----------------**
CONCATENATE sy-datum+0(4) '0101' INTO lv_bdate.
CONCATENATE sy-datum+0(4) '1231' INTO lv_edate.
APPEND ls_seldef TO lt_seldef.
CLEAR ls_seldef.
ls_default_val-selname = 'PERIOD'.
ls_default_val-kind = 'S'.
ls_default_val-sign = 'I'.
ls_default_val-option = 'EQ'.
ls_default_val-low = lv_bdate.
ls_default_val-high = lv_edate.
APPEND ls_default_val TO lt_default_val.
IF lt_default_val IS NOT INITIAL.
c_default_values = lt_default_val.
e_default_val_changed = abap_true.
ENDIF.
c_selcrit_defs = lt_seldef.
e_selcrit_defs_changed = 'X'.
Hope it helps!
Warm regards,
Upendra Agrawal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.