You are on page 1of 14

CT-e: Legal Change

Configuration Guide

Date

Modified Chapters

Details

30.04.2014

3.1.3 Configuring
Conhecimento Determination

New subchapters explaining how to


create CONH purchasing condition
and how to assign CONHECIMENTO
internal code to it

22-04-2014

All

General editing

Version

2.2
2

Document Items

15-10-2013
3.1.2 Purchasing Tax Code
Determination

08-02-2012

New chapter explaining restrictions


regarding number of items per
document.
New chapter regarding the use of
condition type NAVS.
First Version.

CT-E CONFIGURATION GUIDE FOR MM AND SD

Table of Content

INTRODUCTION ............................................................................................................................... 3

2
2.1
2.2

ACTIVATION ..................................................................................................................................... 3
Activation of the solution ................................................................................................................ 3
Document Items ............................................................................................................................... 3

3
3.1
3.1.1
3.1.2
3.1.3
3.1.3.1

INCOMING CT-E SCENARIO ........................................................................................................... 3


Basic Configuration ......................................................................................................................... 3
Configuring Tax Code MM ................................................................................................................. 3
Purchasing Tax Code Determination ................................................................................................. 4
Configuring Conhecimento Determination ......................................................................................... 4
Creating Condition CONH in Purchasing Calculation Schema ......................................................... 4

3.1.3.2

Assign Purchasing Condition to Internal Code CONHECIMENTO ................................................... 5

3.2
3.3
3.4
3.5
3.6
3.7

Creating a Purchase Order ............................................................................................................. 5


Creating a Service Entry Sheet ...................................................................................................... 6
Creating an Invoice .......................................................................................................................... 6
Filling in the CT-e Details ................................................................................................................ 6
Tax Group 6: Service Item Level .................................................................................................... 7
ICMS Complement - DIFAL ............................................................................................................. 8

4
4.1
4.1.1
4.2
4.3
4.4

OUTGOING CT-E SCENARIO .......................................................................................................... 9


Basic Configuration ......................................................................................................................... 9
Configuring Tax Code SD .................................................................................................................. 9
Creating a Sales Order .................................................................................................................... 9
Creating a Billing Document........................................................................................................... 9
Ship-from location for SD ............................................................................................................... 9

5
5.1
5.2

ICMS EXEMPT ................................................................................................................................ 10


MM ICMS EXEMPT ......................................................................................................................... 10
SD ICMS EXEMPT .......................................................................................................................... 10

NEW FIELD FOR JURISDICTION CODE ...................................................................................... 10

BRCC ACCESS SEQUENCE MIGRATION ................................................................................... 10

8
8.1
8.2
8.3

CT-E SPECIFIC BADIS ................................................................................................................... 11


CT-e Incoming (MM) ...................................................................................................................... 11
Service Item Selection (MM) ......................................................................................................... 11
CT-e Outgoing (SD) ....................................................................................................................... 12

BAPI ................................................................................................................................................ 12

10
10.1
10.1.1

SCREEN CONTROLS..................................................................................................................... 12
Screen Control for Group Assignment ........................................................................................ 12
Screen Control for Group Assignment ............................................................................................. 12

CT-E CONFIGURATION GUIDE FOR MM AND SD

INTRODUCTION

This guide provides a general overview of Conhecimento Eletrnico (CT-e) implementation and usage.
Section 2 describes how to activate the CT-e solution in the system.
The remaining chapters give examples of usage of the solution.
The execution of the steps of the chapter 2 is mandatory. The execution of the steps of the examples in the
remaining chapters is not mandatory, since there might be variations of the customizing in order to cover
different scenarios.
2

ACTIVATION

2.1

Activation of the solution

The solution is encapsulated in a soft switch handled in the source code.


To activate the logic in the code, and therefore the solution itself, follow the steps as below:
Execute transaction SE16 or SE16N.
Select table J_1BSWITCH.
Create a new row and in the FUNCTIONALITY column enter CTE_2012.

2.2

