You are on page 1of 18

Configuring CFOP on SAP

Posted on June 30, 2013by leandropia

Now that you know what does CFOP means and what is used for, it is time to know
how to configure the CFOP on SAP in 5 steps:

1 – Define CFOP Version

The first activity necessary is “DEFINE CFOP VERSIONS” and you can do that either
maintaining the table/view J_1BCFOPVERV or via IMG path “Cross-Application
Components > General Application Functions > Nota fiscal > CFOP Codes > Define
CFOP Versions”.

Now a days it is not necessary to maintain the old CFOP length version anymore,
then, enter the following data:

 Version: 1
 Description for CFOP Version: NEW CFOP 4 DIGITS
 Redeterm.: Considering your SAP installation is new, you don’t have the old
CFOP format (replaced in 2003), then, it is not necessary to activate this check.
 CFOP Lngth: 4 CFOP Length
 Ext. Lngth: 0 No Extention
 Text ID: AA (or anything such as: A, 01, etc)

2 – Assign validity date to CFOP Versions

Once you have created the CFOP version, it is time to assign the validity date to the
version created. Here you can also assign a version to a region (state) if required.

Follow the path “IMG > Cross-Application Components > General Application
Functions > Nota fiscal > CFOP Codes > Assign Validity Date to CFOP Versions” or
use the SM30 to maintain the table/view J_1BCFOP_XREGNV.

Type Valid-From, Country, Version.


3 – Define CFOP Codes and Assign Version

You can maintain the view J_1BAGNV or follow the customizing path: IMG > Cross-
Application Components > General Application Functions > Nota fiscal > CFOP
Codes > Define CFOP Codes and Assign Version

The CFOP codes and respective descriptions are part of a legal system to define the
exactly operation for every goods movement going from or coming to the plant or
company in Brazil.

You should ask for a full list of CFOP codes and description to the company Taxes and
Fiscal department. You may want to ask me adding a comment here and I will
forward it to you.

Check a sample below:


4 – Define CFOP Determination for Goods Receipts and returns

In this activity, you define the entries in the CFOP determination table for incoming
movements (goods receipts) and their returns. The system uses these entries in the
Materials Management components Logistics Invoice Verification and Inventory
Management. The rules from this table will define automatically the correct CFOP for
that specific operation during the goods incoming.
You can use the view J_1BAONV or the path IMG > Cross-Application Components >
General Application Functions > Nota fiscal > CFOP Codes > Define CFOP
Determination for Goods Receipts and Returns (Versioned)

See below an example:

5 – Define CFOP Determination for Goods Issue and returns

You define the entries in the CFOP determination table for outgoing movements
(goods issues) and their returns. The system uses these entries in Sales and
Distribution and Materials Management – Inventory Management. The rules from
this table will define automatically the correct CFOP for that specific operation during
the goods incoming.

You can do it maintain the view J_1BAPNV or via customizing menu: IMG > Cross-
Application Components > General Application Functions > Nota fiscal > CFOP
Codes > Define CFOP Determination for Goods Issues and Returns (Versioned)

See an example below:


You can find more details about CFOP checking SAP OSS Note 571848.

CFOP Automatic Determination


Posted on July 7, 2013by leandropia

Now that you know what a CFOP stands for, it is time to understand how CFOP get
automatically assigns to an Incoming or Outgoing Nota Fiscal.

CFOP Automatic Determination


Parameters
The following parameters are relevant for CFOP determination:

1) Direction of the Movement

 1 – Incoming (same state)


 2 – Incoming (different state)
 3 – Incoming (different Country)
 5 – Outgoing (same state)
 6 – Outgoing (different state)
 7 – Outgoing (different country)

2) Material Usage (assigned at the Material Master Records)


 0 – Resale
 1 – Industrialization
 2 – Consumption
 3 – Fixed Asset

3) Material CFOP Category (assigned at the Material Master Records)

 0 – Material (goods)
 1 – Electricity
 2 – Communication
 3 – Transportation
 4 – Animals

4) Nota Fiscal Item Type (assigned at J_1BSDICA, NF Integration Into IM, NF Type,
LIV NF assignment)

 01 – Standard Item
 02 – Stock Transfer Item
 21 – Returnable Packaging Shipment Item
 31 – Subcontracting Invoicing Item
 32 – Subcontracting Component Shipment Item
 33 – Subcontracting Component Symbolic Shipment Item
 41 – Future delivery invoice item without ICMS
 42 – Future delivery invoice item with IPI
 43 – Future delivery invoice item without ICMS/IPI
 44 – Future delivery invoice item with ICMS/IPI
 51 – Consignment invoice item
 52 – Consignment shipment item
 61 – Third party invoice item from vendor
 62 – Third party invoice item from supplier
 63 – Third party shipment item from supplier
 64 – Third party future delivery invoice item from supplier
 65 – Third party future delivery symbolic shipment item from supplier

5) Produced In House Indicator (assigned at the Material Master Records)

 x – Produced in-house / Manufactured at the plant


 – non manufactured at the plant
6) Customer CFOP Category (only for SD)

 0 Industry (cooperative)
 1 electric co.
 2 communication co.
 3 transport co.
 4 service co.
 5 consumer industry (cooperative)
 6 non-contributing customer
 7 agricultural customer
 8 trading company
 9 producer establishment

7) NF Special Case for CFOP Determination

 - CFOP Determination Without Substituicao Tributaria


 1 – CFOP Determination with Substituicao Tributaria
 2 – CFOP for Services That Are Subject to ISS Tax

NF Item Types
Even with all these possible standard delivered parameters for combinations, it is not
enough to cover all possible scenarios in Brazil, then it is necessary add new entries to
the existing parameters such as: Nota Fiscal Item Types, Material CFOP Category and
etc.

