Hi,
why you are looking for code, its std. functionality.
conditions :
1. your DTP must be full load
2. Put the selection (Fisc/per) variable in DTP filter
Select the Delete overlapping request from cube step, while creating the PC
insert the DTP
Under delete selection select setting Delete existing request and in that check box Only delete full DTP request.
I think this will work.
Thank-You.
Regards,
VB