Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

user exit for checking invoice period in vf11 trans.

tahir_z
Contributor
0 Kudos

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.

10 REPLIES 10

Former Member
0 Kudos

Hai,

check this V60P0001

0 Kudos

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

Former Member
0 Kudos

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

eduardo_hinojosa
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

Hi Edurdo,

Thanks! Worked for me perfectly for VF11 checking billing date against period.

0 Kudos

hi,

can you share the code that you are already worked, because i still can't find the answer..

thanks & regards,

Mahfud