Professional Documents
Culture Documents
In the Filter selections for the DTP we have to click on the “Routine create” button for the
infoobject we want to use:
As DTP selections are stored as a range we have to populate fields of the table l_t_range with
appropriate selection parameters.
For the object “Date From” the selection routine may look as follows (we select all records with
the Date From before [Today + 30 days]):
form compute_RT_DATEF
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
* Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line *-*
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'RT_DATEF'.
l_idx = sy-tabix.
*....
DATA: cd TYPE D.
cd = sy-datum.
cd = cd + 30.
l_t_range-fieldname = 'RT_DATEF'.
l_t_range-sign = 'I'.
l_t_range-option = 'LE'.
l_t_range-low = cd.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
*$*$ end of routine - insert your code only before this line *-*
endform.