11-04-2013 10:39 PM
Hi Gurus,
I have created my own planning function type.
In the parameter-tab I have two Parameter Types: VTYPE_FROM and VTYPE_TO. Both are of type Data Selection.
How can I get the values of the parameters in my implementation class? I am using the interface IF_RSPLFA_SRVTYPE_IMP_EXEC method IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE.
Could you please provide me with a short ABAP code example.
Best Regards
Mikael
11-11-2013 9:12 AM
Hi Mikael,
try this in Method Execute:
DATA: l_r_param_elem TYPE REF TO if_rsplfa_param_elem,
l_value TYPE /BI0/OIVTYPE.
l_r_param_elem = i_r_param_set->get_param_elem( 'VTYPE_FROM' ).
l_r_param_elem->get_value( IMPORTING e_value = l_value ).
FREE l_r_param_elem.
l_value should now contain the wanted value.
Regards,
Nils
Edit: Sorry, didn't read that you Need coding for Parameter type data selection here you go:
DATA: l_r_param_data_sel TYPE REF TO if_rsplfa_param_data_sel,
l_t_charsel TYPE rsplf_t_charsel.
l_r_param_data_sel = i_r_param_set->get_param_data_sel( '<Parametername from RSPLF1>' ).
l_t_charsel = l_r_param_data_sel->get_t_sel( ).
FREE: l_r_param_data_sel.
03-18-2014 6:51 AM
Hi All!
I am using this interface and method too. I have Parameter type "Keyfigure Selection" in my function.
I have the error in this line :
l_r_param_data_sel = i_r_param_set->get_param_data_sel( 'KEYF' ). ----> type conflict
How can I get the values of the parameters in my implementation class?
Regards!
03-18-2014 9:50 AM
Hi Alex,
wrong Parameter Type / Interface.
Try this:
data: l_r_param_keyf_sel type ref to if_rsplfa_param_keyf_sel,
l_t_keyfnm type RSPLF_T_KEYFNM.
l_r_param_keyf_sel = i_r_param_set->get_param_keyf_sel( i_param_name = '<name from rsplf1>' ).
l_t_keyfnm = l_r_param_keyf_sel->get_t_keyfnm( ).
Regards,
Nils
03-18-2014 10:32 AM