on 01-29-2008 6:10 PM
Hi Experts,
Issue: Needs to create customer exit in a variable.
Query build on a Cube.
In that query the time dimension is the YEAR. (period will gives the value for whole year (Not for specific months).)
When we are in January 2008, the report must display the data of year 2007.
When we are in the other months( from Feb'08), the report must display the data of 2008.
Here we are trying to create customer exit on Period Variable, for the query.
Let me say like this for Example:
Date = Sy_datum {Assume date is 20080129}
'Year' = 'Date'(4) {here 4 calls value of the year 2008}
'Month' = 'Date'+4(2) {here 2 calls value of the month 01}
If 'Month' EQ '01'
0calyear = 'year' -1
Else
0calyear = 'year'
End if.
I feel the logic mentioned above is correct.But I need the structured ABAP code for this.
Please do the needful and let me give your valuable solution regarding the particular issue.
Thanks in advance.
Create a customer exit variable say 'ZCALY', and write this code for i_step = 1. It will populate the value for 0CALYEAR automatically.
CASE i_vnam.
WHEN 'ZCALY'.
IF i_step = 1.
CLEAR l_s_range.
t_date = sy-datum.
t_year = t_date+0(4).
t_mon = t_date+4(2).
if t_mon = '01'.
l_s_range-low = t_year - 1.
else.
l_s_range-low = t_year.
endif.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
WHEN OTHERS.
ENDCASE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.