cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice date(future date) in billing shouldnt be allowed

Former Member
0 Kudos

Hi All,

In VF01 , the user can make the invoice date in the future date.

there are few cases which has happened esp. in export invoices.

Need to block this facility.

i.e. User shouldnt allowed to enter future date and it should allowed to enter back date in billing.

I tried with routine 11 in VTFL even though it is allowing to enter future date.

with regards

Azeez.Mohd

Accepted Solutions (0)

Answers (2)

Answers (2)

atulsaini
Explorer
0 Kudos

Hi

This can be done by enhancing user exits RV60AFZZ and RV60AFZC.

In RV60AFZC form USEREXIT_FILL_VBRK_VBRP, you can compare kom-fkdat and vbrk-fkdat with system date. If these dates are more than your system date, put an abend message(Message type - A).

In RV60AFZZ form USEREXIT_PRICING_PREPARE_TKOMK, you can compare kom-fkdat and vbrk-fkdat with system date. If these dates are more than your system date, put an abend message(Message type - A).

Lakshmipathi
Active Contributor
0 Kudos

Appreciate your intention to help the member but at the same time, please see that you respond to a latest discussion and not to an old one which has been created 10 years back

Former Member
0 Kudos

Hi,

The standard routine "011" will default billing date = today's date, but it will still be changeable.

In this routine, you have two things you can do:

1. Get the help of ABAPER to add the logic to prevent the user from entering any date later than the proposed Billing Date (FKDAT), then the system will throw an error and will not allow it to be saved.

2. Alternatively, ask ABAPer to make the billing date field (FKDAT) as "Display Only" field.

Hope this helps.

Thanks.

Rgds.

Former Member
0 Kudos

Hi PKW,

As per ur suggestion i have change the routine and with abaper help findout the user-exit.

When i want to restrict the future date in the following fields are already updating the currect date .

VBRK-FKDAT and TVFKD-FKDAT. i did changes in below user-exit.

USEREXIT_FILL_VBRK_VBRP

IF vbrk-fkdat GT sy-datum.

Message 'Future date is not allowed' type 'E'.

ENDIF.

So how to tackle the problem.

with regards

Former Member
0 Kudos

Hi,

Use simple solution below:

In USEREXIT_SAVE_DOCUMENT_PREPARE just ask the ABAPER to put logic

if VBRK-FKDAT > SYDAT

then Error Msg: "Invoice date can not be greater than today's date"

and the Billing document should not save.

In this way user will not be able to create any invoice till he give current date or back date

regards

Former Member
0 Kudos

Hi All,

Thanks for u r cooperation.

I found the solution.

We have written the code as below in USEREXIT_NUMBER_RANGE_INV_DATE

IF KOM-FKDAT EQ 0.

KOM-FKDAT = SY-DATUM.

ENDIF.

IF KOM-FKDAT GT SY-DATUM.

Message 'Billing date can not be future date' type 'E'.

ENDIF.

with regards

Azeez.Mohd