## (BRA) Working with Blocks, Registers, and Records for Electronic Tax Reporting for Ato COTEPE 70 of 2006

This chapter discusses how to:

- Set up blocks for tax reporting.

- Extract data for tax reporting.

- Review records generated by the extraction process.

- Join data into flat files.

### Setting Up Blocks for Tax Reporting

This section provides an overview of how to set up blocks for tax reporting and discusses how to set up blocks.

#### Understanding How to Set Up Blocks for Tax Reporting

Use the Electronic Reporting Block Setup program (P76B0530) to set up the batch programs (UBEs) and versions to run for each block. You set up versions of the UBEs that are provided by Oracle and can also set up versions of the custom UBEs that you create to generate blocks or populate registers for data that does not reside in JD Edward EnterpriseOne software.

When you set up the blocks, you must specify the UBE and versions to run for each block, as well as the sequence number in which the system runs the batch programs.

Note. You must run some UBEs in a specific sequence. For example, you must run the UBEs for block 0 prior to running UBEs for any other blocks, so you must set the sequence number for the UBEs for block 0 at a lower sequence number than for other UBEs. Similarly, you must run the UBEs for block 9 and the join block process after you run the UBEs for all other blocks.

See (BRA) Understanding Blocks, Registers, and Records for Ato COTEPE 70 of 2006.

The system stores data about the setup in the Electronic Reporting Header Blocks (F76B0530) and Electronic Reporting Detail Blocks (F76B0531) tables.

#### Forms Used to Set Up Blocks

Form Name | FormID | Navigation | Usage
Work With Blocks Setup | W76B0530A | Extractor Process (G76B111X), Electronic Reporting Blocks Setup - BR | Review and select existing records for blocks.
Blocks Detail Revision | W76B0530B | Click Add on the Work With Blocks Setup form to create a new record. Alternatively, select an existing record on the Work With Blocks Setup form and click Select to modify an existing record. | Define new blocks or modify an existing block by entering or modifying information about the UBEs, versions, and sequencing for the block.

#### Setting Up Blocks

Access the Blocks Detail Revision form.

Required Y/N | Specify whether the block that you set up is required. Some blocks, such as 0 and 9, are required by the process. Some blocks might be required by government regulations.
Report Sequence | Enter the sequence in which the system runs the program.
Program ID | Enter the number of the program to run. You can enter the program ID of a batch program that is provided by Oracle for processing tax data or can enter the program ID of a batch program that you create to process tax data.
Version | Enter the version of the program that is entered in the Program ID field.

### Extracting Data for Tax Reporting

This section provides an overview of the extractor (administrator) process, lists prerequisites, and discusses how to:

- Add blocks.

- Extract data.

#### Understanding the Extractor Process

Use the Elec Rpt Extractor Process program (P76B0510) to run the UBEs for the blocks and extract data for tax reporting. You can select to run all of the blocks or to run only selected blocks. When you select a block to process, the system selects all of the UBEs for the block, assigns the same job number to all of the UBEs for all of the blocks selected, flags the records as processed, and uses a status code to indicate whether the records are queued for processing (waiting [W], in process [P], done [D], or an error occurred [E]).

The system includes all records for a job number in the flat file. If you run all of the blocks simultaneously, the system will assign the same job number to all blocks and UBEs. If you process blocks and UBEs separately, you must manually assign the job number to subsequent blocks and UBEs as you run them.

Important! The system groups the registers and records for blocks into a flat file based on the job number associated with block 0. If you run blocks separately from block 0, or rerun the UBEs, you must assign the job number from block 0 to the UBEs. Failure to assign the correct job number will result in inaccurate reporting.

Note. The system assigns the batch number to the records when you run the Electronic Reporting Join Blocks Process program (R76B0640), so this field is not populated for new records.

Create a new execution to have the system automatically insert in the grid the blocks and UBEs that were defined in the Electronic Reporting Block Setup program. For example, if you add a record for block B, the system reads the setup for block B in the Electronic Reporting Header Blocks (F76B0530) and Electronic Reporting Detail Blocks (F76B0531) tables and inserts records for each UBE that is set up for block B.

When you run the Elec Rpt Extractor Process program to extract data, the system writes data to the Electronic Reporting - Process Header (F76B05210) and Electronic Reporting Processing Details (F76B05211) tables.

#### Prerequisites

Many blocks require that you complete tasks before you process the records for the block.

- Before you generate records for block A, set processing options for Fiscal Note - Block A (R76B0530).

- Before you generate records for block B, block E, or block H, you must run all processes that are related to reporting fiscal books, including the following processes:

  - Enter all transactions.

  - Run the Nota Fiscal Conversion program (R76B200A).

  - Run the Integrity Report (R76B0001).

  - Maintain fiscal books records as necessary.

  - Print and review the fiscal books supplementary reports.

  - Generate and review fiscal books.

- Before you generate records for block E, set processing options for Fiscal Books Initial Process (R76B570).

- Before you generate records for block H:

  - Run the As Of Updating program (R41548).

  - Run the Item Ledger - As Of Record Generation program (R41542).

