Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get parameter values in Integrated Planning (custom planning function type)

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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.

0 Kudos

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!

0 Kudos

Hi Alex,

wrong Parameter Type / Interface.

Try this:

datal_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

0 Kudos

Thank you, Nils!!!