19
VAT Ledger reporting for Slovakia, Detailed solution guide for FI-SD

VAT control report FISD

Embed Size (px)

DESCRIPTION

VAT control report FISD

Citation preview

VAT Ledger reporting for Slovakia,Detailed solution guide for FI-SD

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 2

VAT LEGER AND AMENDMENT 360, ACT 222/2004, PAR.69 IN SD MODULE.

Materials according 222/2004, named in par. 69 have special VAT procedure and are separately reported in VAT Ledger. Slovak specialty is, that some of those materials have different procedure (VAT and Reporting), if total value for materials with defined characteristics in 1 invoice is equal or above limit (currently 5000EUR) and different below this limit.Some settings are relevant for all customers (All) and some only for those, who are dealing with commodities described in paragraph 69 (§69).Settings (All) are part of consulting solution. Setting (§69) are part of SK legal change.

Prerequisites and customizing (All) VAT codes for normal invoicing exists (20%, 10%, 0%,...) (All) VAT codes for correction invoices exists – in parallel to normal, but different codes

to differentiate between invoice and correction (§69) New VAT code/codes exist(s) for materials named in par. 69 (0%). (§69) New VAT code/codes exist(s) for materials named in par. 69 (0%), in parallel to previous,

for correction invoices.

(All) Cancellation of already cleared invoices must be avoided in copy control for invoices using standard copy requirement routine 29.

(All) Access sequence MWST should be extended for correction request and invoices. Copy of access table currently used for inland business (in standard access table 002). The table should be 1 step before currently used inland table with exclusion mark. Routine should be maintained to this sequence, which assure, this will be used (only) in correction requests and invoices (credit, debit memo,... – document types H, K, L, O, P...). Relevant condition record must exists for this access.

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 3

S ample code for 6 0 1 from P ictu r e a bo v e:

form kobed_601. sy-subrc = 4.

check: komk-aland ne space. check: komk-land1 ne space. if komk-vbtyp ne 'H' and

komk-vbtyp ne 'K' and komk-vbtyp ne 'L' and komk-vbtyp ne 'O' and komk-vbtyp ne 'P'.

exit. endif.

if at005-xegld = 'X' and et005-xegld = 'X' andkomk-stceg is initial.

sy-subrc = 0.exit.

endif.check: komk-aland = komk-land1. sy-subrc = 0.

endform.

* Prestepform kobev_601.

sy-subrc = 4.check: komk-aland ne space.check: komk-land1 ne space.

if komk-vbtyp ne 'H' or komk-vbtyp ne 'K' or komk-vbtyp ne 'L' or komk-vbtyp ne 'O' or komk-vbtyp ne 'P'.

exit. endif.

if at005-xegld = 'X' and et005-xegld = 'X' andkomk-stceg is initial.

sy-subrc = 0.exit.

endif.check: komk-aland = komk-land1. sy-subrc = 0.

endform.

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 4

(All) Credit/Debit Memo request and invoice correction should be mandatory referenced to invoice.

(All) Copy control for this documents and relevant item types should be „G“ value for pricing control, which assure new Tax determination. In Invoice correction request this may be not possible, so i tis important to make new tax determination, when creating a credit memo from this document.

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 5

(All) Copy control should assure flow of original invoice number to credit/debit memo invoice accounting document assignment field.

(§69)New Tax classifications for Material master should be defined and assigned to relevant material masters:

I – Integrované obvody M – Mobilné telefóny P – Poľnohospodárske produkty K – Kovy S – Kovový šrot (this is not part of amendment, it’s an older

requirement) (keys above are just proposal, customer may use different

characters)

For P and K keys from this example is important, statistical number in Material , at least 4 characters of combined nomenclature, must be maintained field MARC-STAWN. This is matter of customizing.

Important, depending on final solution of VAT Leger (§69):New customizing table is expected, where will be connection between Tax classification for Material and product type code, which will be displayed in A.2. Ledger. This is valid for I = IO and M = MT from example above.P and K keys from example will are to be filled into this table too. Product type code stays here empty.

