12-15-2011 12:22 PM
Hi experts,
I need to find a user exit for checking invoice period while saving an invoice in vf11 transection. For example, if its old period give error message to user my purpose is all about this.
Thanks in advance.
Tahir.
12-15-2011 12:30 PM
12-15-2011 12:42 PM
Hi Ravi.Seela ,
Thnx for replying, i think this is not what i need , what i want to do exactly is that when i try to save a reverse invoice record , at that moment i need to check if the invoice posting period is passed or not . If its not then save my reverse invoice if opposite then give a error message to user. Well i need a user exit for checking posting period. Hope i am clear.
Thnx in advance.
Tahir
12-16-2011 5:32 AM
Hi,
We have been using enhancement point available in FM RV_INVOICE_DOCUMENT_ADD. Please note that control comes here
for all other transactions as well. So you need to specifically check for sy-tcode = 'VF11'.
I hope this helps,
Regards
Raju Chitale
12-16-2011 8:41 AM
Hi
Try with USEREXIT_NUMBER_RANGE_INV_DATE in include RV60AFZC. Do the check for period with function modude FI_PERIOD_CHECK. If the period is closed, then set a range that you don't have and you will avoid that the invoice will be saved.
I hope this helps you
Regards
Eduardo
12-16-2011 2:26 PM
Thank you that worked for me, but when try to display "Message e001.." it doesn't show on vf11 what can be problem ?
Thanks in advance
Tahir
12-16-2011 2:43 PM
You have activated the exit for all tcodes(including display). you probably have to make it work only for cancel event VF11.
Generally users should be able to view an invoice even if its a different period.
Can you put the complete error message with the code u have written in exit
Regards,
Mithun
12-16-2011 2:44 PM
Hi Tahir,
See Note 799879 - Supplement to note 520202 (§14), it gives a sample of coding for this userexit when it manage a message. The coding is this
perform vbfs_hinzufuegen_allg
using vbap-vbeln vbap-posnr 'ZZ_TAX_NUMBER' 'E' '000'
space space space space.
Where ZZ_TAX_NUMBER is the class of message in SE91. You can use the message number 398 class 00.
Other samples with coding for this userexit are
SAP Note 1330330 - Poland Exchange Rate Requirements
SAP Note 481885 - Expiring currencies: Billing document in old currency
I hope this helps you
Regards
Edurdo
07-15-2013 12:11 PM
Hi Eduardo,
Thanks for the solution, this worked like a charm.
Just an addition that after the above subroutine call I added my error message, so that creation itself is stopped.
Thanks & Regards,
Aditya Niyogi
08-06-2015 12:13 PM
Hi Edurdo,
Thanks! Worked for me perfectly for VF11 checking billing date against period.
08-21-2020 8:52 AM
hi,
can you share the code that you are already worked, because i still can't find the answer..
thanks & regards,
Mahfud