cancel
Showing results for 
Search instead for 
Did you mean: 

Possibility to block an invoice for accounting?

former_member230869
Participant
0 Kudos

Hello,

I have a question regarding to exports in 3rd countries.

For Export declaration via ATLAS we have to create F2 invoices before the PGI is done. Sometimes the goods leave our warehouse several weeks after billing.

That is a problem for FI/CO as expenses and revenues will be booked in different periods.

I'm looking for an elegant solution to deal with it. Cancellation and new billing is not what I mean.

In customizing you can block an invoice type for accounting, but this will apply to all invoices of that invoice type. But I only need it for 3rd countries.

I could imagine to block a sales order for accounting (but not for billing), but this is not offered in SAP Standard - as far as I know.

Has anyone an idea how to solve or xp with a solution?

Regards.

chris

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

Ideally, in exports sales, normally once material is made ready for despatch or PGId, a proforma invoice would be created to file with Customs.  Once clearance is given by Customs, commercial invoice would be generated.  This is Best Practice to be followed.

Now coming to your requirement, since already system has configured for commercial invoice and you need to block only FI document, what you can do is set some in-completion log and purposely, don't maintain that data in sale order.  By doing so, system will allow to generate commercial invoice but FI postings will not happen.

The other option is simply don't maintain Account Assignment Group of customer so that Account Determination error will happen but this is not a Best Practice

G. Lakshmipathi

former_member230869
Participant
0 Kudos

"... what you can do is set some in-completion log and purposely, don't maintain that data in sale order.  By doing so, system will allow to generate commercial invoice but FI postings will not happen."



If I decide to use the incompletion log, I have to define a field which will be checked during billing. Any proposal which field to use? And how could I decide only to check invoices for 3rd countries?

Answers (1)

Answers (1)

0 Kudos

Hi Chris

As you only have one billing type it is not possible to handle this requirement to block under specific export conditions via customising. An automated solution for your end users could be implemented in the code.

For example.
When the system detects a posting block in VOFA for the billing type it sets the vbrk-rfbsk field to 'A'.
You would for example see this here in VF01:

LV60AA93 -> form VBRK_VBRP_FUELLEN

...

IF tvfk-rfbfk = 'X'.

   vbrk-rfbsk = 'A'.         >>>>

ENDIF.

When the billing document is being saved the system then decides whether or not an FI document should be generated and if so it will call function module RV_ACCOUNTING_DOCUMENT_CREATE
to generate the FI document.

An automated solution therefore in your case is to set the internal xvbrk-rfbsk falg according to your criteria rather than from the customising in VOFA.

See below where this could be done to meet your requirement

function RV_INVOICE_DOCUMENT_ADD

...

      ENHANCEMENT-SECTION     rv_invoice_document_add_11 SPOTS es_saplv60a.     >>>>

      * Erzeugen RF-Beleg und schreiben auf die Datenbank

          IF ( xvbrk-rfbsk = ' ' OR

             ( xvbrk-rfbsk = 'A' AND kom-posting EQ 'H' ) ) AND

              i_no_fi_doc IS INITIAL.

            IF NOT i_blart IS INITIAL.

              automatic_dp = charx.

            ENDIF.

            CALL FUNCTION 'RV_ACCOUNTING_DOCUMENT_CREATE'                           >>>>

As you see here only if xvbrk-rfbsk is blank will the system try to create an FI document.
You could insert a few lines of code into the enhancement spot here to check your ALTAS export case.
If the document fits your special scenario you can simply fill the posting block xvbrk-rfbsk with A or possible 'G' (export data missing) to avoid that the FI document is generated in the background or in VF01. Obviously you would have to let the posting go through if a user was trying to release it from VF02 for example so a check on the 'sy-tcode' could be part of your case check.


So you need a workaround here either as mentioned before forcing a failure or handling a posting block in the code. You will not be able to configure this in standard while you only have one flow of documents.


I hope this helps you further

Kind regards
Brian