(§69)Optional – create new tax classification (s) for customer master.(I tis not possible to change material tax classification in invoice processing, so if necessary to reclassify tax, this could be made via customer tax classification and appropriate condition record for MWST condition)

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 6

(§69)All relevant combinations/condition records must be maintained for VAT condition (MWST).

Tax codes and dates are just as a sample. In real system must be maintained correct date and Tax code for:“I” separate Tax code “M” separate Tax code“P” and “K” separate Tax code(“S” separate Tax code – not important for this legislative change)

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 7

1.1 (§69) User exit for control of 5000EUR limit value:

RV60AFZC USEREXIT_FILL_VBRK_VBRP

This userexit should check, in case, at least 1 TAXM1 code from defined values appears, all invoiced items. For each TAXM1 value with applying of standard invoice split criteria system cumulates total value. In case, it is less than 5000EUR, TAXM1 will be changed to value “1”. Later, when customizing table for assignment of TAXM1 to product code for VAT Ledger will be delivered, this proposed solution may be changed to use customizing table values, instead of Constants.>>>>FORM userexit_fill_vbrk_vbrp.

* Example: change Tax country* VBRK-LANDTX = T001-LAND1.

CONSTANTS: lc_country TYPE landtx VALUE 'SK', lc_curr TYPE waerk VALUE 'EUR', lc_rate_type TYPE kurst_curr VALUE 'M', lc_limit TYPE netwr_fp VALUE 5000, lc_taxm1i TYPE taxm1 VALUE 'I', lc_taxm1k TYPE taxm1 VALUE 'K', lc_taxm1m TYPE taxm1 VALUE 'M', lc_taxm1p TYPE taxm1 VALUE 'P', lc_taxm11 TYPE taxm1 VALUE '1'.

TYPES: BEGIN OF t_sum,waerk TYPE waerk, taxm1 TYPE taxm1, payer TYPE kunnr, zterm TYPE dzterm, land1 TYPE land1, fbuda TYPE wadat_ist, fkdat TYPE fkdat, fkart TYPE fkart, exnum TYPE exnum, kunag TYPE kunag, inco1 TYPE inco1, inco2 TYPE inco2, netwr TYPE netwr_fp,

END OF t_sum.

STATICS st_sum TYPE TABLE OF t_sum.

DATA: ls_sum TYPE t_sum, ls_xvbrp TYPE vbrpvb,lt_xkomfk TYPE STANDARD TABLE OF komfk, ls_xkomfk TYPE komfk,lt_lips TYPE STANDARD TABLE OF lips,ls_lips TYPE lips,ls_likp TYPE likp,ls_vbap TYPE vbap,ls_vbpa TYPE vbpa,ls_vbkd TYPE vbkd, ls_avbpak_rg TYPE vbpavb, ls_avbpak_we TYPE vbpavb, lv_netwr TYPE netwr_fp.

CHECK vbrk-landtx = lc_country.CHECK vbrk-vbtyp = 'M' or vbrk-vbtyp = 'U'.

IF vbrp-taxm1 = lc_taxm1i OR vbrp-taxm1 = lc_taxm1k OR vbrp-taxm1 = lc_taxm1m OR vbrp-taxm1 = lc_taxm1p.

************************************************* Create summarized values for tax categories

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 8

************************************************IF lines( st_sum ) = 0.

LOOP AT xkomfk WHERE vbtyp = charj.

* delivery itemSELECT * FROM lips INTO TABLE lt_lips

WHERE vbeln = xkomfk-vbeln.

LOOP AT lt_lips INTO ls_lips.

CLEAR ls_sum.

SELECT SINGLE * FROM vbap INTO ls_vbapWHERE vbeln = ls_lips-vgbel AND

posnr = ls_lips-vgpos.IF sy-subrc = 0.

IF ls_vbap-taxm1 = lc_taxm1i OR ls_vbap-taxm1 = lc_taxm1k OR ls_vbap-taxm1 = lc_taxm1m OR ls_vbap-taxm1 = lc_taxm1p.

