For updated SAP documentation on Statuses in NF-e/CT-e Monitor, verify the help portal:
http://help.sap.com/erp2005_ehp_07/helpdata/en/e6/2d713a377e49d2a69a864c8a34c762/content.htm
-----------------------------------------------------------------------------------------------------------
*** This following page used to apply for: SAP GRC NFE 1.0 and SAP ERP in 2011 ***
-----------------------------------------------------------------------------------------------------------
Summary
This Wiki was created to demonstrate the functional flow of the SAP solution for Nota Fiscal Electronica Brazil, from SAP ERP to government SOAP destinations, passing by GRC and PI.
The main flows were purposely exposed without errors, to look for errors situations look forward on topic #Sample of flow deviation.
1. Flow Authorization for Issuing
| ERP |
|
|
|
|
|
| GRC |
|
|
|
| GRC |
|
| GRC / PI |
| Service |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| NF-e |
|
|
|
| Batch |
|
| Proxy |
| Destination |
Description |
|
|
| Interface |
|
| ||||||||||||
created on ERP | A |
|
|
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
numbered on ERP | 3 |
|
|
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
sent to messaging system |
|
| 0 |
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
received on GRC NFE |
|
| 0 | A |
| 3 | --> | 01 | A |
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 02 | A |
| 1 | --> |
|
|
| SIGNN_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SIGNN_*_SYNC | <--> SOAP | Local WS |
|
|
|
|
|
|
|
| 03 | A |
| 1 | <-- |
|
|
| SIGNN_*_IB |
|
|
|
|
|
|
|
|
|
| 04 | A |
| 1 | --> | 01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 02 |
| --> | BATCH_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| BATCH_*_SYNC | <--> SOAP | Sefaz WS |
|
|
|
|
|
|
|
|
|
|
|
|
| 03 | 103 | <-- | BATCH_*_IB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 04 |
| --> | BATSR_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| BATSR_*_SYNC | <--> SOAP | Sefaz WS |
issuing authorized | C | 1 | 0 | A | 100 | 3 | <-- | 05 | 1 | 100 | 1 | 05 | 104 |
| <-- | BATSR_*_IB |
|
|
send XML to B2B partner |
|
|
|
|
|
|
| 08 | 1 | 100 | 1 | --> |
|
|
| NTB2B_*_OB | --> XI Adapter | Partner |
2. Flow Authorization for Cancellation of a NF-e Authorized
| ERP |
|
|
|
|
|
| GRC |
|
|
|
| GRC / PI |
| Service |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| NF-e |
|
|
|
| Proxy |
| Destination |
Description |
|
| Interface |
|
| ||||||||||
cancellation of NF-e requested |
| 1 | 1 | A | 100 |
| --> | 01 | B |
| 2 |
|
|
|
|
received by GRC NFE |
| 1 | 1 | B | 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 02 | B |
| 2 | --> | SIGNC_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SIGNC_*_SYNC | <--> SOAP | Local WS |
|
|
|
|
|
|
|
| 03 | B |
| 2 | <-- | SIGNC_*_IB |
|
|
|
|
|
|
|
|
|
| 06 | B |
| 2 | --> | CANCR_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| CANCR_*_SYNC | <--> SOAP | Sefaz WS |
cancel authorized | C | 1 | 2 | B | 101 | X | <-- | 05 | 4 | 101 | 2 | <-- | CANCR_*_IB |
|
|
send XML to B2B partner |
|
|
|
|
|
|
| 08 | 4 |
| 2 | --> | CTB2B_*_OB | --> XI Adapter | Partner |
Observation
- For cancellation and skipping the figure of batch (BATCH/BATSR) doesn't exist as the communication to Sefaz is one by one.
- The rejection code 999 was used just representing any kind of rejection possible.
3. Flow Authorization for Skip of a number from a NF-e Rejected by Authorities
| ERP |
|
|
|
|
|
| GRC |
|
|
|
| GRC / PI |
| Service |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| NF-e |
|
|
|
| Proxy |
| Destination |
Description |
|
| Interface |
|
| ||||||||||
skip of number requested |
| 2 | 3 | A | 999 |
| --> | 1 | C |
| 3 |
|
|
|
|
received by GRC NFE |
| 2 | 3 | C | 999 |
| <-- | 2 | C |
| 3 | --> | SIGNS_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SIGNS_*_SYNC | <--> SOAP | Local WS |
|
|
|
|
|
|
|
| 3 | C |
| 3 | <-- | SIGNS_*_IB |
|
|
|
|
|
|
|
|
|
| 6 | C |
| 3 | --> | SKIPR_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SKIPR_*_SYNC | <--> SOAP | Sefaz WS |
skip authorized | C | 2 | 4 | C | 102 | X | <-- | 5 | 5 | 102 | 3 | <-- | SKIPR_*_IB |
|
|
4. Flow Authorization for Skip of a number from a NF-e Rejected by GRC Validation Tool
| ERP |
|
|
|
|
|
| GRC |
|
|
|
| GRC / PI |
| Service |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| NF-e |
|
|
|
| Proxy |
| Destination |
Description |
|
| Interface |
|
| ||||||||||
skip of number requested |
|
| 9 | V |
|
| --> | 1 | C |
| 3 |
|
|
|
|
received by GRC NFE |
|
| 9 | C |
|
| <-- | 2 | C |
| 3 | --> | SIGNS_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SIGNS_*_SYNC | <--> SOAP | Local WS |
|
|
|
|
|
|
|
| 3 | C |
| 3 | <-- | SIGNS_*_IB |
|
|
|
|
|
|
|
|
|
| 6 | C |
| 3 | --> | SKIPR_*_OB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SKIPR_*_SYNC | <--> SOAP | Sefaz WS |
skip authorized | C |
| A | C | 102 | X | <-- | 5 | 5 | 102 | 3 | <-- | SKIPR_*_IB |
|
|
5. Sample of flow deviation
| ERP |
|
|
|
|
|
|
|
|
|
| GRC |
|
|
|
|
| GRC |
|
| GRC / PI |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
| NF-e |
|
|
|
|
| Batch |
|
| Proxy |
Description |
|
|
| Interface | |||||||||||||||||
issuing rejected by GRC NFE validation tool | 8 |
| 0 | V |
|
|
|
|
|
| -> <- | 01 | V | 10 |
| 1 |
|
|
|
|
|
issuing rejected by authorities | 1 | 2 | 0 | A | 999 |
| 3 |
|
|
| <-- | 05 | 2 | 71 | 999 | 1 |
| 05 | 104 | <-- | BATSR_*_IB |
issuing: after reset rejected NF-e | 3 |
| 0 |
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NF-e denied by authorities | C | 3 | 0 | A | 301/302 | X |
|
|
|
| <-- | 05 | 3 |
| 301/302 | 1 |
| 05 | 104 | <-- | BATSR_*_IB |
NF-e denied and canc.pending on ERP | 1 | 3 | 0 | A | 301/302 |
|
| X |
|
| <-- | 05 | 3 |
| 301/302 | 1 |
| 05 | 104 | <-- | BATSR_*_IB |
issuing: NF-e switched to contingency | 2 |
| 5 | A |
|
|
|
|
| X | --> | ?? | ?? |
| ?? | 1 |
| ?? |
|
| ?? |
issuing: NF-e canceled prior to authorization | 2 |
| 5 | A |
|
|
|
| X |
| --> | ?? | ?? |
| ?? | 1 |
| ?? |
|
| ?? |
cancellation authorized and canc.pending on ERP | 2 | 1 | 2 | B | 101 |
|
| X |
|
| <-- | 05 | 4 |
| 101 | 2 |
| n/a |
| <-- | CANCR_*_IB |
cancellation rejected | 4 | 1 | 6 | B | 999 |
|
|
|
|
| <-- | 05 | 6 | 71 | 999 | 2 |
| n/a |
| <-- | CANCR_*_IB |
cancellation rejected accepted by user | C | 0 | 8 | A | 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
number skip authorized and canc.pending on ERP | 2 | 2 | 4 | C | 102 |
|
| X |
|
| <-- | 05 | 5 |
| 102 | 3 |
| n/a |
| <-- | SKIPR_*_IB |
number skip rejected | 5 | 2 | 7 | C | 999 |
|
|
|
|
| <-- | 05 | 7 | 71 | 999 | 3 |
| n/a |
| <-- | SKIPR_*_IB |
number skip rejected accepted by user | 1 | 0 | 8 | A | anterior |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
number skip rejected (after rejected by GRC validation tool) | 5 |
| B | C | 999 |
|
|
|
|
| <-- | 05 | 7 | 71 | 999 | 3 |
| n/a |
| <-- | SKIPR_*_IB |
number skip rejected (after rejected by GRC validation tool) accepted by user | 8 |
| 8 | V |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NF-e from third part issuers posted on ERP | 6 | 1 |
|
| 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NF-e from third part issuers completed on ERP | C | 1 |
|
| 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For stucked process
In cases where the process got stucked in some point of the process, follow the investigation starting from ERP (transaction J1BNFE) and if necessary go deeper on next monitors GRC NFE Web Monitor, GRC Batch Web Monitor, XI Message Monitoring (SXMB_MONI)
6. Domains
A: J_1BNFE_ACTIVE-ACTION_REQU - "NF-e: Required Process Step"
Code | Description | Code | Description |
---|---|---|---|
| In process; no manual action required | 6 | Enter protocol number |
C | Completed | 7 | Req. authorization from the Authorities to cancel/skip NF-e |
1 | Either cancel NF-e and post new one or reset NF-e and send again | 8 | Internal validation error in messaging system. Send again! |
2 | Cancel Source Document | 9 | Set NF-e number and send to the Tax Authorities |
3 | Send NF-e to the Tax Authorities | 0 | Set NF-e no. and send to Tax Authorities via Batch report |
4 | Request to cancel rejected; check the reason | A | Numbering will be done via batch report - no action required |
5 | Request to skip rejected; check the reason | B | Sending will be done via batch report - no action required |
D: J_1BNFE_ACTIVE-DOCSTA - "NF-e: Document Status"
Code | Description |
---|---|
| Waiting for Response |
1 | Authorized |
2 | Rejected |
3 | Denied |
S: J_1BNFE_ACTIVE-SCSSTA - "NF-e: System Communication Status"
Code | Description | Code | Description |
---|---|---|---|
| Not sent | 6 | Request to Cancel Rejected |
0 | Sent to Messaging System (XI,...) | 7 | Request to Skip Rejected |
1 | Authorized and Author. for Cancellation Requested | 8 | Rejection to Cancel/Skip Accepted by User |
2 | Authorized and Cancellation Authorized | 9 | Validation Error and Skipping Requested |
3 | Rejected and Author. for Skipping Requested | A | Validation Error and Skipping Authorized |
4 | Rejected and Skipping (Cancel) Authorized | B | Validation Error and Skipping Rejected |
5 | Switched to Contingency/Canceled Prior to Author. |
|
|
M: J_1BNFE_ACTIVE-MSSTAT - "NF-e: Status from Messaging System"
Code | Description |
---|---|
A | MS Received: Request for Authorization |
B | MS Received: Cancellation Request |
C | MS Received: Skipping Request |
G | MS Received: Other MS Error |
V | MS Received: Internal Validation Error |
CR: J_1BNFE_ACTIVE-CALLRFC - "Control NF-e No. and RFC Execution to Messaging System"
Code | Description |
---|---|
| RFC execution and database update in the same LUW (default) |
1 | Numbering and RFC triggered via the Monitor Report (J1BNFE) |
2 | Numbering in Monitor Report - RFC via batch report |
3 | Numbering and RFC triggered via Batch report (J_BNFECALLRFC) |
SC1: J_1BNFE_ACTIVE-CODE - "NF-e: Status Code" - Customizing - See "Manual do Contribuinte".
SC2: /XNFE/NFEHD-STATCOD e /XNFE/BATSTA-STATCOD - "Status Code for NF-e Processing by Authority (SEFAZ)" - Customizing - See "Manual do Contribuinte".
C: J_1BNFE_ACTIVE-CANCEL - "Canceled"
CA: J_1BNFE_ACTIVE-CANCEL_ALLOWED - "NF-e: Cancellation is allowed by authorities (flag)"
CPA: J_1BNFE_ACTIVE-CANCEL_PA - "NF-e: Cancel Prior to Authorization"
SW: J_1BNFE_ACTIVE-CONTING_S - "NF-e Switched to Contingency"
WS: /XNFE/NFE_HIST-WASSTAT - "NF-e Overall Status in Messaging System"
Code | Description |
---|---|
01 | Received from Feeder System |
02 | Sent to Signature Service |
03 | Signed |
04 | Added to Batch |
05 | Result Received |
06 | Sent to Authorities |
07 | NF-e Data Re-Requested |
08 | Sent to B2B |
09 | Sending to B2B |
DS: /XNFE/NFEHD-DOCSTAT - "NF-e Document Status (Feeder System)"
Code | Description |
---|---|
1 | Authorization of NF-e |
2 | Rejection of NF-e |
3 | Denial of NF-e |
4 | Authorization to Cancel Authorized NF-e |
5 | Authorization to Cancel Rejected NF-e (Skip) |
6 | Rejection of Request to Cancel |
7 | Rejection of Request to Skip |
A | MS Received: Request for Authorization |
B | MS Received: Cancellation Request |
C | MS Received: Skipping Request |
ES: /XNFE/NFE_HIST-ERROR_STATUS - "Error Status"
Code | Description | Code | Description |
---|---|---|---|
01 | PI unreachable | 53 | Signature cancellation: PI system error |
10 | Validation error | 54 | Signature cancellation: PI application error |
20 | Signature service unreachable | 55 | Signature skipping: PI system error |
21 | Certificate expired | 56 | Signature skipping: PI application error |
22 | Version not maintained in table /XNFE/SRVSTA | 57 | Gap status rejected by ERP due to status error |
23 | Version not maintained in table /XNFE/XMLVERS | 58 | Gap status rejected by ERP due to ID error |
24 | NF-e signature: PI system error | 60 | Scan signature: Signature service unreachable |
25 | NF-e signature: PI application error | 61 | Scan signature: Certificate expired |
26 | Key storage data not maintained in table /XNFE/TCNPJ | 62 | Scan signature: Version missing in table /XNFE/SRVSTA |
27 | Entries not maintained in Table /XNFE/TSRV | 63 | Scan signature: Version missing in table /XNFE/XMLVERS |
28 | Signature error | 64 | Scan signature: PI system error |
31 | Batch already processed (according to SEFAZ) | 65 | Scan signature: PI application error |
32 | Batch in process (according to SEFAZ) | 66 | SCAN: Key storage data missing in table /XNFE/TCNPJ |
33 | SEFAZ unreachable | 67 | SCAN: Entries not maintained in /XNFE/TSRV |
34 | SCAN unreachable | 68 | SCAN: Signature error |
35 | SCAN signature incorrect | 70 | Error from the authorities |
36 | Batch: PI system error | 71 | Rejected by authorities |
37 | Batch: PI application error | 72 | Usage rejected by authorities |
38 | Batch: Web service unreachable | 73 | Error in official communiation (such as certificate issues) |
40 | Batch status query: PI system error | 74 | Incomplete/incorrect XML document from the authorities |
41 | Batch status query: PI application error | 75 | SEFAZ: An unexpected technical problem occurred |
42 | Maximum number of queries reached | 80 | Service status: PI system error |
43 | Batch not found | 81 | Service status: PI application error |
44 | Other SEFAZ error message | 82 | Service status: Other error |
45 | B2B recipient unreachable | 90 | Status check: PI system error |
46 | Batch rejected by authorities | 91 | Status check: PI application error |
50 | Cancel/skip: PI system error | 92 | B2B: PI system error |
51 | Cancel/skip: PI application error | 93 | B2B: PI application error |
52 | Cancel/skip: Other SEFAZ error |
|
|
T: /XNFE/NFE_HIST-TYPE - "NF-e Type"
Code | Description |
---|---|
1 | NF-e |
2 | Cancel NF-e |
3 | Skip NF-e |
BS: /XNFE/BAT_HIST-BATSTAT - "NF-e: Status History for Batches"
Code | Description |
---|---|
01 | Batch Created |
02 | Sent to PI |
03 | Sent to Authorities |
04 | Request Sent |
05 | Result Received |
06 | SCAN Signature Started |
07 | Batch in Process |