on 02-08-2016 2:35 PM
Hi All,
My requirement is to get the avg qty for YTD.
I tried going thru many posts but cannot find the required solution.
I have written code in cmod to get the no.of days based on calday input, can anyone help me how to use this customer exit in the query designer so as to get the avg quantity for the year.
I have tried different approaches and was unsuccessful, If any one can provide me with screen shots to maintain at query level would be much helpful
Thanks in Advance
Code used in the Query
WHEN 'ZNUMMTD'.
IF I_STEP = 2. "after the popup
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZMPDATE'." User Input (For Ex: 20160205 YYYYMMDD)
CLEAR L_S_RANGE.
LV_DATE1 = LOC_VAR_RANGE-LOW." Range High (For Ex: 20160205 YYYYMMDD)
LV_DATE = LOC_VAR_RANGE-LOW.
LV_DATE+6(2) = '01'." Range Low (For Ex: 20160205 YYYYMMDD)
V_LOC_DATE = LV_DATE1 - LV_DATE." DIfference between Start date and end date
L_S_RANGE-LOW = V_LOC_DATE.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
Regards,
Madhu
Hi All,
for the above issue i used the above code and created a restricted keyfigure as below.
1. create a rkf for the required keyfigure with restriction on no of days(MTD ) logic same as above, change the opt from eq to bt and pass high and low value as above.
2. Create a CKF with formula variable.
Formula variable name should be same of customer exit name.
3. create another ckf to calculate the avg as RKF created in first step/ckf created in second step.
Same steps can be used for the YTD and YTD avg also
Thanks,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.