ls_sum-taxm1 = ls_vbap-taxm1.ls_sum-netwr = ls_vbap-netpr * ls_lips-lfimg. ls_sum-waerk = ls_vbap-waerk.

* partner function bill-to-partySELECT SINGLE * FROM vbpa INTO ls_vbpaWHERE vbeln = ls_vbap-vbeln AND

posnr = ls_vbap-posnr AND parvw = parvw_rg.

IF sy-subrc <> 0.SELECT SINGLE * FROM vbpa INTO ls_vbpa

WHERE vbeln = ls_vbap-vbeln ANDposnr = '000000' ANDparvw = parvw_rg.

IF sy-subrc <> 0.CLEAR ls_vbap.

ENDIF. ENDIF.ls_sum-payer = ls_vbpa-kunnr.

* partner function ship-to-partySELECT SINGLE * FROM vbpa INTO ls_vbpaWHERE vbeln = ls_vbap-vbeln AND

posnr = ls_vbap-posnr AND parvw = parvw_we.

IF sy-subrc <> 0.SELECT SINGLE * FROM vbpa INTO ls_vbpa

WHERE vbeln = ls_vbap-vbeln ANDposnr = '000000' ANDparvw = parvw_we.

IF sy-subrc <> 0.CLEAR ls_vbpa.

ENDIF. ENDIF.ls_sum-land1 = ls_vbpa-land1.

* payment termsSELECT SINGLE * FROM vbkd INTO ls_vbkdWHERE vbeln = ls_vbap-vbeln AND

posnr = ls_vbap-posnr.IF sy-subrc <> 0.SELECT SINGLE * FROM vbkd INTO ls_vbkd

WHERE vbeln = ls_vbap-vbeln ANDposnr = '000000'.

IF sy-subrc <> 0.

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 9

CLEAR ls_vbkd.ENDIF.

ENDIF.ls_sum-zterm = ls_vbkd-zterm.

ENDIF. "ls_vbap-taxm1ENDIF. "vbap

* delivery headerSELECT SINGLE * FROM likp INTO ls_likp

WHERE vbeln = xkomfk-vbeln.IF sy-subrc = 0.

ls_sum-fbuda = ls_likp-wadat_ist. ls_sum-fkdat = ls_likp-fkdat. ls_sum-fkart = ls_likp-fkarv. ls_sum-exnum = ls_likp-exnum. ls_sum-kunag = ls_likp-kunag. ls_sum-inco1 = ls_likp-inco1. ls_sum-inco2 = ls_likp-inco2.

ENDIF.

lv_netwr = ls_sum-netwr.READ TABLE st_sum

WITH KEY waerk = ls_sum-waerktaxm1 = ls_sum-taxm1 payer = ls_sum-payer zterm = ls_sum-zterm land1 = ls_sum-land1 fbuda = ls_sum-fbuda fkdat = ls_sum-fkdat fkart = ls_sum-fkart exnum = ls_sum-exnum kunag = ls_sum-kunag inco1 = ls_sum-inco1 inco2 = ls_sum-inco2

INTO ls_sumBINARY SEARCH.IF sy-subrc = 0.

ls_sum-netwr = ls_sum-netwr + lv_netwr.MODIFY st_sum FROM ls_sum INDEX sy-tabix.

ELSE.INSERT ls_sum INTO st_sum INDEX sy-tabix.

ENDIF.ENDLOOP. "lt_lips

ENDLOOP. "xkomfk

ENDIF. "st_sum

****************************************************** Change Tax classification 1 for material in item*****************************************************

READ TABLE avbpakWITH KEY parvw = parvw_rgINTO ls_avbpak_rg.

IF sy-subrc <> 0.CLEAR ls_avbpak_rg.

ENDIF.

READ TABLE avbpakWITH KEY parvw = parvw_weINTO ls_avbpak_we.

IF sy-subrc <> 0.CLEAR ls_avbpak_we.

ENDIF.

* delivery headerSELECT SINGLE * FROM likp INTO ls_likp

VAT LEDGER REPORTING FOR SLOVAKIA, FI-SD

Version 1.2 10