Document Items

In SAP ERP system, CT-e documents must contain only one item. Processes with more than one item in the
CT-e are not supported.
In Incoming Scenarios, any Purchase Order or Service Entry Sheet created must contain only one
item.
In Outgoing Scenarios, Sales Order documents and Billing documents created for CT-e documents
must contain only one item.
3

INCOMING CT-E SCENARIO

In the system, freight is considered a service and does not require a goods receipt. Therefore, the incoming
CT-e process is based on External Service Management (SRV-MM-BR). For more information see SAP Note
947670, Service Management - Localization for Brazil (overview).
3.1
3.1.1

Basic Configuration
Configuring Tax Code MM

Condition types are available to calculate ICMS on CT-e. They are different from ICMS on freight in nota
fiscal and from ICMS on goods. This also applies to ICMS ST.
Two other conditions have been created to calculate the Complementary ICMS tax (ICMS DIFAL). For more
information, see SAP Note 1792935, CT-e: Incoming Complementary ICMS. As ICMS DIFAL is only relevant
for consumption/asset material transportation, then it is necessary to set the usage of the tax code as
Consumption.

CT-E CONFIGURATION GUIDE FOR MM AND SD

To use these new condition types, it is necessary to create a new Tax Code MM (or customize an existing
one) activating the related condition types, as follows:
Tax

Conditions

ICMS

CIC1 ICMS on Conhecimento


CIC2 ICMS Non-Deductible on Conhecimento
CST1 Sub. Trib. on Conhecimento
CST2 Sub. Trib. Non-Deductible on Conhecimento
CCOP ICMS Conh Complement
CCOX ICMS Conh Compl 100

PIS

Activate the existing condition types

COFINS

Activate the existing condition types

Note: For ICMS, it is not necessary to activate all conditions. Activate only the conditions related to your tax
classification.
3.1.2

Purchasing Tax Code Determination

For PO tax code determination, you can use the NAVS condition technique. For more information, see SAP
Note 501054, FAQ: Taxes in purchasing.
Note: The NAVS condition technique does not work if your pricing procedure has requirement 60 in the
NAVS condition. In this case, you can either remove it or create another pricing procedure depending on
your business needs.

3.1.3

Configuring Conhecimento Determination

Conhecimento determination is used to differentiate a normal service purchase order from a purchase order
intended to be used as a base document for the creation of a CT-e.
In addition to the new condition types, the purchase order for CT-e is also different in other aspects:
For CT-e, the taxes are calculated at Purchase Order item level. For ISS, the taxes can be calculated
at service item level.
The ICMS and ICMS ST rates are different in goods documents than in CT-e. For CT-e, the rate is
indicated in the column ICMS on Freight, if it exists in the Tax Rate Tables. This column is
maintained in the Tax Managers Workplace Brazil (transaction J1BTAX), in Maintain ICMS Values
(table J_1BTXIC1). For others Tax Rate Tables, ICMS Base and ICMS Rate are used.
In a standard nota fiscal (for example, 1A) the freight value is just a part of the Net Amount. For CT-e,
however, the Net Amount represents the freight value itself.
The system determines that a document is a CT-e when the condition type CONH (or another condition type
assigned to the internal code CONHECIMENTO) is found in the purchasing calculation schema.
The condition CONH can be activated in the pricing procedure either manually or via a correspondent
condition record retrieved by an access sequence. An access sequence is not provided to determine CONH
as different customers will have different requirements to determine if a process corresponds to freight.

3.1.3.1

Creating Condition CONH in Purchasing Calculation Schema

The following steps are example. You can adapt them to an existing condition type and purchasing
calculation schema accordingly.
4

CT-E CONFIGURATION GUIDE FOR MM AND SD

