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: 

FM / BAPI to complete a Proforma Invoice

former_member290030
Discoverer
0 Kudos

To cancel a proforma invoice in the foreground, we perform below steps:

1. Go to VF02 first screen, provide the document number(don't press enter).

2. On the same screen go to top BILLING DOCUMENT->COMPLETE.

3. Completing a proforma invoice sets it to CANCELED.

Now I need to achieve this in the background using my program but I am unable to find any FM or a BAPI to achieve it.

I could find the BAPI to cancel a billing document but it does not work in case of Proforma Invoice since there is no cancellation document type attached to it.

Please help.

1 ACCEPTED SOLUTION

former_member290030
Discoverer
0 Kudos

Thanks.

Solved myself using FM 'RV_INVOICE_DOCUMENT_ADD'

3 REPLIES 3

Jelena
Active Contributor
0 Kudos

Sorry but this process doesn't seem to make any sense. Why would you cancel a proforma? These documents don't post to accounting, so there is nothing to cancel. If you need a new one - just issue a new one. There is nothing stopping you. Naturally, you won't find any BAPI to support "proforma cancellation".

There are many posts on SCN on how proformas work, make sure to search in Google.

former_member290030
Discoverer

It is required for our custom development, where we have another document in GTS looking at the proforma invoice.

We need to cancel the proforma invoice so that corresponding GTS document also gets cancelled.

That's why I'm looking for a FM or a BAPI to set Proforma Invoice to Complete.

former_member290030
Discoverer
0 Kudos

Thanks.

Solved myself using FM 'RV_INVOICE_DOCUMENT_ADD'