cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for invoice cancelation

Former Member
0 Kudos

HI All


The requirement is to have a validation before canceling the invoice, that the system should not allow to cancel the invoice until user cancel the shipment (VT01N).


Please help to know what can be done to achieve the above requirement.

Regards

AZHAR

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

This requirement has been Achieved through exit V60A0001.

Thanks All for your valuable solutions

Regards

Azhar Iqbal

Answers (8)

Answers (8)

VeselinaPeykova
Active Contributor

I would seriously question the rationale behind this requirement.

When you have delivery-related billing and use transportation module, you create fiscal invoices after shipment completion (in certain process scenarios this is even done just before shipment end). This means the products were loaded on the truck, the truck was checked at the gate and left your premises, the driver visited the customer and delivered some products.

Invoice cancellation is usually done, when there is an issue with posting the document - for example the account assignment group was incorrect and no G/L account was determined. This means that if you want to remove the delivery from the shipment, you will need to reverse all shipment statuses, take the delivery out and set the statuses again. This will result in incorrect dates and times reported, in addition to that you will have wrong information how much exactly you need to pay to your forwarding agent.

Not to mention that in DSD for example status reversals are very tricky after a certain processing stage. If you have some localization specifics in place, it can be next to impossible or even illegal, because you have already sent additional information to a government portal referring to your shipment and you have received an official invoice number.

In such cases companies prefer to issue proformas before the official invoices, and, if official invoice cancellation is allowed, nobody removes documents from shipments - you either cancel the invoice and create a new one, or create credit/debit memos, or if no products were delivered and invoiced, you add return items, create a return delivery, post GR and reject the order. In all cases you make sure to provide the correct documents to the customer or get back the incorrect official invoices (in some countries this is a legal requirement).

If I were you, I would investigate why the business needs to cancel invoices, which are in a shipment.

In a well-designed process and if people follow the internal procedures, invoice cancellations should be a very rare exception.

Some companies even measure DIOTAI (delivered on time in full accurately invoiced) as KPI. By reversing all these documents you are going to hurt many people.

Former Member
0 Kudos

Hi All,

This requirement has been Achieved through exit V60A0001.

Thanks All for your valuable solutions

Regards

Azhar Iqbal

Lakshmipathi
Active Contributor
0 Kudos

I came across this type of issue coming in many manufacturing industries during month end or year end where they need to close their month end / year end sales and at that time, though physically, goods would not be ready for despatch, in SAP, everything will happen in a fast manner to generate a billing document. At some point of time, due to some manufacturing constraints, the invoiced quantity would be short in which case, OP's requirement would have to be taken care.

Jelena
Active Contributor
0 Kudos

I agree with Veselina that the requirement itself needs to be questioned. Cancellation should be an exception and when such requirements occur it often signals poorly designed business process.

Questions about additional checks during cancellations and user exits have been asked many times on SCN before. Search in Google for "invoice cancellation check site:sap.com" or similar.

Former Member
0 Kudos

Hi Azhar ,

Based on invoice number, track the delivery document. Then based on delivery number, you can track the shipment document from VTTP. If there is an entry in VTTP, it means the shipment document exists. I am not sure whether we can cancel Shipment document but we can delete the shipment document.

Lakshmipathi
Active Contributor
0 Kudos

The requirement can only be achieved through coding and not sure, what coding is written. May be it would be ideal if you can post the related code in ABAP forum and seek their assistance.

Former Member
0 Kudos

Thanks for the quick response

@Lakshmipathi: As suggested added logic and applied the break point to see how it will behave but it was going to that break point instead it is saving the document allowing to cancel the invoice.

@sumeet: the billing document is created on the basis of OBD. if we go to VBFA table and take shipment number as preceding doc it is not showing the invoice number.

Regards

Azhar

former_member184771
Contributor
0 Kudos

Hi Azhar,

You can also try to explore in VBFA table by passing VBTYP_N (Subs.doc.categ.) as "a" which is shipment cost.

Thanks.

SS

Lakshmipathi
Active Contributor
0 Kudos

Add the required logic in RV60AFZC