The calculation schema configuration is available in the IMG under Materials Management ->
Purchasing -> Conditions -> Define Pricing Determination Process.
1. Create Purchasing condition CONH (in the IMG under Materials Management -> Purchasing ->
Conditions -> Define Pricing Determination Process -> Define Condition Types).
2. Enter Purchasing Calculation Schema definition menu (in the IMG under Materials Management ->
Purchasing -> Conditions -> Define Pricing Determination Process -> Define Calculation Schema).
3. Select schema RM0000 and choose Control Data.
4. Choose the New Entries pushbutton.
5. Enter the information as follows:
Step

Counter

30*

Condition Type

Requirement

CONH

10

* step 30 is an example
ATTENTION: When creating the condition CONH (step 1) is advised to include an access sequence in it.
Otherwise, whenever the associated pricing procedure (i.e. RM0000) is called the Purchase Order is going
to activate CT-e Determination and CT-e taxes calculation.
3.1.3.2

Assigning Purchasing Condition to Internal Code CONHECIMENTO

1. Execute transaction J1BTAX.


2. Enter BR in the Country field.
3. Assign Condition to Internal Code (In the menu, choose Condition Setup -> Condition Mapping ->
Assign Conditions to Internal Codes).
4. Choose the New Entries pushbutton.
5. Enter the information as follows:
Internal Code

Application

CONHECIMENTO

3.2

Condition Type
CONH

Creating a Purchase Order


1. Start the purchase order creation process. In the SAP Easy Access menu, choose Logistics
Materials Management Purchasing Purchase Order Create Vendor/Supplying Plant
Known.
2. In the Vendor field select the company that executes the freight. Enter the Purchasing Organization,
Purchasing Group and Company Code.
3. Enter a Goods Supplier business partner to determine the starting point (Ship-From for tax
determination). To determine the Ship-To location, enter the Tax Jurisdiction Code field in the
Invoice tab.
4. Create a new item with Item Category D Service. The Item Category that you select indicates that
the item of the document is a service.
5. Enter the Short Text, Material Group and other relevant information.
6. Enter information in the Service tab by adding new lines and entering Short Text (or Service Number
from Service Master) and Gross Price.
7. Activate the condition type CONH or another condition assigned to the internal code
CONHECIMENTO. The system can be configured to allow the manual addition of this condition or to
use an access sequence to automatically activate the condition according to the vendor, the order
type or other information available in the PO.
8. In the Invoice tab, ensure that the Service-Based Invoice Verification checkbox is not selected. If
selected, it generates one line for each service item. In the same tab, enter a Tax Code with CT-e

CT-E CONFIGURATION GUIDE FOR MM AND SD

conditions (CIC1, CIC2, CST1, and so on) and choose the Taxes pushbutton to verify the calculated
taxes.
9. Save the purchase order.
3.3

Creating a Service Entry Sheet

Service Entry Sheet creation does not require any specific procedures other than the standard process.
However, it is necessary to perform invoice verification.
1. Start the Service Entry Sheet creation process. (In the SAP menu, choose Logistics Sales &
Distribution Bill of Services Service Entry Sheet Create.)
2. Enter the required information and save the document.
3.4

Creating an Invoice

Create an invoice referring to the purchase order created above.


As of SAP Note 1766209 (CT-e: new CT-e Tax Calculation determination for Incoming), tax calculation does
not take NF Type into consideration when executing an invoice, only condition CONH, as described in
section 3.1.3, Configuring Conhecimento Determination.
3.5

Filling in the CT-e Details


1. To open the CT-e, execute transaction J1B2N, or execute transaction MIRO and choose the Nota
Fiscal pushbutton.
If the nota fiscal document has attribute model 57, the CT-e tab is displayed. This contains the
specific information for CT-e such as references and resources (as shown below).

CT-E CONFIGURATION GUIDE FOR MM AND SD

3.6

Tax Group 6: Service Item Level

The tax group 6 (available in SAP Note 1714749, CT-e LC: Extension of Tax Calculation Features) was
created especially for CT-e. This tax group makes use of dynamic exception tax table (J_1BTXIC3) and uses
Service Item Level as the key for retrieving tax data (for example, rate and base).

CT-E CONFIGURATION GUIDE FOR MM AND SD

