Professional Documents
Culture Documents
Header Data
Released On 29.10.2009 17:49:43
Release Status Released for Customer (Target Status: Pilot Release)
Component XX-CSC-BR Brazil
Other Components FI-AP-AP-Q Withholding Tax (Calculation)
Priority Correction with high priority
Category Legal change
Symptom
This note is only relevant for Brazilian companies which have applied OSS note 727475 and related notes.
This note is only for companies doing tax calculation using tax calculation procedure TAXBRJ and pricing
Due to the legal change PIS, COFINS, CSSL withheld portion is only posted when the total payment amount
In case the solution for ISS legal change(2004) described in OSS note 727475 and other related note were
Other Terms
Brazil, MP135, PIS, COFINS, CSSL, Withholding Tax, WHT, Accumulation,
J_1BCALCULATE_TAXES, RVXBRA, TAXBRJ
Solution
After applying this note the minimum withholding tax base amount check is done against the following val
l Payments for Normal Vendor/Customer invoices originated from a Logistics Document : Withholding Tax
l Documents created in FI without an Original Logistics Document : Not relevant for this solution
**************************
* Caution *
**************************
Apply the indicated support package or follow the steps described in this note.
If you have applied the support package to get the DDIC changes and code changes, Please note that copyi
1. DDIC changes
l J_1BWHTBASE_NF
Short Description
Specifes where real withholding tax calc. base is stored
Package J1BA
Data type CHAR
No. characters 1
Decimal places 0
Output length 1
Domain values: Single vals
Fix.Val Short Text
Base in Standard FI Tables
X Base Stored in Nota Fiscal
Save and activate
l J_1BTAXGRP
l J_1BWHT_ACCRB
Short Description
Accumulated withholding tax real base amount(local currency)
Package J1BA
Domain WERTV8
Field Label
Length Field label
Short 10 Acc. Rbase
Medium 20 Accum w/tax RB in LC
Long 38 Accumulated w/tax real base amnt in
Heading 21 Accum. w/tax RB
l J_1BWHT_RB
Short Description
Withholding tax real base amount (local currency)
Package J1BA
Domain WERTV8
Field Label
Length Field label S h o r t 8 W/tax rb
Medium 18 W/tax real base LC
Long 26 W/tax real base amnt in LC
Heading 8 W/tax rb
l J_1BWHT_ACCRBASE
Short Description
Accumulate real base amount
Package J1BA
Domain XFELD
Field Label
Length Field label
Short 6 Acc RB
Medium 17 Accumulate WHT RB
Long 36 Accumulate withholding tax real base
Heading 6 Acc RB
l J_1BWHT_BS
Short Description
Withholding Tax Base Amount from Nota Fiscal
Package J1BA
Domain WERTV8
Field Label
Length Field label S h o r t 10 WT Base/NF
Medium 15 WT Base from NF
Long 35 WH Tax Base Amount from Nota Fiscal
Heading 20 WH Tax Base from NF
l J_1BWHTBASE_NF
Short Description
Origin of Real Withholding Tax Calculation Base
Package J1BA
Domain J_1BWHTBASE_NF
Field Label
Length Field label S h o r t 10 Origin Medium 15
Long 25 Origin of Real Calc. Base
Heading 6 Origin
l J_1BWHTA_BR
Short Description
Additional Brazilian Data in Withholding Tax Accumulation
Package J1BA
For R3 release 470 and above set the enhancement category to 'Can be Enhanced(Character-type or nume
Component Component Type
J_1BWHTRB01
J_1BWHTRB02
J_1BWHTRB03
J_1BWHTRB04
J_1BWHTRB05
J_1BWHTRB06
J_1BWHTRB07
J_1BWHTRB08
J_1BWHTRB09
J_1BWHTRB10
J_1BWHTRB11
J_1BWHTRB12
In the 'Currency/quantity' tab set the reference table as T001 and reference field to WAERS for all
Save and activate
l J_1BWHTACCBS_BR
Short Description
Accumulated real base amount(Local currency)
Package J1BA
For R3 release 470 and above set the enhancement category to '
Can Be Enhanced(Character-type or numeric)'
Component Component Type
J_1BWHT_BS
J_1BWHTACCBS
J_1BWHTACCBS1
J_1BWHTACCBS2
In the 'Currency/quantity' tab set the reference table as T001 and reference field to WAERS for all
Save and activate
l J_1B_OPEN_ITEM
Short Description
Open Item for
Withholding Tax
Base Amount
Determination
Package J1BA
For R3 release 470
and above set the
enhancement
category to 'Cannot
Be Enhanced'
Component
Compoment Type
RefTab RefField
BUKRS BUKRS BELNR BELNR_D
l View V_T059PP
Goto View field tab and add J_1BWHTBASE_NF from the table fields. Save and activate
Regenerate View
-> Goto Untilities > Table Maintenance Generator or transaction SE54
-> Select Change
-> Select 'Expert Mode' in the 'Change Generation Element' pop-up
-> Mark the following options
X Refresh structure-specific form routines
X Renew data processing function module
X Renew data processing fctn.mod.program
-> Regenerate View
l View J_1BTXWITHV
Goto View field tab and add J_1BWHTACC_RB from the table fields. Save and Activate V
Layout
-> Goto Untilities > Table Maintenance Generator or transaction SE54
-> Goto Maintenance Screen 18 by double clicking on screen number.
-> Select Layout and create a box with name TEXT_ACCUMULATION and text 'Withholding
-> Add field J_1BTXWITHV-J_1BWHTACC_RB from Dic/program fields as an input/output fi
-> Save and Activate layout.
Regenerate View
-> Goto Untilities > Table Maintenance Generator or transaction SE54
-> Select Change
-> Select 'Expert Mode' in the 'Change Generation Element' pop-up
-> Mark the following options
X Refresh structure-specific form routines
X Renew data processing function module
X Renew data processing fctn.mod.program
-> Regenerate View
Save
l Program RFWT1000
Sym Text
131 Base amount from the Nota Fiscal( J_1BNFSTX )
132 Base amount for minimum base amount check
133 Accumulated Base amount from the Nota Fiscal in
Accumulation Period
b) Create Attributes
Attribute Level Vis. Typing
Associate. Description
Initial Value
MT_NFLIN Static Attribute
J_1BNFLIN_TAB Table of Nota Fiscal Items (J_1BNFLIN
MT_NFSTX Static Attribute
J_1BNFSTX_TAB Table of Nota Fiscal Tax Lines (J_1BN
MT_J_1BAJ Static Attribute
MC_GENERAL_ACC Static Attribute
J_1BTAXGRP Tax Group for General WHT - Accumulat
'WAT'
MC_COFINS_ACC Static Attribute
J_1BTAXGRP Tax Group for COFINS WHT - Accumulate
'WACO'
MC_PIS_ACC Static Attribute
J_1BTAXGRP Tax Group for PIS WHT - Accumulated
'WAPI'
MC_IR_ACC Static Attribute
J_1BTAXGRP Tax Group for IR WHT - Accumulated
'WAIR'
MC_CSLL_ACC Static Attribute
J_1BTAXGRP Tax Group for CSLL WHT - Accumulated
'WACS'
l Method REFTYP_FROM_AWTYP
Description
Parameters
l Method GET_REAL_BASE_NF
Description
Get WHT Accumulation Base Amount From NF Tax Lines
Parameters
IV_WITHT Importing Type WITHT
IV_WT_USE Importing Type WT_USAGE
IV_BUKRS Importing Type BUKRS
IV_REFTYP Importing Type AWTYP
IV_REFKEY Importing Type AWKEY
EV_WHT_BASE Exporting Type WT_BS
l Method NF_WHT_BASE
Description
Get WHT Base for a Given NFLine If Relevant for Accumulation
Parameters
IS_NFLIN Importing Type J_1BNFLIN
IV_TAXTYP Importing Type J_1BTAXTYP
RV_BASE Returning Pass per Value Type J_1BBASE
l Method TAXTYP_FROM_WITHTYP
Description
Get NF Tax Type From WHT Type
Parameters
IV_BUKRS Importing Type BUKRS
IV_WITHT Importing Type WITHT
IV_WT_USE Importing Type WT_USAGE
ET_TAXTYP Exporting Type MTY_J_1BAJ_TAB
Exceptions
NO_UNIQUE_TAXTYP No unique NF tax type for given WHT type
l Method WHT_BASE_FROM_NF
Description
Get WHT Accumulation Base From NF Tax Lines Per Tax Type
Parameters
IV_TAXTYP Importing Type J_1BTAXTYP
IV_REFTYP Importing Type AWTYP
IV_REFKEY Importing Type AWKEY
EV_WHT_BASE Exporting Pass Value Type J_1BBASE
l Method GET_TAX_GROUP
Description
Get the tax group of a given tax type
Parameters
IV_TAXTYP Importing Type J_1BTAXTYP
EV_TAXGRP Exporting Type J_1BTAXGRP
l Method GET_TAX_TYPE
Description
Get the tax type of a given tax group
Parameters
IV_TAXGRP Importing Type J_1BTAXGRP
ET_J_1BAJ Exporting Type MTY_J_1BAJ_TAB
l Method DETERM_BASE_FOR_CHECK
L e v e l Instance Method
Parameters
FLT_VAL Importing Type INTCA
IS_OPEN_ITEM Importing Type J_1B_OPEN_ITEM
IS_WITH_ITEM Importing Type WITH_ITEMX
IS_T059P Importing Type T059P
IV_TRACE_ACTIVE Importing Type XFELD
EV_CHECK_BASE Exporting Pass per Value Type WT_BS
CT_WHT_TRACE Changing Type WHT_TRACE_TAB
l Method SET_ACCOUNTING_DOCUMENTS
L e v e l Instance Method
Parameters
FLT_VAL Importing Type INTCA
IS_HEADER Importing Optional Type BKPF IS_ITEM Importing Optional
IS_BSEG Importing Optional Type BSEG
l Method GET_CURRENT_OPEN_ITEM
Description
Get Header and Item of Current Open Item
Parameters
IV_BUKRS Importing Type BUKRS
IV_BELNR Importing Type BELNR_D
IV_GJAHR Importing Type GJAHR
IV_BUZEI Importing Type BUZEI
ES_HEADER Exporting Type BKPF
ES_ITEM Exporting Type RFOPS
l Method FI_WT_DETERM_CALC_BASE_ITEM
Description
Determine tax code with customer BAdI
Parameters
IS_WITH_ITEM Importing Pass per Value Type WITH_ITEMX
IS_OPEN_ITEM Importing Pass per Value Type RFOPS
IS_T059P Importing Pass per Value Type T059P
RV_CHECK_BASE Returning Pass per Value Type WT_BS
a) Add Attributes
Go to the private section of class CL_IM_FQST_CALC_COUNTRY_BR via menu path Goto -> Private Sect
Add the following lines in the private section.
>> Content block
data MV_CALL_TAX_CALC type XFELD .
data MS_TAXCOM type TAXCOM .
data MT_KOMV type KOMV_TAB .
data MR_CUSTOMER_BADI type ref to IF_EX_J_1BWHT_BR_EXT .
>> Start of Insert block
data:
mt_bkpf TYPE SORTED TABLE OF bkpf
WITH UNIQUE KEY bukrs belnr gjahr .
data:
mt_bseg TYPE SORTED TABLE OF bseg
WITH UNIQUE KEY bukrs belnr gjahr buzei .
>> End of Insert block
Save.
Validity
Software Component From Rel. To Rel. And Subsequent
SAP_APPL 46C 46C
470 470
500 500
600 600
Correction Instructions
Correction Instructions
Note Reason From Version To Version Note Solution Version Support Package
The table does not contain any entries
Note Reason From Version To Version Note Solution Version Support Package
815720 0 0 950969 1
References
This document refers to:
SAP Notes
1013731 View V_T059PP: Field J_1BWHTBASE_NF not updated
916003 Brazil : Withholding tax accumulation for CBT
889553 BR : Withholding tax amount is larger than net amount
867199 Brazil WHT : Corrections for ERP 2005 SP01
852302 Implementation Overview ISS 2004 - Legal Change MP135/LC116
768022 Down Payment Clearing: Brazilian Fields Missing in WITH_ITEM
757619 MP-135 Withholding Taxes in Down Payments
757286 Country-Specific Withholding Tax Base: Preparation
727475 Overview about changes for ISS, PIS, COFINS; CSSL
Attachments
File Name File Size (KB) Mime Type
CustWHTAccumClassic.zip 66 application/x-zip-compressed