1.Create an Infopackage 2. Go to selections tab and choose Type: 6 – ABAP Routine.You can see following available options(F4 Help).

3. Give disruption, and hit enter, now you will move to following screen. 4. Write Code between begin of Routine and End of Routine.

5. See below sample code to select date range from Previous 6 days to Current date.

6. L_T_Range table is of Type structure RSSDLRANGE.
a. RSSDLRANGE contains SIGN, OPTION, LOW, HIGH
We need to populate these fields to pass range dynamically.
Sample Code:
****$*$ begin of routine - insert your code only below this line *-*
Data: l_idx like sy-tabix.
Data: date_low like sy-datum.
Date_low = sy-datum – 6.”(To get 6 days back).
read table l_t_range with key
fieldname = 'CRDAT'.
l_idx = sy-tabix.
*** Pass Range values to L_T_Range Table.
Move date_low to L_T_Range -Low.
Move sy-datum to L_T_Range -High.
L_T_Range -Sign = ‘I’. *****(Here: I – Include, E – Exclude)
L_T_Range -Option = ‘BT’.****( Here: BT – Between )
modify l_t_range index l_idx.
p_subrc = 0.

***$*$ end of routine - insert your code only before this line *-*

7. Syntax check and Save.