For tax calculation purposes, if there is more than one service item in the purchase order, the item with the
higher net value is used for retrieving tax data.
That is, the selected service determines the condition records to be retrieved.

In the example above, the second service is used for this purpose.
This selection can be overridden using the BAdI J_1BCTE_SELECT_SRVPOS. For more information, see
section 8.2, Service Item Selection (MM).
3.7

ICMS Complement - DIFAL

When carrying out a consumption/asset material transportation, if the intrastate ICMS Tax is greater than the
interstate Tax, it is necessary to collect the difference between them, that is, the ICMS complement.
For example, if a transport from state RS to state SP has 5% of ICMS and the intrastate tax for SP is 12%, it
is necessary to evaluate the difference between the taxes.

In the standard pricing procedure, the DIFAL base amount is stored in condition type BX30 and the tax
amount is stored in condition type BX31.
In the CT-e document, tax type CCOP highlights the calculated DIFAL tax value. The CCOX condition type
(in the pricing procedure) stores the offset (minus CCOP) so that this value is not added in the total taxes of
the nota fiscal.
8

CT-E CONFIGURATION GUIDE FOR MM AND SD

OUTGOING CT-E SCENARIO

In general, the outgoing CT-e process follows the steps of a normal sales process, that is, the creation of a
Sales Order, the creation of a Billing Document and the correspondent CT-e document.
4.1

Basic Configuration
1. Create a material for freight service with Material Type DIEN Service.
2. Create a new sales order type (or use an existing one) and assign it to a nota fiscal type with model
57.

4.1.1

Configuring Tax Code SD

1. Create a new Tax Code SD (or use an existing one).


2. Activate the options Calculate ICMS (or Calculate Sub. Trib.), Calculate PIS and Calculate COFINS,
depending on the tributary classification of the freight.
3. In order to calculate freight taxes in SD, set the customer usage to Industrialization.
4.2

Creating a Sales Order


1. Create a new sales order using the sales order type assigned to a CT-e nota fiscal type.
2. Enter the Sold-To Party, Ship-To Party and the PO Number.
3. Add a new line for a material that will represent the freight service. Enter Quantity, Plant and Amount.
Inform a Tax Code, CFOP and texts for the related taxes in the Country tab.
4. In the Item Condition tab, activate the condition type CONH or another condition assigned to the
internal code CONHECIMENTO.

4.3

Creating a Billing Document

As freight is a service, Outbound Delivery is not necessary.


1. Create a Billing Document using the Sales Order number as a reference and save it.
2. Execute transaction J1B3N to display the created CT-e.
4.4

Ship-from location for SD

The determination of the ship-from location for outgoing CT-e was extended.
To determine the ship-from it is necessary to customize the Map CT-e Partner to NF Partner Function
(J_1BCTE_PAR_MAPV) view.
The Partner Function assigned to the 0 Goods Sender CT-e Partner will determine the ship-from. For
example, when the RE Bill-to Party is mapped, the Bill-to Party business partner address of the Sales
Order is the ship-from.
Item

Description

Ship-From

Address of Business Partner mapped as Goods Sender in the view

Ship-To

Address of WE Ship-to Party business partner (no mapping)


9

CT-E CONFIGURATION GUIDE FOR MM AND SD

This ship-from location affects tax rates, CFOP determination and the determination of new fields for
Jurisdiction Code in CT-e.

ICMS EXEMPT

In some Brazilian processes the ICMS is exempt, and therefore it should not be charged.
Usually it is the source and end locations of the service and the product being transported that determines
the ICMS exemption, for example:
- PLS 274/04 for law 87/96 - Exemption of ICMS for transportation of paper for book or newspapers in
all states in Brazil.
- ICMS Law at RS 38/2012 - Exemption of ICMS for transportation of vehicles for disabled people - law
specific for Rio Grande do Sul.
Even without the calculation of ICMS, the ICMS base value should be visible in the CT-e and the ICMS
should be reported in legal reports. The ICMS base for ICMS Exempt must be calculated and displayed as
excluded base. The law that makes the ICMS exempt must be printed in the CT-e.
5.1

