cancel
Showing results for 
Search instead for 
Did you mean: 

Read planning filter variable value in the custom planning function type

Former Member
0 Kudos

Hi,

I have a scenario where the reference data internal table IT_R_DATA of the class should contain only the records from fiscal year(variable in Filter for ex: 2017) and the version(Variable in filter; 005).

I'm looking for help with the syntax for the above two conditions which needs to be added to the method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL

Thanks

Vasavi

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

You can use below code under Method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL to retrieve only data for fiscal year 2017 and version 005.

if requirement to consume planning filter in GET_REF_DATA_SEL method, use below code

DATA: ls_data_charsel TYPE rsplf_s_charsel.

LOOP AT i_t_data_charsel INTO ls_data_charsel.
IF ls_data_charsel-iobjnm = '0FISCYEAR'. "0FISCYEAR is name of info object
APPEND ls_data_charsel TO e_t_ref_charsel.
ENDIF.

IF ls_data_charsel-iobjnm = '0VERSION'.
APPEND ls_data_charsel TO e_t_ref_charsel.
ENDIF.

ENDLOOP.

Or if requirment to pass fixed values which is not coming from planning filter, use below code in method GET_REF_DATA_SEL:

DATA: ls_data_charsel TYPE rsplf_s_charsel.

ls_data_charsel-iobjnm = '0FISCPER'. "Name of infoobject
ls_data_charsel-low = '2017'. "Value for filter
APPEND ls_data_charsel TO e_t_ref_charsel.

ls_data_charsel-iobjnm = '0VERSION'.
ls_data_charsel-low = '005'.
APPEND ls_data_charsel TO e_t_ref_charsel.

All required filter condition need to be pass in paramter E_TH_REF_CHARSEL to read the reference data in parameter I_TH_REF_DATA.

Parameter I_TH_REF_DATA in method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE retrieve data based on defined filter in method GET_REF_DATA_SEL.

Hope above will help you.

Thank you

vigneswararao
Explorer
0 Kudos

Hi Ravi,

Currentyl, this method only applies to reference based interfaces, is there any other method to apply to non-reference based interface custom planning functions.


IF_RSPLFA_SRVTYPE_IMP_EXEC

Thanks & Regards

0 Kudos

Hello Expert,

Can we get an example of the same concepts?

Thanks,

Arup

0 Kudos

Hi Vasavi,

I recommend to read the method documentation in transaction SE24. In IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~GET_REF_DATA_SEL you get the filter values after variable replacement in the importing parameter I_T_DATA_CHARSEL. To get example code you can simply check the implementation of functions delivered by SAP using transaction RSPLF1, choose the function type, on the properties tab you can see the technical name of the class.

Regards,

Gregor