18
How to implement Nfe (GRC PI). This document considers some requisites and needed configurations to let the GRC, ECC and PI/XI systems configured to work correctly in Nfe sceneries. Project Requirements // Infra-structure 1. Provide the servers with SAP NetWeaver / GRC NFE installed (including internal security requirements already applied). We recommend the installations of SAP Netweaver 2004s SR3 (this installation should include SAP PI and may have SAP Portal for the future). Below, some requirements: Abap Environment: Component version a. SAP_ABA 0014 b. SAP_BASIS 0014 c. PI_BASIS 0014 d. SAP_BW 0016 Java Environment: Service package 14 System landscape directory: Model Version (sld/active): 1.5.32 SAP CR Content Version (sld/active): SAP_CR 4.0 (produced 04/24/2008) or newer version The GRC NFE can be installed as an additional client in the same SAP ABAP instance as SAP PI. 2. Provide landscape detail, including SAP R/3, SAP PI, SAP Portal, number of users for each application, SAP Web Dispatcher, etc 3. Proxy users creation for the project team (Internet external access);

How to Implement GRC, PI and ECC to NFE

Embed Size (px)

DESCRIPTION

How to Implement GRC, PI and ECC to NFE

Citation preview

Page 1: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

This document considers some requisites and needed configurations to let the GRC, ECC and PI/XI systems configured to work correctly in Nfe sceneries.

Project Requirements

// Infra-structure

1. Provide the servers with SAP NetWeaver / GRC NFE installed (including internal security requirements already applied). We recommend the installations of SAP Netweaver 2004s SR3 (this installation should include SAP PI and may have SAP Portal for the future). Below, some requirements:

Abap Environment:Component versiona. SAP_ABA 0014b. SAP_BASIS 0014 c. PI_BASIS 0014d. SAP_BW 0016

Java Environment:Service package 14

System landscape directory:Model Version (sld/active): 1.5.32

SAP CR Content Version (sld/active):SAP_CR 4.0 (produced 04/24/2008) or newer version

The GRC NFE can be installed as an additional client in the same SAP ABAP instance as SAP PI.

2. Provide landscape detail, including SAP R/3, SAP PI, SAP Portal, number of users for each application, SAP Web Dispatcher, etc

3. Proxy users creation for the project team (Internet external access);4. Proxy user creation for external access to SAP PI. This user is used for Secretarias de

Fazenda (SEFAZ) communication and its password must never expire, otherwise, the communication with will be compromised.

5. What is the planned DEV/QA environment structure? There will be more than one environment or a single one? If the company has opted to use SAP portal, it will be installed on the same server or another?

Page 2: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

// Fiscal

Digital Certificate1. Partner definition for digital certificate acquisition;2. List of root CNPJs that will be used for printing notas fiscais;3. Prepare documentation for the company’s acquisition of digital certificate (for

example, in the CertiSign case):a. Commercial register, in the individual company case;b. Constitutive act, statute or contract in force, properly registered, in the case of

commercial companies or civil, and, in the case of companies limited by shares, together with documents of election of its directors;

c. Proof of registration in the Cadastro Nacional de Pessoas Jurídicas (CNPJ);d. Proof of registration in the Cadastro Específico do INSS (CEI), if applicable.

4. The requisition of the item 3 is made by a person legally responsible for the company, which generally must submit the following documents:

a. Photo 3x4 recent;b. Identity card or Passport, if foreigner;c. Cadastro de Pessoa Física - CPF;d. Proof of residence;e. Número de Identificação Social-NIS (Cadastro do Programa de Integração

Social-PIS, Cadastro do Programa de Formação do Patrimônio do Servidor Público-PASEP or Cadastro de Contribuintes Individuais do INSS-CI), se aplicável;

f. Cadastro Específico do INSS-CEI, if applicable;g. Título de eleitor, if applicable;

5. Agenda of the company’s legal responsibility as the person responsible for digital certificate for signing of terms of ownership and responsibility. This terms guarantee that the company is itself. The legal responsible should be legal in the contract of the company.

States1. Validate any peculiarities on issuing the notas fiscais (for example, addition of any

additional stamp for the note, printing more than one copy of the DANF-e, etc.);2. Understand special arrangements (regimes especiais) that the company has today

within the states;3. Validate the states where the company printing nota fiscal (RJ, ES, MG);4. Request the registration of the companies to begin the printing the nota fiscal in

jul/2009. Please include the full CNPJ’s.

// Currency Paper ( Papel-Moeda ) 1. Definition of the suppliers who could assist the company in the acquisition of this

papers;2. According to the model the DANF-e (landscape or portrait), set quantities to be

purchased by company. Different definitions company could impact these acquisitions;3. Validation of place of printing of tax stamps and numbering of the currency paper to

close the programming of SmartForms within the SAP (agreements with graphics, too, if necessary)

Page 3: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

