Ansicht
Dokumentation

ISU_SAMPLE_R421 - Determine Tax Date in Billing Lines

ISU_SAMPLE_R421 - Determine Tax Date in Billing Lines

ABAP Short Reference   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Event R421 is processed in IS-U invoicing, before the contract accounts receivable and payable documents are crated from the invoicing data. This event gives you the option of adjusting the TXDAT_KK tax date in the billing lines.

The tax date from the billing lines is only used if tax calculation is executed with a Jurisdiction Code (TXJCD field in the document header for the ERCH billing document). This is the case in the USA and some areas of Canada, for example.

The tax date in the billing lines is determined in billing. It is used to differentiate otherwise identical bill lines if a tax change has taken place. The tax date is then set to the last valid day of the old tax rate, or to the end of the billing period if no change is made.

The tax date is then used again in invoicing to determine the grouping of individual lines for tax calculation. This means that no lines with the same tax date are grouped together. Otherwise, unique determination of the tax amount is not possible when using Jurisdiction Codes.

This grouping of lines is a prerequisite for the calculation of maximum tax. The maximum tax is also specific to the USA. The minimum/maximum amount can only be applied to determine maximum tax for those lines that can be grouped. This cannot take place with differing tax data.

If multiple contracts are to be invoiced together, and if at least one billing document exists for every contract, it may be the case that the tax data for the individual billing documents is not identical. For example, meter reading may have to take place for a contract, but not for another contract. The contract with meter reading automatically receives the reading date as the end date for billing, while the other contract receives the end date for the billing period from the schedule record for the portion. If this data differs, because the meter reading does not take place on the scheduled date, these lines would not be grouped together for tax determination.

If the billing lines within a contract refer to differing tax data, a tax change may actually have taken place. However, for multiple billing documents it may simply be the case that the period to be invoiced was billed in multiple steps. As every billing document is created independently of the other, each one uses its own end date for the tax date. If the period has simply been split into multiple billing steps, the tax data can be brought together again. If the tax rate has changed, this is not possible.

If various different types of billing documents are invoiced together, the tax data should not be unified. This could be the case if manual billing documents are invoiced together with periodic billing documents, for example.

However, there can be exceptions, if manual billing documents come from another energy provider and are to be grouped together for tax calculation.

Example

The date to be used can be the earliest (=greatest) debit billing date (ABRDATS from the subtable ERCHZ for the T_BILL_DOC table).

Notes

Changes to the billing documents table are not taken into account and are not permitted.

Programming restrictions

To ensure that you do not endanger system consistency, you cannot use the following language elements in events:

  • COMMIT WORK
  • ROLLBACK WORK
  • CALL FUNCTION 'DEQUEUE ALL'
  • Deletion of locks that you did not set yourself

Further information





Parameters

T_BILL_DOC
X_IIU
X_IIU_PARAM
Y_TXDAT

Exceptions

Function Group

E21U

Fill RESBD Structure from EBP Component Structure   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 3935 Date: 20240523 Time: 133729     sap01-206 ( 94 ms )