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: 

Duplicate invoice check in FV60/65

Former Member
0 Kudos

Hi

I am trying to set up a custom error message for duplicate invoice based on Vendor number (LIFNR) and Reference number (XBLNR) alone. The system presently considers a bigger set of fields to check for duplicate invoices which are

Company code

Vendor number

Currency

Reference number

Amount in Document currency and

Document date

I need to override this setting and have duplicate invoice check based on vendor and reference no. combination.

I have seen some threads which talk about BTEs where an FI interface - SAMPLE_PROCESS_00001110 can be customized by copying the sample function module and make customizations in the BTE.

Can somebody throw more light on how to approach this.

Any kind of approach solution would be appreciated

Thanks

Nag

3 REPLIES 3

Former Member
0 Kudos

Was able to get into FIBF and create a product and attach custom function (copy of sample function found in BERP) of the BTE against the product... Problem resolved

0 Kudos

Hi Nagender,

Could you please elaborate on the solution...

Thanks,

Venkat

0 Kudos

There are two steps to be followed for the duplicate invoice check in FV60/65:

Step 1:

I guess you know how to access the sample function module. Go to tcode BERP and select the business process 01110.

Click on the button ‘Sample function module’ and you would be taken to SE37 and the sample function SAMPLE_PROCESS_00001110 would be displayed. Make a copy of this function module in to ZSAMPLE_PROCESS_00001110 or something like that.

Write your custom code required for the duplicate invoice check as per your requirements.

Step 2:

This involves configuration where the custom function module created in the earlier step should be made active in the BTE process.

Go to tcode FIBF and create a product through the menu path: SETTINGS -> PRODUCTS -> ….of a customer

First create a product by clicking on ‘NEW ENTRIES’ button and save the product.

Next, you have to attach the Z function created in the first step to this product. For this, follow the menu path SETTINGS -> PROCESS MODULES -> ….of a customer.

Attach your z function to the product as shown in the first line and you are all set.

Test the tcodes FV60/65 and see if they hit your custom code in the z function to verify the results.

Hope this helps.

Note: Here is the custom code that I have written in the function module for my purpose.

_____________________________________________________________________________

SELECT COUNT(*) FROM bkpf

JOIN vbsegk

ON bkpfbelnr = vbsegkbelnr

WHERE bkpf~xblnr = i_xblnr

AND bkpf~blart = i_blart

AND vbsegk~lifnr = i_lifnr.

IF sy-subrc = 0.

MESSAGE e000(za) WITH 'Document already exists for given Vendor:' i_lifnr '& invoice ref:' i_xblnr.

ENDIF.

______________________________________________________________________________

Thanks

Nag

P.S: Please reward points if solution is useful...thanks