Technical Requirements1. Creation of users to customize the environment of SAP DEV (may be interesting to

providing assistance for DEBUG rights of the tests when the project). We believe that it will require the provision of 5 users SAP (with the right to be 2 developer);

2. Creation of user within the development environment SAP for integration with GRC NFE (user system / communication). We suggest that this user has initially SAP ALL role, if necessary we can try to narrow its rights along the project (this task should be supported by a basis professional from the customer).

3. Planning for the creation of users for other environments (QAS and PROD) and the rights available in each environment.

4. Internal policies for creating requests and transport of objects between environments.

DANF-e1. Validation and deployment of internal programs for printing notes tax (programs

SAPScript);2. Definition of use of the model portrait or landscape for companies of the group

(portrait model favors the print of more items and possibly more additional lines in the texts, while the landscape design allows greater spacing for the columns, especially if the notes contain high values);

3. Validation of additional information in the printing moment;4. Printing of additional elements in the tax notes as invoice banks, certificates of quality

and others.

SAP Notes1. List of notes that must be implemented within the SAP environment for

communication with the GRC NFE (listed in this document);2. Validation of internal mechanisms for implementation of Notes (Snot, manual, etc.);3. Validation of internal procedure for setting up key elements of the marketplace within

the SAP (the application of certain notes can request new keys to development).

// NF-e Authorization

New authorization object that has to be associated to our users:

User Action                                                                                                                                               Auth. Object       Activity Request an authorization to cancel an authorized NF-e F_NFBA 85 [reverse])Request an authorization to cancel a rejected NF-e F_NFBA 85 [output])Set Contingency per Region or per Business Place F_NFBA 85 [reverse])Delete NF-e log entries F_NFBA 35 [output])Send NF-e with SCS ' ' (not sent) F_NFBA 35 [output])Set Contingency per NF-e F_NFBA 35 [output])Reset Contingency per NF-e F_NFBA 35 [output])Check XI connection no checkCheck NF-e log no checkDisplay NF-e in NF writer no check

Page 4: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

 

Project Configuration

1) SAP NLL-NFe product has to be registered in SLD.(BASIS Team)

Done!

Before the configuration of the NFE XI Content can be executed in the Integration Directory (as indicated in the RKT), some tasks need to be performed in the SLD.As indicated above, there are two application components for the GRC NFE internal components: 1 for the Java component, 1 for the Core component (ABAP Add-on). Hence, two Business Systems (1 of type WAS Java and 1 of type WAS ABAP) are necessary in SLD, to represent these components.Also, in order to properly configure all the scenarios (with the relevant routing conditions), it is necessary to add the NFE Product & Software Components versions to the Technical/Business Systems. You find these in the Software Catalog of SLD. The association should be as shown below.

Page 5: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

The SAP Nota Fiscal Electronica 1.0 Product Version and the nested Software Component Versions are included in SAP Component Repository Content (SAP CR Content) starting on version 3.10. To check the current SLD CR Content version, in SLD home page, go to: Administration -> Details -> Data tab, and check the SAP CR Content Version value.As of SLL-NFE SP02, the NFe Schema Validation was released. This validation makes sure that no wrongly formatted data is included in the NFe XML messages. In order to activate the validation for a configured branch, just mark the "Validation" flag in the Configure System Response for Each Tax Number (CNPJ) customizing view for NFE, in SAP IMG (transaction code SPRO), as shown below.

If an NFe sent from backend is invalidated, an automatic message is sent back to the ERP with a rejection status, so that the necessary corrective measures are taken, and the further processing steps (digital signature, batch association etc.) are not executed. In order to check the validation log (with the invalidated fields), click on the "Log Display" button of the NF-e Details screen, as shown below. A popup with the validation log will be open.

Page 6: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

 

2) Communication User Details (BASIS TEAM).As of SLL-NFE SP03, two new user roles were released in order to make it easier to configure the communication between the several components of the NF-e data exchange process. These user roles can also be created through manual steps, following the recomendations of SAP Note 1223469.

On a simplified view, the communication process is as follows:

Page 7: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

Each communication step is described below.I - RFC Communication between ERP & GRC NFEa) Communication from ERP to GRC NFEIn ERP, it is necessary to create a RFC Destination of type 3 (R/3), in order to send the NF-es to GRC NFE. In this RFC Destination, define a service user from the GRC NFE system which contains the /XNFE/RFCSERV role.

A dialog user can be used temporarily for debugging & testing purposes, but should be avoided for productive scenarios.

b) Communication from GRC NFE to ERPIn GRC NFE, it is also necessary to create a RFC Destination of type 3. This RFC Destination must be defined with a service user from the ERP system with the necessary authorizations for the ERP processes (at least, the S_RFC & F_NFBA authorization objects are necessary).

A dialog user can be used temporarily for debugging & testing purposes, but should be avoided for productive scenarios.