MM ICMS EXEMPT

In the system, MM scenarios with the ICMS exempt are done by the use of a proper tax code. There are
other customizations that also have to be carried out to report the ICMS exempt correctly.
Create a new Tax Code (or use an existent one) making sure that the option ICMS-ex. is marked.
A tax type for exempt must be active. In order to move the base values to the CT-e document, the tax
type for exempt must have Ex. Base Cond. and Other Base Con. filled with the proper conditions.
With this customizing the condition record that identifies the ICMS exempt is generated. In SAP default
customizing this condition is BICX, related to the internal code ICMSNULLEXEMPT - application TX.

5.2

SD ICMS EXEMPT

For SD, the tax code should have Industrialization as Customer usage and ICM-exempt must be checked.
The Tax Type use must have its Ex. Base Cond correctly filled.
With this customizing the condition record that identifies the ICMS exempt is generated. In SAP default
customizing this condition is BICX, related to the internal code ICMSNULLEXEMPT - application V.
6

NEW FIELD FOR JURISDICTION CODE

News fields for Origin Jurisdiction Code (J_1BNFDOC-CTE_STRT_LCT) and Final Jurisdiction Code
(J_1BNFDOC-CTE_END_LCT) were created to support the CT-e.
These new fields are automatically filled according to the ship-from and to the ship-to defined in the
Purchase Order or in the Sales Order.
In the CT-e tab of the CT-e/NF-e Writer whenever a Jurisdiction Code is informed the name of the city is
presented beside the field.
7

BRCC ACCESS SEQUENCE MIGRATION

The access sequence BRCC was created especially for ICMS Conhecimento (released via Note 1714749)
taxes.
As standard, the related internal codes for ICMS Base and Rate are customized using this access sequence.
10

CT-E CONFIGURATION GUIDE FOR MM AND SD

Please, notice that no tax group (tax group assigned to internal code of tax conditions) should be customized
for Conhecimento ICMS base and rate internal codes.

Because of this, customer tax groups (Tax Group for Dynamic Tax Exceptions, between 10 and 89) will
never be inserted in BRCC when executing a migration.
If needed, instead of using migration tool, the customer tax groups should be customized manually in access
sequence BRCC via view VV_T682_TX.
ATTENTION: If a tax group (tax group assigned to internal code of tax conditions) is customized for
Conhecimento ICMS Base and Rate internal codes, you could then use the migration tool. Then all access
sequences assigned to conditions (and those assigned to internal codes CONH_ICMS_BASE and
CONH_ICMS_RATE) will be updated. However this may work for migration, SAP standard functionality does
not support collateral effects of this procedure (e.g. fiscal books, several entries for unwanted conditions
migrated).
8
8.1

CT-E SPECIFIC BADIS


CT-e Incoming (MM)

The BAdI (J_1BCTE_IV) was created to fill data regarding incoming CT-e. It is called during invoice
verification when the CT-e document is generated.
This BAdI imports the data from the Purchase Order and exports the new CT-e data to be stored in the
database.
This BAdI is available in the IMG under Cross-Application Components -> General Application Functions ->
Nota fiscal -> Electronic Fiscal Documents -> CT-e Specifics -> Incoming CTe -> Business Add-Ins -> BAdI:
Fill CT-e Data During Invoice Verification.
8.2

Service Item Selection (MM)

The BAdI J_1BCTE_SELECT_SRVPOS was created (available via SAP Note 1714749, CT-e LC: Extension
of Tax Calculation Features) to be used for overwrite the selection of the default service to be used as key to
search the exception in Tax Group 6 (Dynamic Exceptions table) when executing a purchasing process.
This BAdI is available in the IMG under Cross-Application Components -> General Application Functions ->
Nota fiscal -> Electronic Fiscal Documents -> CT-e Specifics -> Incoming CTe -> Business Add-Ins -> BAdI:
Select Service Master Used in Dynamic Exceptions.

