Hi Gurus,
My requirement is to set *DTP filter values via * Code*. I am able to set the filter value , but I am not able to refreshed or reset the previously set filter values.
In the bleow mentioned code,
I am setting the value of DTP filter field 'Business Area' to 100 and filtered records are getting transfered to data target. Now, if I set the value of 'Business Area' to 200, it still shows the results of 'Business Area' = 100 . i.e. old DTP filter values are not deleted/refreshed.
Can you please suggest, how to refresh/delete the old values...
data: LCL_DTP TYPE REF TO CL_RSBK_DTP, LCL_REQUEST TYPE REF TO CL_RSBK_REQUEST, W_LOC_DTP TYPE RSBKDTPNM , LCL_FILTER TYPE REF TO CL_RSBC_FILTER, ws_SELTAB TYPE RSBK_S_SELECT, g_t_seltab type table of rsbk_s_select, g_t_dtprule type mch_t_sourcecode, g_s_varseltab type mch_var_select, g_t_varseltab type mch_t_var_select, g_s_seltab type rsbk_s_select, g_s_selfields type mch_s_field, g_t_selfields type mch_t_field, g_r_filter type ref to cl_rsbc_filter. *Get DTP Reference W_LOC_DTP = 'DTP_F0FQ2CCPA25RFLIMGD2APDK16'. " DTP id LCL_DTP = CL_RSBK_DTP=>FACTORY( W_LOC_DTP ). * Get Filter Reference. CALL METHOD LCL_DTP->IF_RSBK_DTP_DISPLAY~GET_OBJ_REF_FILTER RECEIVING R_R_FILTER = LCL_FILTER. CLEAR: g_t_seltab, ws_seltab. * set value of DTP filter field business area to 100 ws_SELTAB-FIELD = 'BUS_AREA' . ws_SELTAB-sign = 'I' . ws_SELTAB-option = 'EQ' . ws_SELTAB-low = '100' . APPEND WS_SELTAB TO g_t_seltab. clear ws_seltab. CALL METHOD LCL_FILTER->SET_SELTAB EXPORTING I_T_SELTAB = g_t_seltab. LCL_DTP->activate( ).
Regards
Mohit