Here I will explain you how to use the NF Item type to help you getting the CFOP
code automatically determined at the Incoming and Outgoing Nota Fiscal

The Nota Fiscal Item type is assigned at:

1 – SD Item Category table (J_1BSDICA)

2 – MM-IV Nota Fiscal Relevance (J_1BIM02V)

3 – NF Type

4 – LIV NF assignment
Once your process finds the NF Item Type assignment in one of these 4 possible
places, you will be able to add a CFOP combination containing all the parameters
above, including the NF Item Type.

1 – SD Item Category table (J_1BSDICA) – This table is used to assign an item type
and a main partner function (for example, ship-to party) to a combination of sales
order type, item category including the NF Item Type. You can also assign SD tax
codes and specify whether the system is to calculate statistically the ICMS and IPI
taxes.

2 – MM-IV Nota Fiscal Relevance (J_1BIM02V)

Here it is possible to assign to each MM-IV movement type if it is relevant for Nota
Fiscal, the Nota Fiscal type and also the Nota Fiscal Item Type.
3 – NF Type
4 – Logistics Invoice Verification

Here the values from the Nota Fiscal item types are maintained depending on the
item category of the purchase order
Once the NF Item type is assigned to your process as above, if a combination exists
for tables J_1BAPN or J_1BAON, the CFOP code will automatically be assigned to
your process:
On the next posting you will see how to create new NF Item Types…
Creating Nota Fiscal Item Types
Posted on July 7, 2013by leandropia

The Nota Fiscal Item Type is used as one of the parameters to get automatically the
correct CFOP for each nota fiscal.

The CFOP (Código Fiscal de Operação) means the operation that is represented by
the Nota Fiscal Document, example: Regular Sales, Sales to Free Trade Zone, Free
Sample, Freight Invoice, and etc.

To know more about CFOP, check the post: CFOP – Código Fiscal de Operação e
Prestação

SAP delivers only few NF Item Types and as there are more than 300 CFOP for
incoming and outgoing nota fiscal, sometimes it is necessary create a new nota fiscal
item type to allow determine the correct CFOP automatically.

To create a new Nota Fiscal Item Type, follow the steps below:

1 – Create the NF Item Type


Create the new NF Item Type via SM30 to the table J_1BITEMTYPES

Here you define the Nota Fiscal Item Type, it can be used alphanumeric with 1 or 2
digits.
You also need to enter a description that identifies the NF Item type / usage purpose.

2 – Create the NF Item Type rules


You can maintain via SM30 the table J_1BNFITEMTYPES or follow the customizing
path: SPRO à Cross-Application Components à General Application Functions à Nota
fiscal à Define Nota Fiscal Item Types

You can copy a similar NF Item Type as reference or enter manually the rules for the
new NF Item type.

You must type the same NF Item type code that you created previously as explained
on the step 1, maintaining the J_1BNFITEMTYPES table.

J_1BNFITMRULEV
The steps above completes the NF Item Type creation. You will have to assign the
new NT Item type to the tables J_1BAONV or J_1BAPNV tables and create the rules
to get the CFOP automatically assigned.

How to find the missing CFOP rule entry?


Posted on July 9, 2013by leandropia

Sometimes when you are creating a sales order, or posting invoice verification,
creating a nota fiscal, you get the error that says: 8B115 It is not possible to determine
the CFOP automatically or 8B569 CFOP not found for XYZ in sales order XYZ and
etc;

This will happen when it is missing the correct assignments at the following tables:

 J_1BAON – CFOP for Incoming and returns of Incoming


 J_1BAPN – CFOP for Outgoings and returns of Outgoings
If you still can’t figure out what is the missing entry, you can put a breakpoint to the
following functions according to the direction (Incoming/Outgoing).

1 – For Outgoing and Returns of Outgoing

 1 – Go to Transaction SE37
 2 – Enter Function J_1B_NF_CFOP_2_DETERMINATION

* The concept with generic read was abandoned. Only the exact version

* is used!

* do 2 times.

***** select with all parameters

READ TABLE it_bapn INTO wbapn WITH KEY

direct = cfop_parameters-direct

dstcat = cfop_parameters-dstcat

indus3 = cfop_parameters-indus3

itmtyp = cfop_parameters-itmtyp

spcsto = cfop_parameters-spcsto

ownpro = cfop_parameters-ownpro

matuse = cfop_parameters-matuse

indus1 = cfop_parameters-indus1

origin = space

version = i_version.

Add a breakpoint at “READ TABLE it_bapn INTO wbapn WITH KEY”

Then check the values on the structure cfop_parameters for the following fields:

 direct
 dstcat
 indus3
 itmtyp
 spcsto
 ownpro
 matuse
 indus1
 i_version

The results are the values that must be added to J_1BAPN.

2 – For Incoming and Returns of Incoming

 1 – Go to Transaction SE37
 2 – Enter Function J_1B_NF_CFOP_1_DETERMINATION

*——————————————————-

*—> Read CFOP with version of the region

*——————————————————-

*— access with all key fields

PERFORM read_cfop USING cfop_parameters-direct

cfop_parameters-dstcat

cfop_parameters-indus3
cfop_parameters-itmtyp

cfop_parameters-spcsto

cfop_parameters-matuse

cfop_parameters-indus2

lv_version

CHANGING cfop.

Add a breakpoint at “PERFORM read_cfop USING cfop_parameters-direct”

Then, check the values on the structure cfop_parameters for the following fields:

 direct
 dstcat
 indus3
 itmtyp
 spcsto
 matuse
 indus2

The results are the values that must be added to J_1BAON.

You might also like