on 03-03-2007 4:56 AM
Gurus,
I have created a Customer Exit for "Month to date" calculation, but its not
working and also am getting warning message that "Value is too long for
variable ZCUR_MTD". Am trying to get date range from 03/01/2007 to 03/10/2007
if today is 03/11/2007. Please suggest any changes to the code.
Following is my code;
WHEN 'ZCUR_MTD'.
CLEAR: L_S_RANGE, l_poper, w_gjahr, l_firstpostingdate.
call function 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = sy-datum
i_monmit = '00'
i_periv = 'Z1'
IMPORTING
e_buper = l_poper
e_gjahr = w_GJAHR
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
others = 4.
check sy-subrc eq 0..
call function 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = w_GJAHR
i_monmit = '00'
i_periv = 'Z1'
i_poper = l_poper
IMPORTING
e_date = l_firstpostingdate
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
others = 4.
IF SY-SUBRC EQ 0.
move l_firstpostingdate to L_S_RANGE-LOW.
L_S_RANGE-HIGH = sy-datum - 1.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
Thanks a ton..
Message was edited by:
Geni Sap
Geni,
what is the value that is being generated in the exit ? put in a breakpoint in your code and then run the query through RSRT and you can dubug the code..
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.