wiki completa
wiki completa
wiki completa
PUBLIC
Warning
This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product documentation. The information included in custom documentation may not
reflect the arrangement of topics in the SAP Help Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.
Currently we are maintaining all SAP Document Compliance as part of our community:
Value Mappings
This is custom documentation. For more information, please visit the SAP Help Portal 1
10/15/24, 3:12 PM
HI_DTE_LOB_S4H Line of Business description for S4
HI_DTE_MERCH_IND Indicator of Type of merchandise
HI_DTE_PACK_TYP_CODE Type of Package code
HI_DTE_PAYMENT_FORM Payment Form/Export Payment Form
HI_DTE_PRINT_TYPE Print Type
HI_DTE_REFDOC_MERIND Reference document type for Transport Indicator
HI_DTE_REFDOC_SERIND Reference document type for Service Indicator
HI_DTE_REF_REASON Credit/Debit Memo Reason code
HI_DTE_SERV_IND Service Indictor for External material group
HI_DTE_TRANSP_TYPE Chile DTE SII Transport Type
HI_DTE_TRANS_CURR Transaction Currency Type
HI_DTE_WEIGHT_UNIT Weight unit
HI_FI_DTE_REF_REASON Credit/Debit Memo Reason code
PDI_INV_EXEM_IND Invoice/Exemption Indicator
PURCH_TRANS_TYPE Purchase Transaction type
SALES_TRANS_TYPE Sales Transaction type
Fixed Values
This is custom documentation. For more information, please visit the SAP Help Portal 2
10/15/24, 3:12 PM
Let's suppose than a B2B invoice (DTE 33) is submitted to SII for registration and analyze the steps in detail.
1) Submit
Composes, assigns a number, signs and sends a DTE to the tax office for registration.
2) Status
Checks the status of the business document after DTE processing. If the DTE was already rejected or it is pending for processing by SII, it is reported as "Not Received by SII" in the cockpit.
Application log and history (list of steps executed and its corresponding tracing information) can help analyze the information sent and received from the tax office.
__________
Notice - actions are present in all cockpit versions including SAP Fiori and ABAP GUI based.
Electronic documents are received in the SII platform. Upload conclusion process (https posting) returns a technical acknowledgement. At this point a number of important actions already
finished successfully:
Number range, DTE and transmission signing process execution (a later point in time SII will perform all due validations).
Sender is allowed to submit invoices on behalf of the company.
Document could be parsed by SII.
Submission performs all these actions listed and the conclusion of the upload is reflected in the cocktpit.
Notice this process can be automated in SAP DRC, no manual intervention is required specially if there is a high volume of DTEs.
SII will check asynchronously the DTEs uploaded. If all controls are finished successfully, the DTE (in this example an invoice) will be accepted and then become visible in the sales records. SII
validation includes for example:
Status check action will check the records accepted and update the cockpit accordingly. There could be DTEs accepted with some warnings.
There are certain validations that will cause the complete rejection of the uploaded DTE. SII will inform the situation and provide a detail via mail (3318224 - eDocument Chile: Installation Overview
Note for SII E-Mail Processing). Thus the DTE is either never received by SII or requesting an adjustment.
This is custom documentation. For more information, please visit the SAP Help Portal 3
10/15/24, 3:12 PM
In conclusion, if some particular DTE is not received by SII after a long period of time compared with the rest of the DTE submitted it indicates there is some issue in the incoming SII log mail
processing.
The address to receive mails from SII is configured in the SII site itself, there is one for testing environment and another for production environment.
Create a Mail
Currencies Descriptions
Tax office references "schema" domain for currencies descriptions based on Customs Office definitions, this is the list of currencies available on version 10 and used in xml fields like TipMonType:
* BOLIVAR
* BOLIVIANO
* CHELIN
* CORONA DIN
* CORONA NOR
* CORONA SC
* CRUZEIRO REAL
* DIRHAM
* DOLAR AUST
* DOLAR CAN
* DOLAR HK
* DOLAR NZ
* DOLAR SIN
* DOLAR TAI
* DOLAR USA
* DRACMA
* ESCUDO
* EURO
* FLORIN
* FRANCO BEL
* FRANCO FR
* FRANCO SZ
* GUARANI
* LIBRA EST
* LIRA
* MARCO AL
* MARCO FIN
* NUEVO SOL
* OTRAS MONEDAS → Other currencies not considered
* PESETA
* PESO
* PESO CL
* PESO COL
* PESO MEX
* PESO URUG
* RAND
* RENMINBI
* RUPIA
* SUCRE
* YEN
SII tax office (IRS) in Chile manages taxpayer invoicing authorization by restricting the number of electronic documents companies can issue.
This is custom documentation. For more information, please visit the SAP Help Portal 4
10/15/24, 3:12 PM
Taxpayers must request number ranges directly from the tax office site. For that the tax office has an application to manage the ranges and distributes files with capability to sign electronic
documents ("Timbraje") for that purpose:
Testing Environment
Production Environment
The result of the process generates an XML file. This XML file contains a number of components:
The XML file must be uploaded using the "Create/Delete Number Range" App (in OnPremise and Private Cloud environments use transaction EDOC_CL_NRXML). This process will adjust the
number range in SAP for the particular DTE type.
Notes:
Notice the "Number range number" parameter refers to the Number object INTERVAL.
If the file was uploaded previously, it can be uploaded again, but a new invoice number range (from/to number) requires deleting the existing interval first.
Since there are not many intervals, '01' is normally the only one constantly reused.
The outcome of the process is a file downloaded to the local PC with extension "KEY". This is the private key (RSA key) used to sign the invoice number.
The private key must be added to the SAP Integration Suite keystore. The system will request generic country and organization data to create a public key.
Notes:
Information in the public key does not undergo any type of specific data validation.
Automation is possible using Security APIs, these are sample requests using CURL you can test from your Microsoft Windows command prompt:
Creation
Update
etc....
This is custom documentation. For more information, please visit the SAP Help Portal 5
10/15/24, 3:12 PM
Electronic invoice issuers must make the XML representation of the invoice available to the electronic invoice recipients. This process is normally carried out via mail, using the taxpayer
communication mail address maintained in the SII portal.
Communication files can be uploaded using the Upload tool for Incoming messages:
After this process is concluded, the files are available for the Inbound handler to add to the cockpit.
Notice SAP DRC provides a functionality to update business partners mail address periodically. It updates the BP default mail address, if some specific mail address is meant to be updated a
customer enhancement is required.
After the files are uploaded, the eDocument Inbound Message Handler periodic process creates the Chile Incoming DTE Envelope from the files previously uploaded.
DTES inside envelops are to be checked where the main audit process takes place here:
correct recipient
identified sender.
signature validation
This is custom documentation. For more information, please visit the SAP Help Portal 6
10/15/24, 3:12 PM
SII online validation (header values and signature)
duplication check
If everything is correct, a DTE is created in the cockpit, and a reception notification is sent, otherwise a rejection notification is sent instead.
C) Positive List
This is a typical step carried out by many companies. Since some invoices coming from vendors like municipalities, utilities and other vendors must be accepted and paid to prevent disruptions,
D) Negative List
It is also possible to create a negative list for certain vendors, whose invoices are automatically rejected without further analysis.
3-way match process in accounts payable involves checking the correspondence among the invoice, the good receipts, service entry sheets and the
SAP DRC framework included extension capabilities to help integrate the business process.
SAP ECC and SAP S/4HANA Private edition differ from S/4HANA Public edition, but both support connecting the incoming process. Furthermore, it is possible to integrate acceptance and
rejection from the receiving module automatically.
F) Invoice Expiration
It is also possible to schedule a process to issue rejections for invoices not processed after some days, to prevent expiration.
If the electronic document is not received it is not possible to reject it from the cockpit. There are 2 possibilities though:
1- Manually check invoices in SII portal and reject if appropriate in the SII portal.
2- Download the purchasing reports, compare with the received electronic documents and implement the rejection reusing and extending the existing functionalities in SAP DRC for Chile. In
particular, there is an iFlow for acceptance and rejection that can perform the activity.
All previous steps can be automated, also SAP DRC will filter out electronic documents whose status is not appropriate for the action, but nevertheless, it is required to implement some vendor,
customer and dynamic date filtering.
In order to achieve this functionality, the cockpit allows to save filtering variants, and the reference these variants in the eDocument Background processing program.
Incoming factoring
SII is the Chilean internal revenue service, they control electronic invoicing: Electronic Invoicing at SII
Tax office grants DTE nuber ranges to tax payers, what includes also a signing functionality
Sectors
Emisor →
→ BP Ind_sector HI_DTE_LOB_S4H
Tax office defines the complete rules to complete the electronic documents: Definition of Electronic Tributary Documents
Customers can adjust the standard mapping in accordance with their particular requirement.
Electronic invoicing in Chile makes an extensive usage of security artifacts, normally it is not easy to understand the usage. The implementation guide provides step-by-step instructions for
execution, this document provides contextual information to clarify the activities executed and the reason.
As a general rules, there are 3 objectives from security perspective that are to be implemented in any integration:
1. Confidential Communication
2. Authorization Control
3. Message Integrity
It is highly recommended to read this blog on basic security terms that can help understand the topic.
Confidential Communication
This is custom documentation. For more information, please visit the SAP Help Portal 8
10/15/24, 3:12 PM
SII resolution /EnvioDTE/SetDTE/Caratula/FchResol Fecha de RESDAT Date the Main resolution:
declaring the Resolucion resolution was
https://www.sii.cl/documentos/resoluciones/2014/reso80.pdf
company as que Autoriza issued allowing
"electronic la Emision de to generate
issuer". DTE/Boletas electronic
(AAAA-MM- invoices. Example:
DD)
Format: YYYY- Ley Chile - Resolución 148 EXENTA 24-SEP-2010 MINISTERIO
MM-DD DE HACIENDA, SERVICIO DE IMPUESTOS INTERNOS,
DIRECCIÓN NACIONAL - Biblioteca del Congreso Nacional
/EnvioDTE/SetDTE/Caratula/NroResol Numero de RESNUM Number of the (bcn.cl)
Resolucion resolution
que Autoriza allowing to
la Emision de generate
DTE/Boletas electronic
invoices.
Notice in
testing
environment it
must be 0.
The person
digital identity
(i.e key-pair,
aka
"certificate") is
to be uploaded
in the SAP
Integration
Suite tenant
keystore to
authenticate
and check
authorization.
The description is derived from the industry assigned to the company via value mapping, and the code is taken directly from the company additional data:
This is custom documentation. For more information, please visit the SAP Help Portal 9
10/15/24, 3:12 PM
Delivery Notes
Currently we are maintaining all SAP Document Compliance as part of our community:
Semantic Meaning Name In Original Language SAP company configuration parameter Explanation
Tax Identification Code RUC TAXID This is the fiscal identification for the company.
Document type used for voiding request. Código de tipo de documento de identidad PE_TTY Fixed value "6".
Change Log:
Feb 2021 - Changes in the definition of LineExtensionAmount (LEAMNTV1) - in free of charge scenario
For free of charge: this tag is the cost or reference market price.
This is custom documentation. For more information, please visit the SAP Help Portal 10
10/15/24, 3:12 PM
November 30th 2021 - Credit Notes not affecting amounts (Type "13" and "03")
Reported amount must be 0, but must the SD invoice be transferred to accounting for electronic invoicing and reporting purposes.
September 29th 2021- IMPORTANT: SUNAT Changed the definition of 4 concepts (LegaMonetaryTotal at header level, AllowanceTotalAmount, etc...), it will impact validations. Also,
comercial samples must report tax subtotals.
LMTLEAMTV1 - before: eDc Hd Ttl Amt noDisc noTax; now: eDc Hd Ttl Amt +Disc noTax=> discounts and global surcharges must be added
LMTATAMTV1 - before: eDc Hd Ttl Discounts -all discounts; now: eDc Hd Ttl Dsc noTax only those not affecting the taxable amount
LMTCTAMTV1 - before eDc Hd Ttl Surchages - all surcharges; now: eDc Hd Ttl Src noTax only those not affecting the taxable amount
PRACPR1V1 - before eDc It TTLUnPrc+lSur+lDisc+Tax; now: eDc It TTLUnPrc+Tax => Unit price and tax, no surcharges or discounts
TXAMNTV1 (header) - before eDc Hd Sum All Tax - all taxes; now: eDc Hd Sum Tax noGrant =>For free of charge items (9995 and 9996) concepts must not be added
TXAMNTV1 (item) - before eDc It Ttl Tax - all taxes; now: eDc It Ttl Tax noGrant =>For free of charge items (9995 and 9996) concepts must not be added
Introduction
Tax office requested that all the monetary information MUST BE PRESENT in the commercial and accounting systems, and not just in the XML presented, so this wiki provides sample pricing
elements to help customers generate invoices compliant with the regulations.
Also, this guide provides references to electronic invoicing configurations, but the pricing setup is independent of the electronic invoicing functionality, and created to accommodate the SUNAT
mandate.
Basic Information required by tax office for all SD customers (with or without SAP DRC -electronic invoicing)
Understanding taxes reporting
Sample statistical conditions and subtotals used in this document (sorted in feasible order)
Sample pricing adjustments for Peruvian companies (side-by-side new vs old)
Monetary Information to be contained in billing documents
Sample Pricing Coding snippets for particular element (VOFM transaction)
After SD pricing is finished the following configurations must be carried out for monetary values (also available in the Implementation Guide aka "SPRO").
Scenario Specifics
Sample Monetary Values Setup for Samples (aka "Free-Of-Charge")
Press F1 in the XML Node ID column to read the SUNAT definition for the element.
Sample data for Invoice (copy to credit note, debit note, boleta, etc...):
Mapping ID XML Node ID Level SD Pricing Pricing SUNAT Catalog Some explanation XML Tag Sample Pricing Required?
(Document (Header Procedure Step Catalog Item Condition (Always:
Type) /Line) (not Code printing
delivered) "A" or "a"
If Any:
printing
"B" or "b")
SUNAT-114- ALLCHRGV1 L RVAAPE 809 53 00LD This is a line item AllowangeCharge if any
2019 level discount
SUNAT-114- LEAMNTV1 L RVAAPE 973 Net amount InvoiceLine/LineExtensionAmount eDc It Amt Always
2019 without taxes +ItDsc+ItSur
noTax
SUNAT-114- LMTATAMTV1 H RVAAPE 995 All Discounts LegalMonetaryTotal(Requested)/AllowanceTotalAmount eDc Hd Ttl Dsc if any
2019 noTax
This is custom documentation. For more information, please visit the SAP Help Portal 11
10/15/24, 3:12 PM
SUNAT-114- LMTCTAMTV1 H RVAAPE 994 All Surcharges not LegalMonetaryTotal(Requested)/ChargeTotalAmount eDc Hd Ttl Src if any
2019 affecting taxable noTax
amount
SUNAT-114- LMTLEAMTV1 H RVAAPE 990 Total amount with LegalMonetaryTotal(Requested)/LineExtensionAmount eDc Hd Ttl Amt Always
2019 discounts and +Disc noTax
surcharges.
SUNAT-114- LMTTIAMTV1 H RVAAPE 996 Total amount, LegalMonetaryTotal(Requested)/TaxInclusiveAmount eDc Hd Ttl Amt + Always
2019 without any Tax
discount or
surcharge, but with
Taxes. Notice it is
only a subtotal
without business
meaning.
SUNAT-114- LPRICEV1 L RVAAPE 972 List or Market Price Price eDc It UnPrc Always
2019 (not amount!) noHdSur noTax
SUNAT-114- PAYTMNSV1 H RVAAPE 999 Detraction Payment Means eDc Hd Detraction if any
2019 percentage (see it St
here) - redefined
after 114-2019
SUNAT-114- PAYTRMV2 H RVAAPE 999 54 001 Detraction PaymentTerms eDc Hd Detraction if any
2019 Reference + St
Payment Method
(new since
193/220)
SUNAT-114- PRACPR1V1 L RVAAPE 975 16 01/02 01- Item unit gross PricingReference/AlternativeConditionPrice 01: eDc It Always
2019 list price (not TTLUnPrc+Tax
amount!) or
02- Item reference 02: eDc It Free Of
market or list unit Charge
price customer is
receiving somehow
for free.
SUNAT-114- TXAMNTV1 H RVAAPE 989 Final sumarization TXAMNTV1 eDc Hd Sum All Always
2019 of taxes (no Tax
grants), no SD
condition is needed
as taxable amount
is not present,
summary works.
SUNAT-114- TXAMNTV1 L RVAAPE 998 Item level TXAMNTV1 eDc It Ttl Tax Always
2019 sumarization of noGrant
taxes, no SD
condition is needed
as taxable amount
is not present,
summary works.
SUNAT-114- TXSUBTV1 H RVAAPE 984 05 1000 Summarization of TXAMNTV1/TaxSubtotal eDc Hd Sum VAT if any
2019 taxes using catalog Exp, eDc Hd Sum
5 (e.g. 9995: Free Of C, eDc Hd
export, 1000: Sum VAT
regular VAT). SD Exempt,eDc Hd
Condition required Sum VAT 0, eDc
to report the Hd Sum VAT
taxable amount.
SUNAT-114- TXSUBTV1 L RVAAPE 981 07 101000 Splitting taxes at TXAMNTV1/TaxSubtotal eDc It Tax if any
2019 line item level with Exempt,eDc It VAT
catalog 7, 101000→ Grant 0%,eDc It
regular VAT). SD VAT Grant, eDc It
Condition required VAT 0%,eDc It
to report the VAT, eDc It VAT
taxable amount. Export 0%,eDc It
VAT Export 0%
Document Level SUNAT definition (in English) UBL 2.1 node… Reference Catalog Catalog Source Sample
& Catalog Code Description SD Condition/Subtotal
( + SAP DRC XML Node ID)
Regulation Pricing
Step
This is custom documentation. For more information, please visit the SAP Help Portal 12
10/15/24, 3:12 PM
INVOIC- Header This tag reflects discounts, AllowanceCharge (ALLCHRGV1) Cat 53 - 2 Global 810 HA00 Percentage
114- surcharges, perceptions and other Surcharges, Header Discount
2019 factors that result in deviation from Discounts and Discount
the regular sale price. Perceptions
49 Global 811 EDC2 eDc Hd Surch (sbj
Header to
Surcharge
This element totalizes the amount of AllowanceTotalAmount No reference 995 eDc Hd Ttl Dsc
header and item level discounts not (LMTATAMTV1) to catalogs noTax
affecting taxable amount.
This element totalizes the amount of ChargeTotalAmount 994 eDc Hd Ttl Src
header item surcharges for gratuities (LMTCTAMTV1) noTax
or warranties not affecting taxable
amount.
This element represents the total net LineExtensionAmount 990 eDc Hd Ttl Amt
amount with discounts and (LMTLEAMTV1) +Disc noTax
surcharges.
This element represents the total TaxInclusiveAmount 996 eDc Hd Ttl Amt +
amount with taxes (LMTLEAMNTV1 + (LMTTIAMTV1) Tax
header TXAMNT_1
This element has been redefined by Payment Means (PAYTMNSV1) 999 J1PE eDc Hd Detraction
the tax authorities and it is only St
relevant for the detraction statement.
It represents the percentage and the
calculation method used for the
detraction amount.
This element has been redefined by PaymentTerms (PAYTRMV2) 54 Cat. No.54 1 999 J1PE eDc Hd Detraction
the tax authorities and it is only - Goods and St
relevant for the detraction statement. Services
It represents the bank account used Subject to
to deposit the detraction amount. Detraction
This element represents the total TaxTotal (TXAMNTV1) No reference 989 eDc Hd Sum Tax
amount of taxes, summarizing all the to catalogs noGrant
subtotals. It is present at header level
and at item level.
This element represents individual tax TaxTotal/TaxSubtotal Cat 5 - Header 9995 Export 984 EDCL eDc Hd Sum VAT
information for each item and also for (TXSUBTV1) level tax Exp0%
header-level summarization. reporting
9996 Free 985 EDCI eDc Hd Sum Free
For samples scenarios this item must Of C
be calculated as well based on the
reference price. 9997 Customer 986 EDCJ eDc Hd Sum VAT
not subject Exempt
Line This tag reflects discounts, AllowanceCharge (ALLCHRGV1) Cat 53 - 00 Line item 809 EDC3 eDc It Disc (sbj to
Item surcharges, perceptions and other Surcharges, discount VAT)
factors that result in deviation from Discounts and
the regular sale price. Perceptions
This element represents line item unit Price (LPRICEV1) 972 eDc It UnPrc
price without taxes or any surcharges. noHdSur noTax
This is custom documentation. For more information, please visit the SAP Help Portal 13
10/15/24, 3:12 PM
This element represents either the AlternativeConditionPrice Cat 16 - 2 Market 974 eDc It Free Of
unit price with line item discounts, (PRACPR1V1) Operation or price Charge
surcharges and taxes, or the reference reference
market price. This is a line-item-level price 1 Efective 975 eDc It
element. sales price TTLUnPrc+Tax
This element represents the total TaxTotals (TXAMNTV1) 998 eDc It Ttl Tax
amount of taxes, summarizing all the NoGrant
subtotals. It is present at header level
and at item level.
This element represents individual tax TaxSubtotal (TXSUBTV1) Cat 7 - Item 209997 Customer 977 EDCC eDc It Tax Exempt
information for each item and also for level not subject
header-level summarization. tax/reason - Sales
porting Operation
Requirements
Some subtotal or tax exclusions might be required to eliminate items not required
To produce the required information, e.g. the detraction rules in particular, requires specific calculations.
When the unit price is required, the quantity for the condition must be set to the unit.
Printing Indicators
As explained above, all new printing indicators must be used (cannot be combined with old as that is not supported from SD side). It is important to configure this pricing indicator in such a way
that it keeps records of empty or zero value tags when requested by SUNAT.
The first column of each catalog table is a FREE key, you can define any value (Catalog Item Code - this is meant to be mnemotechnical)
Catalog Item Code Tax Type Code Description UNECE 5153 Local Name UNECE 5303
This is custom documentation. For more information, please visit the SAP Help Portal 14
10/15/24, 3:12 PM
9996 9996 Gratuito FRE GRA Z
Catalog Item Code Description Tax Impact and Reason Code Tax Type Code (reference to Cat 5)
Catalogs 09, 10, 16, 51, 53 and 54 have to be filled up in a similar fashion from SUNAT latest validation spreadsheet. Remember the first column (Catalog item code) is free and should be used to
generate mnemotechnical codes.
Catalogs Metadata
Catalog Metadata explains SUNAT the reference information used for semantic, this information is not changing frequently
Catalog Catalog URI Catalog Name (DO NOT TRANSLATE OR CONDENSE!) Catalog Agency
This is custom documentation. For more information, please visit the SAP Help Portal 15
10/15/24, 3:12 PM
Sample Monetary Values Setup for Samples (aka "Free-Of-Charge")
This is a reference XML content for commercial samples, free of charge or medical samples. Combination or regular items and free of charge is supported, also including items subject to VAT or
not.
IMPORTANT!!!: LineExtensionAmount (LEAMNTV1) in the picture it is 0 at line item level, but in accordance with the latest definitions, it should be the cost or reference total market price (ref price
* quantity). (being reviewed with SUNAT)
This is a list of sample pricing requirements and value calculation useful to produce SUNAT required values.
DISCLAIMER: Notice these snippets are highly dependent on the existing pricing configuration and can be used only as reference if needed and adjusted accordingly. SAP has neither
responsibility nor support for any of the snippets.
Pricing Requirements:
950 - How to turn on and off header level elements (not required, but useful for business user)
*********************************************************************
* Monetary Totals configuration
* Header level subtotal
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM KOBED_950.
* Turn off header level sub total for items
if KOMP-KPOSN = '000000'.
sy-subrc = 0.
else.
sy-subrc = 4.
endif.
ENDFORM.
FORM KOBEV_950.
This is custom documentation. For more information, please visit the SAP Help Portal 16
10/15/24, 3:12 PM
sy-subrc = 0.
ENDFORM.
951 - How to turn on and off item level elements (not required, but useful for business user)
*********************************************************************
* Monetary Totals configuration
* Item level subtotal
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM KOBED_951.
* Turn on item level sub total for items
if KOMP-KPOSN = '000000'.
sy-subrc = 4.
else.
sy-subrc = 0.
endif.
ENDFORM.
FORM KOBEV_951.
sy-subrc = 0.
ENDFORM.
952 - How to exclude repeating VAT conditions at item level (can be also achieved using conditions groups if preferred)
*********************************************************************
*
* Tax exclusion at item level
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM KOBED_952.
data w_remove like sy-subrc VALUE 0. " 999 --> remove, 0 ---> stay
if <XKOMV>-KSCHL = 'EDCC'
or <XKOMV>-KSCHL = 'EDCE'
or <XKOMV>-KSCHL = 'EDCB'
or <XKOMV>-KSCHL = 'EDCD'
or <XKOMV>-KSCHL = 'EDCA'.
w_remove = 999.
exit.
endif.
endloop.
if w_remove = 999.
sy-subrc = 4.
endif.
ENDFORM.
FORM KOBEV_952.
ENDFORM.
*********************************************************************
* VAT exclusion at header level
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM KOBED_953.
if <XKOMV>-KSCHL = 'EDCI'
or <XKOMV>-KSCHL = 'EDCJ'
or <XKOMV>-KSCHL = 'EDCK'.
w_remove = 999.
exit.
endif.
endloop.
if w_remove = 999.
sy-subrc = 4.
endif.
This is custom documentation. For more information, please visit the SAP Help Portal 17
10/15/24, 3:12 PM
ENDFORM.
FORM KOBEV_953.
ENDFORM.
***********************************************************************
* This item determines the free of charge based on the total amount
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM KOBED_954.
sy-subrc = 4.
if KOMP-KPOSN ne 0 and KOMP-NETWR eq 0.
sy-subrc = 0.
endif.
ENDFORM.
FORM KOBEV_954.
sy-subrc = 0.
ENDFORM.
Condition Value:
*********************************************************************
* List Prices - calculate list price
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM FRM_KONDI_WERT_980.
ENDFORM.
*********************************************************************
* Net Unit Price - calculate final unit price
* This requirement is ment to be used in SAP Document Compliance
* for subtotal activations (XML elements construction)
*
FORM FRM_KONDI_WERT_981.
loop at XKOMV ASSIGNING <xkomv> where stunr = xkomv-stunB. "← adjust as appropriate
xkwert = <xkomv>-KBETR.
exit.
endloop.
ENDFORM.
*********************************************************************
FORM FRM_KONDI_WERT_982.
This is custom documentation. For more information, please visit the SAP Help Portal 18
10/15/24, 3:12 PM
xkomv-kbetr = LV_MAX_KBETR.
xkwert = xkomv-kbetr * xkomv-KAWRT / 100000.
ENDFORM.
Materials Configuration
Material Groups
Detraction are based on material groups (e.g. Sugar, Services, etc.), for that maintain the material groups accordingly:
Existing material groups can also be already reused. Furthermore, other material master related information can also be used for detraction determination. Preferably, choose material attributes
present in the SD pricing access tables.
This is custom documentation. For more information, please visit the SAP Help Portal 19
10/15/24, 3:12 PM
Access Sequence
Set up an access sequence based on the material group. For this Table 143 can be reused
Conditions
Detraction is determined in 2 steps, first, all materials have to determine the percentage, and later the highest percentage must be used in the calculation
Determination
This is custom documentation. For more information, please visit the SAP Help Portal 20
10/15/24, 3:12 PM
Create record for the material groups, with the percentage described in the regulation and catalog 54
Presentation
Detraction presentation is always in local currency ("PEN"), so here currency conversion is required.
This is custom documentation. For more information, please visit the SAP Help Portal 21
10/15/24, 3:12 PM
Notice Calculation type is "C" for Quantity
configure the pricing as described here, notice a sample calculation routine is provided to select the maximum percentage.
2- Operation types
This is custom documentation. For more information, please visit the SAP Help Portal 22
10/15/24, 3:12 PM
3- and finally amount mapping table for element PAYTRMV2 selecting the catalog item code appropriate for each material - only in invoices:
3- Configure the Peruvian national bank fix value " PAYEE_FIN_ACC" in AIF (/AIF/CUST → Fix Values for Peru)
reference to LATEST: from reg 193/2020 SUNAT ( effective September 2021) impact OLD: Reg 114/2019 SUNAT (prior as reference)
SAP DRC
UBL
Construct
Level cond Text from to print requirement Calculation Level cond Text from to print requirement
ALLCHRGV1 809 4 EDC3 eDc It Disc 0 0 a 0 0 0 809 4 EDC3 eDc It Disc (sbj to 0 0 a 0
(sbj to
LPRICEV1 972 0 eDc It UnPrc 0 0 a (980- Unit 0 972 0 eDc It UnPrc noHdSur 0 0 a
noHdSur Price) noTax
noTax
LEAMNTV1 973 0 eDc It Amt 908 908 a 0 973 0 eDc It Amt +ItDsc+ItSur 908 908 a
+ItDsc+ItSur noTax
noTax
PRACPR1V1 974 0 eDc It Free Of 920 920 b (free of (980- free 0 49 974 0 eDc It Free Of Charg 920 920 b (free of
Charg charge -> of charge - charge ->
net =0 - > net =0) net =0 -
954) 954)
This is custom documentation. For more information, please visit the SAP Help Portal 23
10/15/24, 3:12 PM
PRACPR1V1 975 0 eDc It 920 920 b (item - 951) (981- value 0 975 0 eDc It 920 920 b (item - 951)
TTLUnPrc+Tax of TTLUnPrc+lSur+lDisc+Tax
condition
for unit)
TXSUBTV1 977 0 EDCE eDc It VAT 0 0 a (tax mutual 0 16 switch 977 0 EDCC eDc It Tax Exempt 0 0 a (tax mutual
Grant 0% exclusion at exclusion at
item level - item level -
TXSUBTV1 978 0 EDCB eDc It VAT 0 0 a 952) 2 5 978 0 EDCE eDc It VAT Grant 0% 0 0 a 952)
Grant
TXSUBTV1 979 0 EDCC eDc It Tax 0 0 a 0 16 979 0 EDCB eDc It VAT Grant 0 0 a
Exempt
TXSUBTV1 980 0 EDCD eDc It VAT 0% 0 0 a 0 16 980 0 EDCD eDc It VAT 0% 0 0 a (tax mutual
exclusion at
TXSUBTV1 981 0 EDCA eDc It VAT 0 0 b 0 16 981 0 EDCA eDc It VAT 0 0 b header level
-953)
TXSUBTV1 982 0 EDCG eDc It VAT 0 0 a 2 5 982 0 EDCG eDc It VAT Export 0% 0 0 a
Export 0%
TXSUBTV1 984 0 EDCI eDc Hd Sum 0 0 A (tax mutual 2 5 switch 984 0 EDCL eDc Hd Sum VAT Exp0% 0 0 A
Free Of C exclusion at
header level
TXSUBTV1 985 0 EDCL eDc Hd Sum 0 0 A -953) 0 16 985 0 EDCI eDc Hd Sum Free Of C 0 0 A
VAT Exp0%
TXSUBTV1 986 0 EDCJ eDc Hd Sum 0 0 A 2 5 986 0 EDCJ eDc Hd Sum VAT Exemp 0 0 A
VAT Exemp
TXSUBTV1 987 0 EDCK eDc Hd Sum 0 0 A 0 16 987 0 EDCK eDc Hd Sum VAT 0% 0 0 A
VAT 0%
TXSUBTV1 988 0 EDCH eDc Hd Sum 0 0 B 0 16 988 0 EDCH eDc Hd Sum VAT 0 0 B
VAT
TXAMNTV1 989 0 eDc Hd Sum 985 988 A (header only 0 0 <-from 989 0 eDc Hd Sum All Tax 984 988 A (header only
Tax noGrant - 950 ) - 950 )
LMTLEAMTV1 990 0 eDc Hd Ttl 100* 100 A 0 0 990 0 eDc Hd Ttl Amt noDisc 100* 100 A
Amt +Disc noTax
noTax
ALLCHRGV1 992 0 eDc Hd Perc 970 970 B 0 0 992 0 eDc Hd Perc Internal Sales 970 970 B
Internal Sales
ALLCHRGV1 993 0 eDc Hd Surch 811* 811 B 0 0 993 0 eDc Hd Surch (sbj to Tax) 811* 811 B
(sbj to Tax)
LMTCTAMTV1 994 0 eDc Hd Ttl Src 992 993 B 0 0 994 0 eDc Hd Ttl Surchages 992 993 B
noTax
LMTATAMTV1 995 0 eDc Hd Ttl Dsc 809* 810 B 0 0 995 0 eDc Hd Ttl Discounts 809* 810 B
noTax
LMTTIAMTV1 996 0 eDc Hd Ttl 989 990 A 0 0 996 0 eDc Hd Ttl Amt + Tax 989 990 A
Amt + Tax
LMTPYAMTV1 997 0 eDc Hd Due 994 996 A 0 0 997 0 eDc Hd Due Amount 994 996 A
Amount
TXAMNTV1 998 0 eDc It Ttl Tax 978 983 a (item -951) 0 0 <-from 998 0 eDc It Ttl Tax 977 983 a (item -951)
noGrant
PAYTRMV2 999 0 J1PE eDc Hd 0 0 B 0 (982- max 4 999 0 J1PE eDc Hd Detraction St 0 0 B 0
Detraction St % and
gross)
* 100 = gross / 811: sample surcharge e.g. Freight / 809-810: sample discounts
Sample statistical conditions and subtotals used in this document (sorted in feasible order)
Notice, if you are already generating invoices in a Peruvian company code, all this information should have been already considered as part of your pricing schema (not necessarily statistical!), so
only minor adjustments to pricing should be required for transparent reporting purposes. Namely, as such, most of these entries and rules must be already in your current pricing procedure, it is
not necessary to create or modify them.
EDC3 Line Item Discount subject to VAT, this is just to demonstrate how a regular discount works (%), use your existing discounts (conditions or subtotals), no need to create more.
J1PD Detraction (determination) – This is a sample condition to determine the Detraction Rate (see blog on detractions) based on material types
J1PF Header Detraction PEN – sample detraction based on local currency documents. Requires calculation routines to locate maximum percentage and reason.
Line Item Amount (including Line Item Surcharges) +Line Item Discount and no Taxes
This is custom documentation. For more information, please visit the SAP Help Portal 24
10/15/24, 3:12 PM
Line Item Free of Charge
Line Item Total Unit Price (item surcharges should be added here) +line items Discounts +Taxes (it is the consumer net amount)
Notice the access sequence to report the taxes must contemplate the Order Reason.
Also, when not required in accounting or legal reporting ,conditions are to be configured as statistical. What is important to consider is that whenever a condition value must be transferred to SAP
Document Compliance, it must be marked as printable (A,B,C,a,b,c) to keep consistency with the rest of the SAP ERP functionality.
Subtotals are not sufficient for taxes reporting as SUNAT reporting requirements include taxable amounts and other elements that are supported with sales conditions, but surcharges and
discount beginning 2021 are supported via pricing subtotals since percentages are not used anymore.
SUNAT considers more decimals than the number defined in the currency for unit price, so it is suggested directly by SUNAT to enlarge the sales units so as to minimize tolerance issues.
Sample Header Sample Item Tax Des. Customer Material Tax Order Sample Condition / Subtotal Catalog ID Item Level Description
Condition Condition Country Tax % Reason name
EDCH EDCA VAT PE Liable for 18% <empty> eDc It VAT / eDc Hd Sum VAT 1000 L6.1 Tax Subtotal for IGV - Sales
(MWST) taxes Operation
EDCI EDCB 18% Grant eDc It VAT Grant / eDc Hd Sum 9996 L6.4 Tax Subtotal for IGV - Grant
Free Of Charge
EDCE 0% eDc It VAT Grant 0% / eDc Hd L9.6 - Tax Subtotal for 0% IGV
Sum Free Of Charge Rate for Grant
EDCG Not PE <any> eDc It VAT Export 0% / eDc Hd L10.2 - Tax Subtotal IGV for
Sum Free Of Charge Export with 0% rate
EDCK EDCD PE <empty> eDc It VAT 0% / eDc Hd Sum VAT 9998 L9.1 - Tax Subtotal for 0% IGV
0% Rate
This is custom documentation. For more information, please visit the SAP Help Portal 25
10/15/24, 3:12 PM
Access Sequence Header Level
(Catalog 7) Reporting
(Catalog 5)
EDCJ EDCC PE Exempt <any> <any> eDc It Tax Exempt / eDc Hd Sum 9997 L8.1 - Tax Exempt
VAT Exempt
This is custom documentation. For more information, please visit the SAP Help Portal 26