11

CT-E CONFIGURATION GUIDE FOR MM AND SD

8.3

CT-e Outgoing (SD)

The BAdI J_1BCTE_SD (available via SAP Note 1761307, BAdI for import Outgoing CT-e Data) was created
to fill data regarding outgoing CT-e and is called during the billing when the CT-e document is generated.
The BAdI imports the data from the Billing and exports the new CT-e data to be stored in the database.
This BAdI is available in the IMG under Cross-Application Components -> General Application Functions ->
Nota fiscal -> Electronic Fiscal Documents -> CT-e Specifics -> Outgoing CTe -> Business Add-Ins -> BAdI:
Import Outgoing CT-e Data.
9

BAPI

The Business Application Programming Interface (BAPI) BAPI_CTE_J_1B_NF_CREATFROMDATA was


created (available via SAP Note 1714749, CT-e LC: Extension of Tax Calculation Features) to be used as an
interface to generate a CT-e in the system.
10

SCREEN CONTROLS

It is necessary to assign NF Types to the screen controls for handling CT-e incoming and outgoing
documents.
Attention: The NF Types <CO> and <C1> mentioned below are not delivered. You should use your own NF
Types for incoming and outgoing as described in the following section.
10.1 Screen Control for Group Assignment
The following steps are examples. You should adapt them to your existing NF Types accordingly.
1. Execute transaction SM30.
2. Enter J_1BALV in the Table/View field.
3. Choose the Maintain pushbutton.
4. Choose the New Entries pushbutton.
5. Enter the information as follows:
Mode

Scr.cnt.rf

Screen control reference


description

Conhecimento outgoing

Change

28

<CO>

Conhecimento outgoing

Create

24

Change application generated CT-e (via


MM-IV)
Create Outgoing CT-e manualy

<CO>

Conhecimento outgoing

Display

21

Display application generated CT-e

<CO>

Conhecimento outgoing

Change

29

Change manually entered CT-e

<CO>

Conhecimento outgoing

Create

24

Create outgoing CT-e manually

<CO>

Conhecimento outgoing

Display

22

Display manually entered CT-e

NF Type

Description

<CO>

Manual

6. Save the changes.


10.1.1 Screen Control for Group Assignment
1. Execute transaction SM30.
1

Screen Control Group created in SAP Note 1714749


12

CT-E CONFIGURATION GUIDE FOR MM AND SD

2. Enter J_1BALV in the field Table/View.


3. Choose the Maintain pushbutton.
4. Choose the New Entries pushbutton.
5. Enter the information as follows:
Manual
NF Type
Description

Mode

Scr.cnt.rf

Screen control reference


description

<C1>

Conhecimento Incoming

Change

28

<C1>

Conhecimento Incoming

Create

23

<C1>

Conhecimento Incoming

Display

21

Change application generated CT-e (via


MM-IV)
Create application generated CT-e (via
MM-IV)
Display application generated CT-e

<C1>

Conhecimento Incoming

Change

29

Change manually entered CT-e

<C1>

Conhecimento Incoming

Create

25

Create incoming CT-e manually

<C1>

Conhecimento Incoming

Display

22

Display manually entered CT-e

6. Save the changes.

13

CT-E CONFIGURATION GUIDE FOR MM AND SD

2011 SAP AG. All rights reserved.


SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign,
SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other
SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG
in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects,
Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP
company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL
Anywhere, and other Sybase products and services mentioned herein
as well as their respective logos are trademarks or registered
trademarks of Sybase, Inc. Sybase is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials
are provided by SAP AG and its affiliated companies ("SAP Group")
for informational purposes only, without representation or warranty of
any kind, and SAP Group shall not be liable for errors or omissions
with respect to the materials. The only warranties for SAP Group
products and services are those that are set forth in the express
warranty statements accompanying such products and services, if
any. Nothing herein should be construed as constituting an additional
warranty.

14