Post on 24-Nov-2015
SAP GRC NFe
Nota Fiscal Eletrnica
SAP GRC NFe Configurationson Development Environment
By: Andre Sousa
1INDEX1. Introduction ................................................................................... 4
1.1. Objective.............................................................................................................4
1.2. System Overview ..............................................................................................4
1.3. System Information ..........................................................................................6
1.3.1. ERP System .................................................................................................6
1.3.2. GRC NFE System ........................................................................................6
1.3.3. PI System ....................................................................................................6
2. System Landscape Definitions ........................................................... 7
2.1. Product ................................................................................................................7
2.2. Software Component ........................................................................................7
2.3. Technical System ..............................................................................................7
2.4. Business System ...............................................................................................8
3. System Communication .................................................................... 9
3.1. Connection ERP ? GRC NFE ...........................................................................9
3.2. Connection GRC NFE ? ERP ...........................................................................9
3.3. Connection GRC NFE ? PI .............................................................................11
3.4. Connection PI ? GRC NFE .............................................................................12
4. GRC NFE Configurations ..................................................................13
4.1. CNPJ ..................................................................................................................13
4.2. Service Status Check Parameters ................................................................14
4.3. SEFAZ STATUS CODE .....................................................................................14
4.4. Jobs ...................................................................................................................15
4.4.1. Check Service Status ...............................................................................15
4.4.2. Update ERP Status ...................................................................................16
4.4.3. Create Batches and Sends Batch Queries............................................17
4.5. Number Ranges for Batch ..............................................................................18
24.6. Batch Settings .................................................................................................19
4.7. Authorization ....................................................................................................20
4.7.1. Role for Menu Exhibition .........................................................................20
4.7.2. Role to Restrict Access by TaxNumber .................................................20
5. PI Objects .....................................................................................21
5.1. Integration Repository Objects .....................................................................21
5.2. Integration Directory Objects .......................................................................21
5.2.1. Business Systems ....................................................................................21
5.2.2. Parties ........................................................................................................22
5.2.3. Integration Processes ..............................................................................25
5.2.4. Communication Channels .......................................................................26
5.2.5. Integration Scenarios ..............................................................................31
6. Procedure to Add a New SEFAZ .........................................................38
7. Procedure to Import Certificate .........................................................41
8. Technical Monitoring .......................................................................43
8.1. Features ............................................................................................................43
8.1.1. Message Monitor ......................................................................................43
8.1.2. Monitor for Remote Function Calls (RFC) .............................................43
8.1.3. Application Log .........................................................................................44
9. Troubleshooting .............................................................................45
9.1. Check PI Cache ................................................................................................45
9.2. Restart from GRC NFE Monitor .....................................................................47
9.3. Invoices with Different Statuses on GRC NFE and ERP ............................48
9.4. Problems when Maintaining Batch Settings ................................................48
9.5. Restart of Messages ........................................................................................48
9.6. Restart of Queues ...........................................................................................51
9.7. Service Status ..................................................................................................51
39.8. Performance Problems ...................................................................................52
10. Recommendations ..........................................................................54
10.1. Housekeeping Routines ..................................................................................54
10.1.1. Restart of Asynchronous Error Messages in PI ...................................54
10.1.2. Deletion Jobs.............................................................................................54
10.1.3. Deletion of Old ccBPM Workitems .........................................................55
10.1.4. Deletion of J2EE Files ..............................................................................55
10.2. Integration Engine - Tuning ..........................................................................55
10.3. Integration Process Parallelism BPE ..........................................................58
10.4. Update SLL-NFE to the Latest SP Level .......................................................59
11. Transporting ..................................................................................60
Glossary................................................................................................61
41.Introduction
1.1. Objective
This document relates the necessary configurations for the messagingsystem of Nota Fiscal Eletronica solution2 to work. Development environment isconsidered only and some auxiliary steps related to basis infrastructure (such asinstallation procedures which can be found in the installation and master guides forGRC NFE1 product) are not focused on this document approach. Procedures whichhave to be conducted by the fiscal department, key users and/or businessconsultants are not meant to be focused here either.
In addition to the above, instructions and considerations regardingmonitoring, troubleshooting and performance, as well as housekeepingprocedures, are provided herein.
1.2. System Overview
ECC
SEFAZClient 200 - SAP PI 7.1
sappid.lhoist.com
SOAP(Synchronous)
Computer
ERP
Client 061 LD3
sapld3.lhoist.com
ECC
ERP
Client 200 LS3
sapls3.lhoist.com
Client 200 - SAP PI 7.1
sappis.lhoist.com
RFC(Asynchronous7)
client 200
client 300
SAP GRD
sapgrd.lhoist.com
5This is the current picture of the landscape, that is, development andsimulation environment in this case is the same for GRC NFE1 system. Even thoughPI has two different environments, in case of new patches for NFe solution2, then itwould be highly recommended to update XI-content in both systems at the sametime.
A new installation for ABAP component SLL-NFE (GRS environment) can becreated later on to ensure more control and smooth application of new SupportPackage and Patches.
In this case, the following should be done:
- Change RFC14 destination ERP2NFE in LS3 system to point to the newGRS environment;
- Created connections as described in sections 3.2 Connection GRC NFE? ERP and 3.3 Connection GRC NFE ? PI in new GRS environment;
- Configure GRS Integration Engine (SXMB_ADM transaction) accordingto connection referenced under section 3.3 Connection GRC NFE ? PIof this document;
- Adjust connection as described in section 3.4 Connection PI ? GRCNFE of this document;
- Transport (and perform non-transportable configurations) describedunder section 4 GRC NFE Configurations of this document in GRSsystem;
- Import digital certificates into GRS J2EE Keystorage;
ECC
SEFAZClient 200 - SAP PI 7.1
sappid.lhoist.com
SOAP(Synchronous)
Computer
ERP
Client 061 LD3
sapld3.lhoist.com
ECC
ERP
Client 061 LS3
sapls3.lhoist.com
Client 200 - SAP PI 7.1
sappis.lhoist.com
RFC(Asynchronous)
GRD - client 200
GRS
6- Created Technical System and Business System for new GRS in SLDand adjust the transport target from GRD this new GRS;
- Delete all configuration objects in PIS and transport them all again.
1.3. System Information
1.3.1. ERP System
1.3.2. GRC NFE System
1.3.3. PI System
System SAP ECCDescription SAP ERP ECCVersion SAP ECC 6.00Hostname / Client sapld3.lhoist.com / 061IP Address 10.10.221.22
System SAP GRC NFEDescription Core application ABAP Component SLL-NFEVersion 1.0Hostname / Client sapgrd.lhoist.com / 200IP Address 10.10.21.68
System SAP PIDescription Process Integration SystemVersion 7.1Hostname / Client sappid.lhoist.com / 200IP Address 10.10.221.27
72.System Landscape Definitions
2.1. Product
2.2. Software Component
2.3. Technical System
Product Name SAP NOTA FISCAL ELECTRONICAVendor Name sap.com Version SAP NFE 1.0_700
Component Name SAP SLL-NFEProduct Name SAP NOTA FISCAL ELECTRONICAVendor Name sap.com Version 1.0
Component Name SAP SLL-NFE-JWSProduct Name SAP NOTA FISCAL ELECTRONICAVendor Name sap.com Version 1.0
Component Name XI CONTENT SLL-NFEProduct Name SAP NOTA FISCAL ELECTRONICAVendor Name sap.com Version 1.0
Technical System Type Web AS ABAPTechnical System Name PIDHost Name sappid
Technical System Type Web AS JavaTechnical System Name PIDHost Name sappid
8 Those Technical systems should be created either manually or bymeans of transaction RZ70 in the respective systems.
2.4. Business System
Those Business Systems should be created manually.
It is not necessary to have ERP system on SLD for GRC NFE1 solutionto work, as communication between GRC NFE1 and ERP is done by means of RFC14
calls.
Product SAP NOTA FISCAL ELECTRONICA SAP NFE 1.0_700 must beflagged as the installed product (tab Installed Software) for business systemGRD200.
Technical System Type Web AS ABAPTechnical System Name GRDHost Name sapgrd
Business System Name INTEGRATION_SERVER_PIDTechnical System Name PIDLogical System Name LOGSPID200
Business System Name GRD200Technical System Name GRDLogical System Name LOGSGRD200
Business System Name BS_DIGITAL_SIGNATURE_APPLTechnical System Name GRD (J2EE)Logical System Name GRC_NFE
93. System Communication
3.1. Connection ERP ? GRC NFE
A type 3 connection (ABAP connection) should be created on ERPdevelopment system with the following data/characteristics:
User ERP2NFE should have role /XNFE/RFCSERV, according to OSSnote 1223469.
3.2. Connection GRC NFE ? ERP
T
The connection used in this case is created so that NFe3 processing resultscan be returned to ERP. The following data should be entered:
Transaction SM59
System LS3
Field Value
RFC Destination ERP2NFE
Description Connection to NFE GRC
Load Balancing No
Target host sapgrd.lhoist.com
System Number 00
Logon and Security
Language EN
Client 200
User ERP2NFE
Transaction SM59
System PID
10
User NFE2ERP should have RFC14 permissions (S_RFC object,authorization 16). Besides, when cancelling an invoice, the following transactionscan be directly involved:
? VF11;? VF02;? VL09;? MR8M;? MBST;? J1B3N;? MBST;? MIGO.
Nonetheless, other MM, SD, FI and LS rights might be necessary,depending on the executed programs. Under this circumstance, a first possibility isto exhaustively trace and study what could be every necessary authorizationobject when it comes to cancellation5/skipping6. A second and simpler option canbe to assign full MM, SD, FI and LS authorization rights, taking into accountexisting objects/profile that might have been created by Lhoist.
As the response to ERP is an asynchronous7 process, an additionalconfiguration on BD97 is necessary so that GRC NFE1 can send the informationback to the right ERP client (logical system).
Field Value
RFC Destination NFE2ERP
Description Connection to ERP for NFE
Load Balancing No
Target host sapld3.lhoist.com
System Number 61
Logon and Security
Language PT
Client 061
User NFE2ERP
11
Procedure
1. Go to transaction BD97, place the cursor on LOGSLD3061 and hit
(Logical system LOGSLD3061 must have beenrecorded on transaction BD54 beforehand);
2. On field RFC destination for BAPI calls, enter NFE2ERP and then click onContinue .
3.3. Connection GRC NFE ? PI
A type H connection (HTTP Connection to ABAP System) should be createdwith the following characteristics:
User PIAPPLUSER2 should have the same rights as PIAPPLUSER.
Make sure queues have been registered and activated as part of theIntegration Engine configuration (transaction SXMB_ADM ? Manage Queues.Select all queues, click on Register Queues and then on Activate Queues).
Transaction SM59
System GRD
Field Value
RFC Destination INTEGRATION_SERVER_PID
Description SAP NFE ABAP to PI
Target Host sappid.lhoist.com
Service No. 55600
Path Prefix /sap/xi/engine?type=entry
Logon and Security
Language EN
Client 200
User PIAPPLGRDUSR
12
3.4. Connection PI ? GRC NFE
A type H connection (HTTP Connections to ABAP System) should be createdwith the following characteristics:
User PI2NFE should have role /XNFE/PRXYSERV, according to OSSnote 1223469. User profile must be generated and authorization must besynchronized for the user at PFCG transaction (tabs Authorization and User).
User PI2NFE should have role /XNFE/PRXYSERV, according to OSSnote 1223469.
Make sure service sap ? xi ? engine has been activated ontransaction SICF in GRD system.
Transaction SM59
System PID
Field Value
RFC Destination PI2NFE
Description SAP PI connection to NFE
Target Host sapgrd.lhoist.com
Service No. 8000
Path Prefix /sap/xi/engine?type=receiver
Logon and Security
Language EN
Client 200
User PI2NFE
13
4.GRC NFE Configurations
4.1. CNPJ
Prerequisite: The digital certificate must be imported into the keystorageview (named NFEKeys) in GRD system J2EE instance. There are three .pfx files(gandarela.pfx, lhoistdobrasil.pfx, mineracaobelocal.pfx) which should be importedat this time; .cer files do not need to be imported, provided the three files listedpreviously contains the full certification path already.
This customizing relates all the invoice issuing companies CNPJs13,keystorage data for digital certificates which will be used for digital signature (foreach CNPJ13) and if validation should occur on GRC NFE1 (for each CNPJ13 as well)before the invoice can be signed and sent to SEFAZ4.
SPRO Path SAP GRC Nota Fiscal Electronica -> Configure SystemResponse for Each Tax Number (CNPJ)
Transaction Code N/A
System/Client GRD/200
Tax Number Description SEFAZEnvirKeyStorageView
KeyStorageElement Validation
Auto.SCAN
Auto.Notify
Auto.Check
01172656000154 Lhoist do BrasilES Homologation NFEKeys
lhoistdobrasil
01172656000235 So Jose daLapa
Homologation NFEKeys lhoistdobrasil
01172656000316 Serra Homologation NFEKeys lhoistdobrasil
06730693000154 MineraoBelocal RJ
Homologation NFEKeys mineracaobelocal
06730693000235 Limeira Homologation NFEKeys mineracaobelocal
06730693000316 Arcos Homologation NFEKeys mineracaobelocal
06730693000405 Matozinhos Homologation NFEKeys mineracaobelocal
06730693000669 Rio de Janeiro Homologation NFEKeys mineracaobelocal
08012235000105 Gandarela MG Homologation NFEKeys gandarela
14
4.2. Service Status Check Parameters
This customizing allows the service status check interval to be set for everySEFAZ4 to which data is to be sent. The service status job (see section 4.4.1.Check Service Status) frequency interval should not be smaller than the valuespecified here to avoid unnecessary executions, as it should not be greater either;except if, in the list below, there were different values, then it would berecommended to schedule the job with a frequency equal to the smallest valuefound.
SPRO Path SAP GRC Nota Fiscal Electronica -> Configure Query forService Status for Authority (SEFAZ)
Transaction Code N/A
System/Client GRD/200
Region SEFAZEnvirIssueType
Interval(Seconds)
Auth.Vers. Timezone
Minas Gerais Homologation Normal 250Version005a BRAZIL
Esprito Santo Homologation Normal 250Version005a BRAZIL
Rio de Janeiro Homologation Normal 250Version005a BRAZIL
4.3. SEFAZ STATUS CODE
SPRO Path SAP GRC Nota Fiscal Electronica -> Define AuthoritysStatus Codes
Transaction Code N/A
System/Client GRD/200
This data is related to the status code that authorities work with. The listcan be obtained from the Brazilian website:
http://www.nfe.fazenda.gov.br/portal/integracao.aspx.
15
Report /XNFE/GOVERMENT_STATUS_LOAD can then be used to read a textfile separated by tab characters (the last column in the file should also contain tabcharacters before the next line).
Procedure
1. On GRD environment, go to the path mentioned above over SPRO;
2. Click on Select All ;
3. With all the entries selected, go to menu Table View -> Transport. Create anew transport request and transport it to the other environments.
4.4. Jobs
Transaction SM36
System/Client GRD/200
These jobs should be scheduled with a user that has properauthorizations and that will not be deleted.
4.4.1. Check Service Status
Check service status job (/XNFE/CHECK_SRV_STATUS) will queryauthorities about their services statuses. Information from this job is taken intoaccount by the system before sending an invoice for authorization (if servicestatus is bad, the message will not be sent).
This job should be scheduled with the following parameters:
Job Data
Job Name /XNFE/CHECK_SRV_STATUS
Job Class C
Frequency 10 minutes
ABAP Program
16
Make sure variant named SEFAZ has been created for report/XNFE/CHECK_SRV_STATUS at SE38 transaction beforehand. It should have thefollowing values:
4.4.2. Update ERP Status
Processing results from GRC NFE1 will be sent back to ERP by means ofRFC14. This RFC14 call may fail for whatever the reason, in a way an NFe3 can havedifferent statuses on GRC NFE1 and ERP (the reason can be the simple fact of alocked table on ERP by a user who is running a certain transaction at the momentthe answer from SEFAZ4 arrives).
Under this circumstance, this job resends NFes3 status information back toERP in case of errors in order to avoid inconsistency (entries related to erroneousinvoices are stored at table /XNFE/BACKSTATUS).
Name /XNFE/CHECK_SRV_STATUS
Variant SEFAZ
Language EN
Variant UF
Issuer Region 31, 32 and 33
SEFAZ SystemEnviron. 2 (development and test environments)
1 (for production environment)
Authority Version 005A
Job Data
Job Name /XNFE/UPDATE_ERP_STATUS
Job Class C
Frequency 10 minutes
ABAP Program
Name /XNFE/UPDATE_ERP_STATUS
Variant No variant has been created
17
If, even after a job run, the status of an invoice is not updated on ERPside, then kindly check table /XNFE/BACKSTATUS and see if there is an entrywhich has MAXTRIES values exceeded (according to what may be configured asthe above mentioned job variant parameter). In this case, please, use report/XNFE/UPDATE_ERP_STATUS_DIAL.
4.4.3. Create Batches and Sends Batch Queries
Report /XNFE/PROCESS_REPORTS is supposed to run through an infiniteprocess (the program has an infinite loop) and it sweeps the system for newincoming NFes3 from ERP, creates batches and send them to the authorities. Thisprogram, for performance reasons, has a parameter called idle time. If idle time isset to 10 seconds, it means that the process will sleep for 10 seconds, then it willrun, then sleep again for 10 more seconds and so on. This reduces drastically theCPU consumption; otherwise it might be the case that CPU utilization reaches, in awasteful way, values near 90%. The job itself is just to ensure that such infiniteprocess is still running, so when this job first runs, it triggers the infinite executionas there will not be any process running for report /XNFE/PROCESS_REPORTS(that is why it should have the variant about the idle time). The next job runs areonly to monitor the process, so, in case of troubles, it will trigger it again,otherwise, the job execution simply ends. The reason for the narrow executionwindow is to avoid, in case of such a failure, that an NFe3 hangs for too muchtime.
Make sure variant BATCH_PROCESS has been created for report/XNFE/PROCESS_REPORTS at SE38 transaction beforehand. It should have thefollowing values:
Language EN
Job Data
Job Name /XNFE/PROCESS_REPORTS
Job Class C
Frequency 3 minutes
ABAP Program
Name /XNFE/PROCESS_REPORTS
Variant BATCH_PROCESS
Language EN
18
4.5. Number Ranges for Batch
Transaction SM36
System/Client GRD/200
Object /XNFE/BAID should have an interval set up.
This object has main memory buffering active, which means thatbuffers are used in the shared memory to store the external number interval andsome sub-ranges of the internal number interval. If the numbers of an internalnumber interval are used up, new numbers are fetched from the database controlvia the number range server and this process is subjected to gaps.
This customizing is not transportable.
Procedure
1. Go to transaction SNUM;
2. Enter /XNFE/BAID into field Object and then click on Number Ranges button;
3. Click on button and enter the following necessaryinformation:
No. From number To number Ext
01 (must havethe leading zero) 000000000000001 999999999999999
Variant WAIT_TIME
Wait Time Until Next Call 00:00:10
19
4.6. Batch Settings
Path on GRC NFEWeb DynproMonitor
, then click on
Transaction Code N/A
System/Client Menu with Web Dynpro monitor entries should beaccessible from GRD/200
This customizing is not transportable.
Services under sap ? bc ? webdynpro ? xnfe; sap ? bc ? icons,icons_rtl, pictogram, ur and webicon; sap ? public ? myssocntl must be activatedto access GRC NFE1 monitors.
Logon user should have role /XNFE/USERMENU configured in order toview the monitor icons on SAP GUI.
The following information can be entered:
ParametersParameter
Value
Max.Time(Sec) MaxSize(B)
Max.NF-es.
WaitTime(Sec)
Max. No.Repeats
20
500.000(cannot behigher thanthis value) 1 15 5
If there are no customizing entries, then it will not be possible tosave the entries. To solve such a problem in a situation like this, report/XNFE/GENERATE_DEFAULT_BATCUS must be run. This report will add the defaultentries like above to the customizing. These entries meets Lhoist current businessrequirements which is, for the time being, one NFe3/batch.
20
4.7. Authorization
4.7.1. Role for Menu Exhibition
Transaction PFCG
System/Client GRD/200
Role /XNFE/USERMENU allows menu entries for GRC NFE1 monitors tobe displayed in the SAP GUI interface. Entries can be added or removed.
Hint: Enter the following data in SSM_VAR view using SM30 transaction.By doing this, it will not be necessary to redo this configuration in productionenvironment, as the entries described above will be included in a transportrequest.
Name Field Attributes Text
SERVER sapgrd.lhoist.com
PORT 8000
4.7.2. Role to Restrict Access by TaxNumber
Role /XNFE/TAXNUMBER makes it possible to restrict access to invoices inthe monitor, according to the taxpayer. This can be used, for instance, to preventone user from accessing invoices which are not related to the plant he is assignedto, considering two legally-indepent entities of a company.
CNPJ13 values can be entered, or the wildcard character can be assigned togive access to all CNPJs13 invoices; so, it means that the role must be assigned toa user who will access the monitor, even if limiting access is unnecessary. Lastbut not the least, the profile must be defined accordingly at PFCG transaction.
21
5. PI Objects
5.1. Integration Repository Objects
The necessary objects for NFe solution2 are within the following softwarecomponent, which must be imported by means of a .tpz file during installation:
- SAP SLL-NFE.
See OSS note 836200 for more information on this particular subject.
5.2. Integration Directory Objects
5.2.1. Business Systems
The following Business Systems have to be imported from SLD intoIntegration Directory:
Party
ComponentName:
GRD200
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
22
Procedure
1. On Integration Directory, go to Communication Component Without Party
, expand it, right click on Business
System and hit Assign Business System. Click on Continuefor step 1 and, in step 2, leave Party information blank;
2. On step 3, select the Business Systems (GRD200 andBS_DIGITAL_SIGNATURE_APPL). Clear SLD data cache if your any of theBusiness Systems does not appear in the list above (menu Environment ?Clear SLD Data Cache).
These Business Systems should have been created on SLD, accordingto section 2.1.4 Business System of this document.
5.2.2. Parties
The following Parties must be created, according to the followingdocumented data:
Party
ComponentName:
BS_DIGITAL_SIGNATURE_APPL
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
23
Party: NFE_LHOIST
BusinessComponent:
SAP_SLL_NFE
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
Party: NFE_SCAN
BusinessComponent:
homologation
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
BusinessComponent:
production
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
24
Party: NFE_SEFAZ_ES
BusinessComponent:
homologation
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
BusinessComponent:
production
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
Party: NFE_SEFAZ_MG
BusinessComponent:
homologation
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
BusinessComponent:
production
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
25
Procedure
1. On Integration Directory, right click on Party and create the Partieslisted above;
2. Under each created Party, right click the proper service type (according to thespecification for each Party above) to create the service.
5.2.3. Integration Processes
The following Integration Processes12 must be represented on IntegrationDirectory (imported from ESR):
? BATCH_BatchProcess;? BATSR_BatchStatusRequestProcess;? CANCR_CancellationRequestProcess;? SIGNC_SignCancNFeProcess;? SIGNN_SignNFeProcess;? SIGNS_SignInutNFeProcess;? NFESC_NfeStatusCheckProcess;? SKIPR_SkippingRequestProcess.
Party: NFE_SEFAZ_RJ
BusinessComponent:
homologation
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
BusinessComponent:
production
CommunicationComponent:
Business System
Type: Web AS ABAP Web AS Java Standalone JavaThird Party
Business Component
Integration Process
26
Procedure
1. On Integration Directory, go to Party , find NFE_LHOIST (which shouldhave been created according to the previous section), expand it, right click on
Integration Process and create a new definition. Click onContinue for step 1 and, in step 2, select one of the Integration Processes12
listed above;
2. On step 3, just keep the name of the selected processes12 and, finally, click onFinish.
5.2.4. Communication Channels
The following communication channels are necessary:
Communication Channel
Party
CommunicationComponent
GRD200
Name: WAS_XI_RCV
Adapter Engine: Integration Server
Sender Receiver
Type: IDoc RFC XI JDBC
JMS File HTTP SOAP
Marketplace RNIF
Other, Details:
Configuration: Parameter Value
Transport Protocol HTTP 1.0
Message Protocol XI 3.0
Adapter Engine Integration Server
Addressing Type HTTP Destination
HTTP Destination PI2NFE
Security Settings Select Security Profile
Transfer Hop List
27
Finally, SOAP communication channels should be placed underHomologation and Production services under each NFE_SEFAZ* (that isNFE_SEFAZ_ES, NFE_SEFAZ_MG and NFE_SEFAZ_RJ) and NFE_SCAN8 Parties, inthe following way:
28
Communication Channel
Name: See figure above
AdapterEngine:
Central, Details:
Decentral: J2EE Engine , Details: Plain J2SEE, Details:
PCK: Type:
Type: IDoc RFC PI JDBC
JMS File HTTP SOAP
Marketplace RNIF
Other, Details:
Configuration: Parameter Value
Transport Protocol HTTP
Message Protocol SOAP 1.1
Adapter Engine Central Adapter Engine
Target URL URLs can be retrieved from the Braziliangovernment web site
Configure CertificateAuthentication See below for Key store Entry / Key store view
Configure UserAuthentication
Configure Proxy
Select Security Profile
Do not use SOAPEnvelope
Keep headers
Keep attachments
Use encoded header
Use query string
SOAP Action See below
29
For SSL9 communication, the following data can be considered for all theinvoice issuing companies:
Note that for digital signature, the referenced keystorage elements must havethe CNPJ13 of the issuing companies, so each one of them is entered accordinglyfor this purpose, as a result of customizing described on section 4.1- CNPJ.
For SLL9 communication, the keystorage element should contain the CNPJ13 ofthe responsible for NFe3 transmission, which not necessarily is the issuer himself(that is why the above mineracaobelocal was entered for all SEFAZ* Parties).
CommunicationChannel
Process StepRelated
SOAP ACTION
BATCH_SOAP_RCV Batch Sending http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao/nfeRecepcaoLote
BATSR_SOAP_RCV Batch Status Query http://www.portalfiscal.inf.br/nfe/wsdl/NfeRetRecepcao/nfeRetRecepcao
CANCR_SOAP_RCV Cancellation5 http://www.portalfiscal.inf.br/nfe/wsdl/NfeCancelamento/nfeCancelamentoNF
NFESC_SOAP_RCV Invoice StatusCheck
http://www.portalfiscal.inf.br/nfe/wsdl/NfeConsulta/nfeConsultaNF
SKIPR_SOAP_RCV Skipping6 http://www.portalfiscal.inf.br/nfe/wsdl/NfeInutilizacao/nfeInutilizacaoNF
SRVSC_SOAP_RCV Service StatusCheck
http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico/nfeStatusServicoNF
Key store Entry Key store View
mineracaobelocal NFEKeys
30
Communication Channel
Party
CommunicationComponent
BS_DIGITAL_SIGNATURE_APPL
Name: DIGSIG_SOAP_RCV
AdapterEngine:
Central, Details:
Decentral: J2EE Engine , Details: Plain J2SEE, Details:
PCK: Type:
Type: IDoc RFC PI JDBC
JMS File HTTP SOAP
Marketplace RNIF
Other, Details:
Configuration: Parameter Value
Transport Protocol HTTP
Message Protocol SOAP 1.1
Adapter Engine Central Adapter Engine
Target URL http://sapgrd.lhoist.com:50000/DigitalSignature/ws?style=document
Configure CertificateAuthentication
Configure UserAuthentication
User PI2NFE
Configure Proxy
Select Security Profile
Do not use SOAPEnvelope
Keep headers
Keep attachments
Use encoded header
Use query string
SOAP Action
31
User PI2NFE should have role SAP_J2EE_GUEST.
5.2.5. Integration Scenarios
The following scenarios must be imported from Integration Repository:
1. BATCH_WebAS_Outbound_Batch;2. BATSR_WebAS_Outbound_BatchStatusRequest;3. CANCR_WebAS_Outbound_CancellationRequest;4. NFESC_WebAS_Outbound_NFeStatusCheck;5. SKIPR_WebAS_Outbound_SkippingRequest;6. SRVSC_WebAS_Outbound_ServiceStatusCheck;7. SIGNC_WebAS_Outbound_SignCancNFe;8. SIGNN_WebAS_Outbound_SignNFe;9. SIGNS_WebAS_Outbound_SignInutNFe.
Procedure
1. On Integration Directory, go to menu Tools -> Apply Model from ESRepository;
2. Under Type of ES Repository Model, mark the option Process IntegrationScenario
3. Select one of the Integration Scenarios listed above by pushing the button
under ES Repository Model Reference(s);
4. After selecting the Integration Scenario, click on Continue button and then onFinish. The integration scenario configurator will then be started (to regeneratethe scenario, on tab Scenarios, double-click the scenario name and then click
on Integration Scenario Configurator button );
5. Click on top of each of the presented lanes (each lane corresponds to abusiness service) and, on the bottom, do the association according to thefollowing rules, choosing the one which fits to a suitable applicationcomponent:
32
Case 1: Business System Components for A2A
Another example of Case 1
33
Case 2: Business System - B2B (Notice the tabs which have to be configured)
Case 3: Integration Process - A2A
34
Case 4: Integration Process B2B
Case 5: Government System (SEFAZ4)
Select all NFE_SEFAZ* Parties and NFE_SCAN8, including homologation and production services
6. Click on Configure Connections and assign the missing communication
channels which relates to the business scenario. Use buttons tonavigate between the connections or directly click on the arrows which connectsteps between different lanes.
35
Note that there is no need to specify a communication channel foradapter type XI sender (message is sent directly from GRC NFE1 system to PIintegration engine), neither when Integration Processes12 are sender ofmessages.
7. Finally, click on Create Configuration Objects. Flag radio button foroption Generation and make sure that, under Scope of Generation, all theoptions are ticked;
8. Click on Start;
9. After finishing the generation, close the window with the results. After that,click on Apply and then close the Integration Scenario Configurator window.Save settings done to Integration Scenario.
36
For scenarios 1 to 6, after regenerating each one of them, theircorresponding Receiver Determinations must be edited so that the message theysend can be routed to the proper SEFAZ4. Such Receiver Determinations are:
Integration Scenario Receiver Determination to be Changed
BATCH_WebAS_Outbound_Batch
BATSR_WebAS_Outbound_BatchStatusRequest
CANCR_WebAS_Outbound_CancellationRequest
NFESC_WebAS_Outbound_NFeStatusCheck
SKIPR_WebAS_Outbound_SkippingRequest
SRVSC_WebAS_Outbound_ServiceStatusCheck
Procedure
1. Under , double click on the related ReceiverDetermination (according to the table above);
2. Click on Switch Between Display and Edit Modes . Under Configured
Receivers, click on button to enter a condition for each Party/Serviceentry;
3. On the Condition Editor, click on button twice to add three conditions(except for NFE_SCAN8 Party, which has only two conditions) which will bejoined as an and;
4. For each one of them, click on button . For the first, search for themessage field related to the state; for the second, search for the field relatedto the emission type; and for the third, search for the field related to theenvironment type, as follows:
37
5. The final result should look like this on condition editor:
You should enter the conditions this way for every entry under configuredreceivers. When Party is NFE_SEFAZ_RJ, condition should check if cUF field isequal 33; for NFE_SEFAZ_MG, if cuF field equals 35. If Service is Homologation,the condition should check the field tpAmb for value 2; for Production, value 1.Also, tpemis field must be checked for values different than 3 because in suchcase, it means that the invoice has been sent under contingency and it must besent to NFE_SCAN8 Party (see note 1397240 for more documentation on thisrouting to SCAN8). In this last case, there are only two conditions, that is, onlytpemis and tpamb fields must be checked, as shown in the picture above.
Integration Scenarios must be imported after: Business Systems havebeen imported from SLD; business process have been imported from IntegrationRepository; and Parties and communication channels have been created, allaccording to prior topics within section 5.2 Integration Directory Objects of thisdocument.
38
6. Procedure to Add a New SEFAZ
Lets assume that Lhoist starts to operate a new business place in anotherstate (for example, in SP) and that invoices are to be issued at such place.
Under such a circumnstance, NFe solution2 will have to be adapted to suchrequirement and this involves configurations which should be handled carefullyboth on ERP and GRC NFE1 systems.
When it comes to GRC NFE1 system, customizing described on sections 4.1 CNPJ and 4.2 Service Status Check Parameters must be adjusted by taking intoaccount the new SEFAZ4 data to be added. Also, the service status check jobvariant, as described on section 4.4.1 Check Service Status, must be changed.An important point to be observed about customizing described on section 4.1 CNPJ is to check if the digital certificate to be used for digital signature has beencarefully imported into the J2EE keystorage.
Then, on Integration Directory, create a new Party related to the new SEFAZ4
(in our example, NFE_SEFAZ_SP) and add the necessary communication channelunder its production and homologation services.
Hint: create the new Party as copy of an existing Party. For instance,right click on NFE_SEFAZ_ES, click on Copy Object and then on Party field. EnterNFE_SEFAZ_SP. For Add to Scenario field, select option --None--. Do not forget toenter correct data such as URL address in the communication channels of this newParty services.
Another point to be changed on PI is related to the following IntegrationScenarios:
1. BATCH_WebAS_Outbound_Batch;2. BATSR_WebAS_Outbound_BatchStatusRequest;3. CANCR_WebAS_Outbound_CancellationRequest;4. NFESC_WebAS_Outbound_NfeStatusCheck;5. SKIPR_WebAS_Outbound_SkippingRequest;6. SRVSC_WebAS_Outbound_ServiceStatusCheck.
Procedure
1. On Integration Directory, go to and double-click onone of the above scenarios name. It will be displayed on the right window;
2. Click on Switch Between Display and Edit Modes to edit the scenario;
3. Click on Integration Scenario Configurator to regenerate the scenario;
39
4. Click on Government System lane, add the newly created Party to scenarioand then click on Assign, as illustrated below:
5. Click on the connection to SEFAZ4 (as shown below) and enter the respectiveSOAP communication channels, regenerate the configuration objects by
clicking on Create Configuration Objects (configurations will be kept) andthen click on Apply, as shown below:
40
6. After finishing the generation, close the window with the results. You do notneed to save the logs. After that, also close the Integration ScenarioConfigurator window and save the changes to the scenario.
Afterwards, it is necessary to change the Receiver Determination related tocommunication to SEFAZ4 so that the proper routing conditions are entered for thenew SEFAZ4. Please, refer to the relation of Receiver Determinations which shouldbe changed as well as to instructions about how to change them on section 5.2.5 Integration Scenarios.
Do not forget to activate all the changes on Change Lists tab.
41
7. Procedure to Import Certificate
Lhoist Group was given three CDs with A1 digital certificate, one for eachcompany:
CD1 Lhoist do Brasil Ltda. (BR01)
CD2 Minerao Belocal Ltda. (BR04)
CD3 Gandarela Minrios (BR06)
Such kind of certificates is valid for one year and must be renewed by thesupplier after this period. As this occurs, new files will be provided to Lhoist Groupand they will have to be imported again into both at keystorages for the J2EEwhich contains the digital signature application and PI 7.1.
In the first case, both three .pfx files which are listed above must beimported into J2EE keystorage of GRD installation (GRC NFE1 installation), as thosewill be used for digital signature (see also section 4.1 CNPJ of this document).
However, for SSL9 communication, it is possible to work with just onecertificate, meaning that this one will represent the responsible for sendinginformation to the government and this has not necessarily to be each one of thecompanies, that is, there can be defined one responsible for both three; the onedefined during project time for this purpose is Mineracao Belocal (see also section5.2.4 Communication Channels of this document).
42
Procedure below should be taken into account to import the certificatesinto PI 7.1:
Procedure
1. Access to Netweaver Administrator tool http://sappid.lhoist.com:55600/nwa(logon user should have administrative rights, such as J2EE_ADMIN);
2. Navigate to Configuration Management and then click on Certificates andKeys;
3. Trusted certification authority certificate must be imported into TrustedCAsview so that certification authentication is possible in this case, file ICP-Brasil.cer must be imported into such view. Select TrustedCA view and thenunder Kestorage View Details, tab Entries, click on Import Entry. Select X.509Certificate as an entry type, enter the path for ICP-Brasil.cer file and click onImport;
4. Certificate for SSL9 communication itself then should be imported into viewNFEKeys, which is the one that has been defined as the one for NFe3 digitalcertificate during project time. Steps are similar to step 4, except that entrytype should be either PKCS#12 Key Pair or PKCS#8 Key Pair.
Hint: In case it is necessary to rearrange the certification path, then, importthe .pfx file as PKCS#12 Key Pair and then, select the imported entry and export it asPKCS#8 Key Pair by clicking on Export Entry button, also under Keystorage View Details,tab Entries. It will be possible to download both a .p8 file and the certificates whichbelong to the certification path. Save those files to a directory, delete the imported entryand import it again as PKCS#8 Key Pair. Add the certificate files one by one in the correctorder by clicking on Add and, after that, specify the path to .p8 file in field Enter path toPKCS#8 key file. Finally, click on Import.
It is recommended to edit an activate again all the communicationchannels that work with certificate authentication to ensure that PI cached11
objects indeed reference most up-to-date keystorage information.
43
8.Technical Monitoring
SAP GRC NFE1 is based on SAP NetWeaver technology that providesadditional monitoring options which can be used to detect issues in thecommunication process.
8.1. Features
8.1.1. Message Monitor
The system communication between the core application GRC NFE1 and PIis based on ABAP Proxies10. Communication issues are displayed in the processmonitors of the core application, such as the NFe3 or the batch monitor. You canalso access the technical monitor to display technical details during the messageexchange with SAP NetWeaver PI by using transaction code SXMB_MONI. Suchmonitor displays all messages sent from and to PI:
- If the core application received a message from PI with a red flag, you canstart the message again;
- If the system sent to PI with a negative acknowledgment, you can display theXML message and look for the error code inside the acknowledgment.
8.1.2. Monitor for Remote Function Calls (RFC)
The system communication between ERP and GRC NFE1 uses RFCs14. Youcan monitor RFCs14 in both systems. There are different monitors for outboundand inbound messages:
- To track the outbound queue, use transaction SM01;
- To track the inbound queue, use transaction SM02.
44
8.1.3. Application Log
The system logs all activities related to the batch processing of NFes3 forthe object /XNFE/BATCH. This includes sending NFes3 in batches to the authoritiesas well as the status information that the authorities set for these NFes3.
You can access the application logs for log object /XNFE/BATCH usingtransaction SLG1. With the batch ID, you can limit the search results.This application log is integrated in the Batch Monitor. There, you can access theapplication log by selecting Job Log.
45
9. Troubleshooting
9.1. Check PI Cache
It is recommended to check PI Cache11 status, especially when activatingPI objects over Integration Repository/Directory, or in case of runtime issues. Itshould always have green status.
It is recommended to always try a delta cache refresh at the first time.Complete cache refresh should thus be the last option if problems are not solved.
Transaction SXI_CACHE
46
It is also recommended to check CPA Cache in case of problems with PI.
Still over SXI_CACHE, the Integration Processes12 definitions should alwayshave return code 0. In case of problems, select the erroneous process and repeatthe activation for it. This point should be checked especially when applying an SAPnote that may change the PI content for GRC NFE1.
1
2
47
9.2. Restart from GRC NFE Monitor
The GRC NFE1 monitor can be used to identify errors during the sendingprocess of invoices (or cancellation5/skipping6 request). It can be used to help atidentifying the step of the sending process in which the error occurred and, aftersuch analysis, it might be possible to restart the stalled message (see attachedfile Pres_Monitor_GRC_NFe_Lhoist.pdf for more details on monitorfunctionalities).
48
9.3. Invoices with Different Statuses on GRC NFE and ERP
Suppose, as an example, that a user on ERP side informs that an invoice isstalled there, but when it is checked on GRC NFE1 monitor, it has authorized statusand thus processing was supposed to be completed. This can occur due toproblems when GRC NFE1 calls the RFC14 to send results back to ERP.
Job /XNFE/UPDATE_ERP_STATUS is intended to monitor problems on theRFC14 callback to ERP from GRC NFE1 (see section 4.4.2 Update ERP Status).However, the job might not be able to do such update as some troubles mightrequire an intervention and, also, the max number of retries might be exceeded.
In such case, please check table /XNFE/BACKSTATUS and consider usingreport /XNFE/UPDATE_ERP_STATUS_DIAL. Transaction /XNFE/UPD_ERP_STAT
RSRFCTRC transaction can also be used to track problems at RFC14 calls.
9.4. Problems when Maintaining Batch Settings
Kindly see observations on section 4.6 Batch Settings.
9.5. Restart of Messages
Some messages with errors stuck in PI can cause some batches/NFes3 tobe stalled in GRC NFE1 monitor (in a way restarting them from there might notwork due to a variety of technical problems). In this case, transactionSXMB_MONI must be checked and, as a selection criteria, enter the time rangeregarding the moment the message was sent to PI (for it, it is always good tocheck the logs in the GRC NFE1 monitors, as shown below).
49
Transaction SXMB_MONI
GRC NFE1 basically sends, by means of PI, synchronous messages toSEFAZ4 (exceptions are the B2B scenarios which send asynchronous7 messages)
50
and these cannot be restarted (red ball icons. Only red flag messages, that is,asynchronous7, can be restart.).
However, ccBPM processes12 are responsible for sending out to SEFAZ4 thesynchronous messages and in case errors occur, they will have negativeacknowledgment and, although it is not possible to restart the synchronousmessages, it is possible to restart the ccBPM process12 which will then send thismessage.
In this last case, proceed to transaction SWF_XI_SWPR and search forproblematic workflows (ccBPM12 is a PI tool which uses the workflow engine ofSAP Web AS) and try to restart them by selecting the entry and clicking onRestart Workflow.
It is recommended to schedule the job which trigger automatic restartingof error messages (which does not include synchronous messages) from reportRSXMB_RESTART_MESSAGES.
51
9.6. Restart of Queues
It might be the case that some queues get stuck due to errors inprocessing one of its LUW which, in its turn, is related to a message. In this case,transactions SMQ1 and SMQ2 must be checked (see section 2.9 of the attacheddocument Admin_check_version2.pdf).
If problems persist even after restarting possible stalled queues as well asmessages, OSS note 1373738 should be checked.
9.7. Service Status
Brazilian government website (in Brazilian Portuguese) also makesavailable information regarding NFe3 webservice availability for each state. Suchinformation can be checked to help in identifying services which are not workingwell.
Legend
Inactive (Red): Followed negative answers. Occurs after Yellow. If apositive answer is returned, service status is changed back to Green.
Transition (Yellow): Remains until ten minutes after a negative answer,even if there is a sequence of negative answers. After this time, status is changedto Red. A positive answer switches status back to Green.
Active: Determined by positive answers, whatever the current status.
52
For homologation environment:
http://hom.nfe.fazenda.gov.br/PORTAL/VerificacaoDeServicos/VerificacaoServicos.aspx
For production environment:
http://www.nfe.fazenda.gov.br/portal/VerificacaoDeServicos/VerificacaoSerVerif.aspx
9.8. Performance Problems
On peak times, it is very unlikely to have > 100 invoices/hour (accordingto provided estimation), so performance problems are not commonly expected.Nevertheless, instructions to deal with such problems are given in this section.
Queues performance both in PI and GRC NFE1 must be checked, asIntegration Engine is used for message processing in those two systems. Thequantity of available process must be checked at SM50/SM51 in case of a longwaiting time for those queues entries. The queues processing status can bechecked at SMQ2/SMQ1/SMQS/SMQR and it is very important that those areconstantly analyzed during the test execution (both on PI and GRC NFE1 ABAPclients).
As GRC NFE1 counts on developments that make use of ccBPM12 tool in PI,it is also important to monitor transactional RFC14 calls on Workflow Engine thepath for it is SXMB_MONI_BPE -> RFC monitor (follow recommendations onsection 8.3 Integration Process Parallelism BPE if performance problems areobserved in digital signature, batch sending as well as receiving batchesprocessing results).
The batch customizing parameters may influence the execution and, incase of performance problems, a primary solution would be to check how theprocessing resources consumption can be reduced by adjusting those parameters(for instance, increasing the Max.Nfes per batch can reduce the number ofmessages which are sent by PI to SEFAZ4 after a batch creation).
Considering the estimated number of invoices, there does not seem to benecessary to increase the number of application/system threads on PID J2EE. Incase of performance problems later on, this is one point to be studied. SAP OSSnote 937159 provides guidance on the matter for both:
Application threads:
Visual Administrator -> Server -> Kernel -> ApplicationThreadManager ->MaxThreadCount;
System threads:
Visual Administrator -> Server -> Kernel -> ThreadManager ->MaxThreadCount, InitialThreadCount, MinThreadCount.
53
Also, only in case of performance problems, note 1380855 can beimplemented.
See also the next section (8 Recommendations) as other importantsuggestions that foster performance are given there and some parameters relatedto Integration Engine Tuning might need some review.
54
10. Recommendations
10.1. Housekeeping Routines
It is highly recommended to go through the housekeeping routines, suchas defining log messages deletion jobs to avoid tablespace growth. The mainprocedures regarding this subject are listed below in the following four subsections(see also section 2.10 of the attached document Admin_check_version2.pdf formore information).
10.1.1.Restart of Asynchronous Error Messages in PI
The job for automatic restart of erroneous messages in PI (onlyasynchronous7 messages can be restarted) should be scheduled for every 20minutes (as a suggestion). Report to be considered isRSXMB_RESTART_MESSAGES.
This same job should be scheduled on GRD as well.
10.1.2.Deletion Jobs
Transaction Code SXMB_ADM -> Schedule Delete Jobs
System PID and GRD
Schedule Delete Job for XML Messages
Delete Job for XML Messages
Start Date Enter a start date
Start Time Enter a start time
Period in Days Specify a frequency according to your policy fordeletion. See also section 9.2 Integration Engine -Tuning
Period in Hours
55
10.1.3.Deletion of Old ccBPM Workitems
GRC NFE1 solution works with ccBPM12 and a considerable number ofworkitems can be generated. Report RSWWWIDE should be run periodically,according to OSS note 836092.
It is highly advised to run the program firstly in test mode.
10.1.4.Deletion of J2EE Files
It is possible to archive automatically the J2EE log files according to regularintervals. This function can be activated on Visual Administrator, under Server ?Services ? Log Configurator, tab Properties. Parameter ArchiveOldLogFiles shouldhave value On (by the way, this is the default value).
Under this circumstance, the resulting file is stored under directory.log/archive of J2EE engine. There is no automatic procedure to delete the files, soit means they have to be manually deleted once in a while.
10.2. Integration Engine - Tuning
According to the volume of messages in PI system (more specifically, inIntegration Engine component), some parameters can be adjusted to cope withbetter parallelism and processing results. Additionally, other related parameterssuch as the ones related to the severity of the logs can have significant impact onperformance and database growth.
Period in Minutes
Schedule Delete Job for History Entries
Delete Job for XML Messages
Start Date Enter a start date
Start Time Enter a start time
Period in Days Specify a frequency according to your policy fordeletion. See also section 9.2 Integration Engine -Tuning
Period in Hours
Period in Minutes
56
Under these circumstances, a set of parameters (the main ones, as all ofthem would result in an unnecessarily overwhelming list at this point) is presentedbelow and those can be changed if the system experiences performance issues(initial suggestions for values based on estimations and current scenario ondevelopment environment are given here as well):
Transaction Code SXMB_ADM -> Integration Engine Configuration,Specific Configuration
Systems PID and GRD
On GRD, the following parameters are suggested:
Category Parameter Subparameter PrefixCurrentValue
TUNING EO_INBOUND_PARALELL RECEIVER 15
TUNING EO_INBOUND_PARALELL SENDER 15
TUNING EO_INBOUND_PARALELL SENDER_BACK 15
For PID, suggestions are:
Category Parameter Subparameter PrefixCurrentValue Explanation
DELETION PERSIST_DURATION ASYNC 1
This parameter refers to thenumber of days thatasynchronous7 messageshould be kept in log tables
DELETION
PERSIST_DURATION HISTORY 7
This parameter refers to thenumber of days that loghistory entries should bekept in the table
DELETION
PERSIST_DURATION SYNC 0
This parameter refers to thenumber of days thatsynchronous messageshould be kept in log tables
DELETION
PERSIST_DURATION_ERROR SYNC 5
This parameter refers to thenumber of days thaterroneous synchronousmessages should be kept
57
into PI logs
DELETION
PERSIST_DURATION_ERROR_UNIT SYNC D
Unit to measure the valueentered into parameterPERSIST_DURATION_ERRORwhen subparameter is SYNC
DELETION
PERSIST_DURATION_UNIT ASYNC D
Unit to measure the valueentered into parameterPERSIST_DURATION whensubparameter is ASYNC
DELETION
PERSIST_DURATION_UNIT HISTORY D
Unit to measure the valueentered into parameterPERSIST_DURATION whensubparameter is HISTORY
DELETION
PERSIST_DURATION_UNIT SYNC D
Unit to measure the valueentered into parameterPERSIST_DURATION whensubparameter is SYNC
TUNING EO_INBOUND_TO_OUTBOUND 1
Enables processing to bedistributed to outboundqueues
TUNING EO_OUTBOUND_PARALLEL 6 Number of outbound queues
LOGGING, LOGGINC_SYNC and TRACE_LEVEL (RUNTIME category)should be kept with their default values in production systems, which are thelowest possible.
SAP help can be used to better understand the tuning parametershttp://help.sap.com/saphelp_nwpi71/helpdata/EN/29/345d3b7c32a527e10000000a114084/content.htm.
SAP note 872388 should be analyzed in order to activate the SwitchProcedure (both on clients 200 and 300), which is the recommended in this case,as GRC NFE1 counts on a reasonable number of messages. Eventually, it may benecessary to adjust the technical definition of table SXMSPMAST, according to thecalculations that should be performed, as described in the note. The SwitchProcedure, in this case, avoids fragmentation problems and, besides, has betterperformance. After reading the mentioned note, set the following parameter:
Category Parameter Subparameter Prefix Current Value
DELETION DROP_MAX_TABLE_LOAD
See the note aboveabout how to setthis value
58
10.3. Integration Process Parallelism BPE
Nowadays, the estimated number of invoices during the peak time is verylow. In case of a significant increase on this number, it is strongly suggested thatinstructions below are followed (values suggested here must be reviewedaccording to the number ccBPM processes12 which PI is to process).
The GRC NFE1 Integration Processes12 can be configured to work withmultiple queues in order to foster performance.
Transaction Code SWF_INB_CONF
System PID
Procedure
1. Under Components in Cache, find SAP SLL-NFE 1.0, expand objects under itand then under namespace http://sap.com/xi/NFE/005a.
2. Find one of the following Integration Process12, double-click on its name, then
click on button Display Change Configuration . To the right of thescreen, change the field Delivery Mode to Without Buffering. Also, please,change the field Queue Assignment to Multiple Queues (Random). Finally,enter the values suggested below into field Number of Queues.
Process Number of Queues
BATCH_BatchProcess 5
BATSR_BatchStatusRequestProcess 5
SIGNN_SignNFeProcess 5
3. Click on button Start Reconfiguration .
4. Make sure option Process Receives EO Messages Only is flagged and click on
.
5. Repeat steps 2, 3 and 4 for all the Integration Process12 listed in the table after
step2. The processes12 should have status Reconfiguration Complete .
In case you want to reset a process to its initial configuration, select it and
then click on button Initialize.
59
It is not necessary to do such changes for processes12 other than the listedabove for NFe solution2 as they usually dont rely on a great number of messages.
10.4. Update SLL-NFE to the Latest SP Level
It is recommended to keep GRC NFE1 SP level to the latest available, as thereare often new important corrections made available by SAP.
60
11. Transporting
More information about PI transport using file system can be found at thefollowing link:
http://help.sap.com/saphelp_erp2004/helpdata/EN/a8/5e56006c17e748a68bb3843ed5aab8/content.htm.
CTS is a good tool which can be configured for PI systems which holds aconsiderable amount of developments, as it enhances the administration of transportactivities for both PI Integration Repository and Integration Directory objects. Moreinformation can be found in the attached document (CTS_GUIDE.pdf).
61
Glossary
1. GRC NFE: it is part of SAP Nota Fiscal Eletrnica (NFe) solution and can be defined asa messaging system comprised by ABAP component SLL-NFE as well as interfacesdeveloped on PI. It handles communication with Brazilian government and can also beused to send/receive invoice XML files to/from business partners (B2B functionalities).
2. NFe solution: SAP NFe solution as a whole include both contents on ERP (on thissystem, it is delivered by SAP in SAP_APPL component) and GRC NFE, this last one canbe used with non-SAP invoice issuing systems.
3. NFe: short for Nota Fiscal Eletronica, which can be translated from Portuguese aselectronic invoice.
4. SEFAZ: fiscal department which is associated to each Brazilian federal unit.
5. Cancellation: an invoice can be cancelled by the time it has already been authorizedby a SEFAZ unit, but the user wants to suspend its legal validity due to problems.
6. Skipping: the numbering of an invoice which should no more be valid must beinformed to the government in case it has not been authorized yet. This is calledskipping.
7. Asynchronous: Not synchronous; occurring at different times; allowing the client tocontinue during a processing.
8. SCAN: short for Sistema de Contingncia do Ambiente Nacional, which translates toNational Environment Contingency System. It is supposed to receive NFes fromtaxpayers under contingency situations, that is, when a SEFAZ unit is down (NFe seriesmust be between 900 and 999).
9. SSL : The secure sockets layer (SSL) is a commonly-used protocol for managing thesecurity of a message transmission on the Internet.
10. ABAP Proxies: All ABAP objects that are created when you generate an interfaceobject from the Integration Repository in an SAP system are called ABAP Proxy10 Objects.Such interfaces allow easier exchange of data between SAP systems with Web AS >=6.40 by means of a native protocol which is HTTP based.
11. PI Cache: PI developed objects have the active version cached in its components inorder to foster performance.
12. ccBPM/integration processes: cross-component BPM is a tool which providesstateful message processing on the Integration Server. It can therefore provide a logicwhich is similar to Workflow by means of Integration Processes and it can be used acrossdifferent systems.
13. CNPJ: equivalent to tax number.
14. RFC: remote function call.
62
Copyright 2009 SAP AG. All Rights Reserved
No part of this publication may be reproduced or transmitted in any form or for any purpose without the expresspermission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components ofother software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, Systemz10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400,AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+,POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP,RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere,Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of AdobeSystems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks orregistered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium,Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented andimplemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products andservices mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AGin Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, WebIntelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and inother countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data containedin this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAPAG and its affiliated companies ("SAP Group") for informational purposes only, withoutrepresentation or warranty of any kind, and SAP Group shall not be liable for errors oromissions with respect to the materials. The only warranties for SAP Group products andservices are those that are set forth in the express warranty statements accompanying suchproducts and services, if any. Nothing herein should be construed as constituting anadditional warrant.