on 08-19-2015 10:48 AM
Can you please update how do code abap routine in DTP filter to select calmonth based on system date ( sy-datum ) field ?
Can we do it with a formula or do we need a routine ? Can we achieve this in start routine ? Please advise.
thanks
DR
Hi Daniel,
You want extract data for current month?
If yes ,
Approach 1
Write routine at DTP level for 0CALMOTH InfoObject :
l_t_range-fieldname = 'CALMONTH'.
l_t_range-option = 'EQ'.
l_t_range-sign = 'I'.
l_t_range-low = SY-DATUM+0(6).
append l_t_range.
Approach 2
Write below code in Start Routine
Data: calmon type /BI0/OICALMONTH
clear: calmon.
calmon = sy-datum+0(6).
DELETE SOURCE_PACKAGE WHERE CALMONTH NE calmon.
Thank you,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the code. it solved my issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Any of the methods suggested by Nanda and Sander will work..
Regards,
Loed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The coding in the DTP filter routine for Time Characteristic 0CALMONTH should look like this:
DATA: l_s_range | TYPE rssdlrange. |
CLEAR l_s_range.
l_s_range-fieldname = i_fieldnm.
l_s_range-sign | = rs_c_range_sign-including. |
l_s_range-option | = rs_c_range_opt-equal. |
l_s_range-low | = sy-datum(6). |
APPEND l_s_range TO l_t_range.
p_subrc = 0.
Best regards,
Sander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.