WHERE vbeln = xkomfk-vbeln.IF sy-subrc = 0.

ls_sum-fbuda = ls_likp-wadat_ist. ls_sum-fkdat = ls_likp-fkdat. ls_sum-fkart = ls_likp-fkarv. ls_sum-exnum = ls_likp-exnum. ls_sum-kunag = ls_likp-kunag. ls_sum-inco1 = ls_likp-inco1. ls_sum-inco2 = ls_likp-inco2.

ELSE.CLEAR ls_likp.

ENDIF.

CLEAR ls_sum.READ TABLE st_sum

WITH KEY waerk = vbrk-waerktaxm1 = vbrp-taxm1payer = ls_avbpak_rg-kunnr zterm = vbrk-ztermland1 = ls_avbpak_we-land1 fbuda = ls_likp-wadat_ist fkdat = ls_likp-fkdat fkart = ls_likp-fkarv exnum = ls_likp-exnum kunag = ls_likp-kunag inco1 = ls_likp-inco1 inco2 = ls_likp-inco2

INTO ls_sumBINARY SEARCH.

IF sy-subrc = 0.* convert to local currency

IF ls_sum-waerk <> lc_curr.CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTINGdate = ls_sum-fkdat foreign_amount = ls_sum-netwr foreign_currency = ls_sum-waerk local_currency = lc_curr type_of_rate = lc_rate_type

IMPORTINGlocal_amount = lv_netwr

EXCEPTIONSno_rate_found = 1overflow = 2no_factors_found = 3no_spread_found = 4derived_2_times = 5OTHERS = 6.

IF sy-subrc <> 0.MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.EXIT.

ENDIF.ELSE.lv_netwr = ls_sum-netwr.

ENDIF.

* change vbrp-taxm1IF lv_netwr < lc_limit.vbrp-taxm1 = lc_taxm11.

ENDIF. ENDIF.

ENDIF. "vbrp-taxm1

ENDFORM. "USEREXIT_FILL_VBRK_VBRP<<<<

You should avoid unasked influence of different companies or sales organizations in your system.

1.1.1 (§69)Restrictions of proposed solutionPrice change in invoice creation dialog does not influence already assigned tax code.Solution is proposed only for invoices in EUR currency. In case of different currencies additional coding is required.Do not use fields on VF01 screen for Billing Type (FKART), Billing date (FKDAT) and Serv.rendered date (FBUDA). Usage of this fields is not supported.If you are using for additional split criteria field VBRK-ZUKRI, you need to add this field to t_sum and use it at reading of t_sum as a key. You need also fill this field ls_sum with the same logic, as you apply in yourroutine for transferring data to invoice (transaction VOFM). This routine is called after processing of userexit.Solution is only for invoices related to delivery. No order related invoice is supported. This means, solution couldn’t be used in case of 3

rd party business. Additional development would be required for

this.Solution was not extensively tested for mass runs, even applied logic should consider the same split criteria.

1.2 (§69)Alternative (manual) solution.In this case is no userexit used. All customizing settings stays like described above.This is valid only for individual invoice document creation. No mass invoice creation is supported. Mass processing is only possible, if no automatic posting to FI is generated.Tax classification for customer, above described as optional, is for this solution mandatory.In this case, system automatically sets VAT for all Items with relevant tax classification to 0. By manual changing of tax classification for customer in invoice header, new tax assignment could be called.For VAT condition (MWST) must be required condition records defined.

Example:Tax class. customer Tax class. material TAX

1 M 0%X M 20%

In case, more different tax classifications for material could appear on 1 invoice, more tax classifications for customer should be created and all relevant combination should be maintained.

Example:Tax class. customer Tax class. material TAX

1 M 0%1 I 0%X M 20%X I 0%Y M 0%Y I 20%Z M 0%Z I 0%

In case, this materials are usually sold in value less than 5000EUR, you can use for this manual option different approach, where combination 1 – M results to 20% and X – M to 0%.

As help for user cumulative statistical pricing condition may be maintained in pricing procedure so, that user could see in invoice document header, cumulative value for each tax classification for material (VBRP- TAXM1).