Process to Obtain FCI Numbers from SEFAZ

To obtain FCI numbers from SEFAZ and update your item records with the FCI number, complete these steps:

  1. Populate the register tables for the FCI text files.

    Run the FCI TXT File Generation by Item (R76B0070) and FCI TXT File Generation by Item/Branch (R76B0071) programs in final mode to write item data to the FCI TXT File Process Header Blocks (F76B0070), FCI TXT File Process Detail Blocks table (F76B0071), Text Processor Header (F007101) and Text Processor Detail (F007111) tables.

    See Populating the FCI Text File Register Tables

  2. Review the register tables.

    Use the FCI TXT File Process Blocks program (P76B0070) to review the batch and detailed data in the F76B0070 and F76B0071 tables.

    See Reviewing the FCI Register Tables and FCI Status

  3. Generate the text file to submit to SEFAZ.

    Select the batch in the FCI TXT File Process Blocks program and the Run the Text File Processor program (P007101) to copy the files from the Text Processor Header table (F007101) and Text Processor Detail Table (F007111) to the text file. The system updates the status of tables F76B0070, F76B0071, F007101 and F007111 to 1).

    The program groups the records into the blocks and fields as required.

    See Generating the Text Files to Submit to SEFAZ

  4. Send the files to SEFAZ.

    Note: Do not send additional files to SEFAZ until you receive the reply on the files sent.
  5. Review the status of the returned files with the FCI TXT File Process Blocks program (P76B0070). The status of the record must be Processed (outbound). Only one record should show as Processed.

    The SEFAZ file includes the FCI numbers for the item information that you sent.

    Run the Download FCI Information program (R76B0072) in proof mode to generate a PDF that you can review. The report displays the list of items with the FCI numbers. In proof mode, the program does not upload data to tables.

    See Uploading and Reviewing FCI Numbers Returned by SEFAZ

  6. Run the Download FCI Information program (R76B0072) in final mode to generate the PDF report that displays the list of items with the FCI numbers and update the Item Master Tag file F76411 (F76B4101) and Item Branch Tag file F76412 (F76B4102) tables with the FCI number for each item. You also update the Text Processor Header (F007101) table with the information from SEFAZ (Hash Code, Receipt Date, Receipt Code Validated Date, File Validation Indicator) and the Text Processor Detail (F007111) table with the FCI number and the File Validation Indicator for each item.

    The status of the file updates to Processed.

    See Uploading and Reviewing FCI Numbers Returned by SEFAZ

  7. Use the FCI TXT File Process Blocks (P76B0070) program to review the status of the returned files that you uploaded to the FCI TXT File Process Header Blocks (F76B0070) and FCI TXT File Process Detail Blocks (F76B0071) tables.

    See Uploading and Reviewing FCI Numbers Returned by SEFAZ

  8. Upload the FCI number to the item and item/branch tables.

    Run the Download FCI Information program (R76B0072) in final mode to update the F76B4101 table if you ran the FCI TXT File Generation by Item program to begin the process, and to update the F76B4102 table if you ran the FCI TXT File Generation by Item/Branch program to begin the process.

    See Uploading and Reviewing FCI Numbers Returned by SEFAZ