on 06-02-2011 12:54 PM
I have to show daily sell in a company + sell value from the beginning of the month, and from the beginning of the year.
how to get YTD and MTD values for specified day i Query Designer. I know I need to create variables that will work on calday, but how to do it?
Edited by: Andrzej Szaranek on Jun 2, 2011 2:09 PM
Hi Andrzej
You cancheck out the below SDN thread for the MTD, YTD requirement as required by you.
Also you would find the below How-to guide for MTD, YTD calculation very helpful:
Hope this helps.
Regards,
Ninad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to create 3 input variables on calday .
1st will be a manual input ,mandatory field for e.g. : 'year'
and other two will be customer exits and intervals one for year to date and other for monthe to date .
For Year to Date :
Data :L_year type i ,
L_date type d .
.
for year to date the code should be like ,
IF i_step = 2.
CLEAR loc_var_range.
READ TABLE i_t_var_range INTO loc_var_range
WITH KEY vnam = 'year'
L_year = LOC_VAR_RANGE +0(4).
concatenate L_year '0101' into L_date.
L_S_RANGE-LOW = L_date .
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
for Month to Date :
ata :L_month type i ,
L_date type d .
.
for year to date the code should be like ,
IF i_step = 2.
CLEAR loc_var_range.
READ TABLE i_t_var_range INTO loc_var_range
WITH KEY vnam = 'year'
L_month = LOC_VAR_RANGE +0(6) .
concatenate L_Month '01' into L_date.
L_S_RANGE-LOW = L_date .
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
Restrict the keyfigures of month to date and year to date with this customer exits respectively
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.