cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Exit - Help

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184494
Active Contributor
0 Kudos

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