There is also the necessity to associate this RFC Destination with the ERP Logical System Name (as described in the RKT), in BD97 transaction (if necessary, create the ERP Logical System Name in the GRC NFE system through BD54 transaction).II - Proxy Communication between ERP & GRC NFEa) Communication from GRC NFE to XIIn order for GRC NFE to communicate with XI, it is necessary to maintain a HTTP Destination (RFC Destination of type H) in the GRC NFE system, pointing to the XI system. It needs to have the path prefix as /sap/xi/engine?type=entry.

This HTTP Destination should use the PIAPPLUSER in order to log on PI.

b) Communication from XI to GRC NFE (André Ramalho – PI/XI Consultant)In order for XI to return the response messages to the GRC NFE system, it is necessary to create a HTTP Destination in the XI system pointing to the GRC NFE system, with the same path prefix as above. As for the user, create a service user with the /XNFE/PRXYSERV role.In the Integration Directory, in the Receiver XI Communication Channel pointing to the GRC NFE system, use this HTTP Destination, as shown below:

Page 8: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

III - SOAP Communication between XI & Digital Signer (BASIS Team)Create an user with at least the SAP_J2EE_GUEST role needs to be used.The Digital Signer Web Service address is always in the following format: http://<server>:<port>/DigitalSignature/ws?style=document Important information where <server> and <port> are relative to the J2EE Engine where the Digital Signer was deployed. IV - SOAP Communication between XI & Government SystemsThe authentication for the communication from XI to the Government Systems is done through the use of digital certificates, as described in the RKT, so no user details are needed.

3) Notes to be implemented on ECC and GRC systems (Responsible are described in attached document).

4) Deploy SLL-NFE-JWS (BASIS Team).

For the deploy of the Java component of SAP GRC NFE (SLL-NFE-JWS), please check the SAP GRC NFE 1.0 Master Guide (http://service.sap.com/instguides -> G -> SAP GRC Nota Fiscal Electronica -> Using SAP NFE 1.0);

Page 9: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

5) Import XI Content to Integration Repository (André Ramalho – PI/XI Consultant).

6) Implement Support Packages (BASIS Team).

These are the sup. Packages to be installed.

7) Configure SPRO transaction with the CNPJ /SEFAZ/Status Code ( SD team) and in transaction SNUM, configure /XNFE/BAID range number( BASIS Team).

This document will explain peer-to-peer how to implement the 7th process.

8) Grc Monitor (BASIS Team).

In transaction PFCG adjust the role /XNFE/USERMENU with server and portIn transaction SICF, activate Items:

default_host/sap/bc/webdynpro/xnfe, /sap/public/bc (ur, icons, icons_rtl, pictograms, webdynpro e webicons), /sap/public/myssocntl e /sap/xi (adapter_plain, cache, cache_ssl e engine).

9) Create HTTP destination connection in ABAP System, PI Integration Server(INTEGRATION_SERVER_PIP)

Page 10: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

and to PI Application System(BASIS Team).

10) Access transaction bd54 to add Logical Systems from R/3 DEV, QAS and PRD (BASIS Team).

11) Access transaction bd97 to associate RFC Destination in Logical System corresponding from R/3.This document will provide the solution to implement the 9th , 10th and 11th processes (BASIS Team):

12) In transaction SXMB_ADM -> Integ. Engine Config., check the Is and AS, Insert the corresponding Integration Server(BASIS).

(Eg.:dest://INTEGRATION_SERVER_PID) and habilitate the successful messages log in sxi_monitor.

13) Register and activate queues in transaction SXMB_ADM e SMQR(André Ramalho – PI/XI Consultant).

14) Create BS in SLD to refer PI IS and PI AS with installed Nf-e Product(André Ramalho – PI/XI Consultant).

15) In integration Builder:Configuration, create parties with communication channel to route theCommunication between ERP and SEFAZ ( André Ramalho – PI/XI Consultant).

16) Assign the Business System of SAP NFe and create new communication channels WAS_XI_RCVand SIGN_SOAP_RCV (André Ramalho – PI/XI Consultant).

17) Configure Governance and signature sceneries (André Ramalho – PI/XI Consultant).

18) Create Receiver Det of sync communications to Governance (André Ramalho – PI/XI Consultant).

Page 11: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

19) Create Jobs of Service Status Check and Process Reports(André Ramalho – PI/XI Consultant).

20) Create users (BASIS Team):

In R/3 to RFC Destination of PI; In PI to RFC Destination from R/3.

21) Create Destinations(BASIS Team):

ABAP conection in R/3 to PI Application System; ABAP Connection in PI to R/3.

RISKS:

NF-e process is very consistent. We just have to be careful about proxy and user authentications for these proxies.

Considerations:

Nf-e process in SAP works like the follow picture:

Page 12: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

NFe flows:

Nf-es:

Contingency:

Page 13: How to Implement GRC, PI and ECC to NFE

How to implement Nfe (GRC PI).

Created by André Ferreira Ramalho – SP – BrazilSAP ABAP PI/XI GRC Consultant,Mobile: +55 13 91774638Mail: [email protected]