Skip to Content
author's profile photo Former Member
Former Member

Customer Exit - Help

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Mar 03, 2007 at 09:05 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.