- Before you generate records for block I:

  - Enter and post all relevant general ledger transactions.

  - Verify that account types and a model business unit are set up and specified in the constants.

#### Forms Used to Add Blocks or Extract Data

Form Name | FormID | Navigation | Usage
Work With Electronic Reporting Process | W76B0510A | Ato Cotepe 70 - Brazil Electronic Report (G76B1113), Elec Rpt Extractor Process | Review or select existing records.
Electronic Reporting Process Revision | W76B0510B | Click Add on the Work With Electronic Reporting Process form. | Add blocks or extract data for the selected blocks.

#### Adding Blocks

Access the Electronic Reporting Process Revision form.

To add a new block:

1. Click Add on the Work With Electronic Reporting Process form.

2. If adding a block for a reporting range for which you have already created the block 0 records, enter the job number of the block 0 in the Job Number field.

   The system generates the job number when you add a block for block 0.

3. Complete the Start Date, End Date, and Company fields in the header area.

4. Enter the block number or letter in the Block field in the detail area and. click OK.

   The system provides values from the setup tables for all fields in the detail area except the Status field.

   Note. The system completes the Process? and Status fields after you extract data.

Job Number | Enter the job number for block 0 when adding a block for a reporting range for which you have already created the block 0 records. All blocks for which you report for a specific reporting range must have the same job number as the block 0 records. The system displays the system-assigned job number for block 0 records and for blocks that you ran simultaneously with block 0.
Company | Enter the address book number of the fiscal company.
Start Date | Enter the beginning of the date range for which you generate records.
End Date | Enter the end of the date range for which you generate records.
Status(header area) | In the header area, you can enter a status to search for records. Values are: D: Done E: Error P: Processing W: Waiting
Batch Number | The system assigns a batch number after you run the Electronic Reporting Join Blocks Process program (R76B0640) to populate the text file processor tables and generate the flat files. You can use the batch number to locate records that you have processed.
Processed | Enter the date on which the records were processed to search for records. The system displays the date on which records were processed when you search for records using the job number.
Block | Enter the block for which you want to run the UBEs. The system displays the block letter or number for previously processed records.
Required | The system displays a Y if the block was set up as a required block in the Electronic Reporting Detail Blocks table (F76B0531). You set up blocks by using the Electronic Reporting Block Setup program (P76B0530).
Program ID | The system displays the UBEs that are associated with the block as set up in the Electronic Reporting Detail Blocks table (F76B0531).
Version | The system displays the versions for the programs that are set up in the Electronic Reporting Detail Blocks table (F76B0531).
Status(detail area) | In the detail area, the system displays the status of records that are selected for processing. Values are: D: Done processing E: Error P: Processing W: Waiting for processing (records are in the queue to be processed)

#### Extracting Data

Access the Electronic Reporting Process Revision form.

To extract data:

1. Select the block from which to extract data.

2. Select Select Block from the Row menu.

   The system writes records to the F76B05210 and F76B05211 tables, indicates that the record is processed, and assigns a status to the record.

### Reviewing Records Generated by the Extraction Process

This section provides an overview of the output files and lists the forms used to review the output files.

#### Understanding the Output Files

Use the Elec Rpt Process - Crtl program (P76B0511) to review the output files that you generate when you run the Elec Rpt Extractor Process program (P76B0510).

The system displays the records for the registers that exist in the Electronic Reporting - Process Header (F76B05210) and Electronic Reporting Processing Details (F76B05211) tables. You can review these records before you run the Electronic Reporting Join Blocks Process program (R76B0640) to move the records to the text file processor tables.

Note. You only review records using the Elec Rpt Process - Crtl program. If you need to make changes, you must make the changes in the source tables.

#### Forms Use to Review Output Files

Form Name | FormID | Navigation | Usage
Work with Elec. Reporting Process | W76B0511B | Ato Cotepe 70 - Brazil Electronic Report (G76B1113), Elec Rpt Process - Crtl | Review and select existing processed batches.
Work With Output File | W76B0511A | Select a job number (Process ID), and click Select on the Work with Elec. Reporting Process form. | Review records from the registers that are used for tax reporting.

### Joining Data into Flat Files

This section provides an overview of the Electronic Reporting Join Blocks Process program (R76B0640) and discusses how to run the Electronic Reporting Join Blocks Process program.

#### Understanding the Electronic Reporting Join Blocks Process Program

Run the Electronic Reporting Join Blocks Process program to insert records into the text file processor tables and create the flat file that you send to the government. When you run the Electronic Reporting Join Blocks Process program, the system:

1. Reads the records in the Electronic Reporting – Process Header (F76B05210) and Electronic Reporting Processing Details (F76B05211) tables.

2. Generates the block 9 records.

3. Writes data to the Text Processor Header table (F007101) and Text Process Detail Table (F007111).

After you run the Electronic Reporting Join Blocks Process program, you use the Text File Processor program (P007101) to copy the text file to the media that you send to the government for tax reporting.

#### Running the Electronic Reporting Join Blocks Process Program

Select Block 9 and Join-Ctrl/Close (G76B1119), Electronic Reporting Join Blocks Process.