Go to primary content
Oracle® Retail Fiscal Management/RMS Brazil Localization Implementation Guide
Release 14.2
F29404-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

11 Maintaining Tax Related Data - TaxWeb

The batch overview provided in this chapter identifies the functional area description with the batch processes illustrated in the designs. This overview allows you to determine how a business function works behind the scenes.

Batch designs describe how, on a technical level, an individual batch module works and the database tables that it affects. In addition, batch designs contain file layout information that is associated with the batch process.

This chapter covers the following topics:

TaxWeb Tax Rules Integration and Maintaining Batches

fmtaxchg (Tax Changing Process)

Module Name fmtaxchg.pc
Description
Functional Area Tax changing Process
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

Use this batch program to process the item/location records affected by tax change.

The fmtaxchg RFM batch processes the records from FM_TAXCHG_HEADER and FM_TAXCHG_DETAIL tables with 'U' un-processed or 'E' error status.

The major functionality of this batch program is divided into the following three steps:

  1. Making a call to RMS packaged function L10N_BR_WACADJ_SQL.WAC_UPDATE to update WAC and TRAN_DATA postings for cost variance. In case of unhandled exceptions and package errors, the batch stops further processing and an error is reported in error file.

  2. Making a call to FM_T_EXT_TAXES_SQL and FM_S_EXT_TAXES_SQL with taxchg_ids for locations having control_rec_st_ind set to 'Y' in V_FISCAL_ATTRIBUTES, to update the ST history in MTR tables. In case of unhandled exceptions and package errors, the batch stops further processing and an error is reported in error file.

The STATUS column is updated to 'A' in FM_TAXCHG_HEADER table of WAC and ST history tables if the records are updated successfully.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme Multi-Threaded based on taxchg_id

Restart/Recovery

The logical unit of work is taxchg_id.

Key Tables Affected

Tables Select Insert Update Delete
FM_TAXCHG_HEADER Yes No Yes No
FM_TAXCHG_DETAIL Yes No No No
V_FM_RESTART_TAXCHG Yes No No No
V_FISCAL_ATTRIBUTES Yes No No No

fmtaxupld (Tax Change Upload)

Module Name fmtaxupld.pc
Description
Functional Area WAC and Substituição Tributária (ST) history update
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

Use this batch program to upload the 'Tax Change Upload' input file consisting of tax rule changes into the system for processing purpose.

FMTAXUPLD.PC is a Pro*C program that runs as a module in Adhoc. The purpose is to upload and process Tax Change input file consisting of tax rule changes. The module accepts Tax Change data contained in a flat file (ASCII text) and formatted to match the prescribed retail input file format.

All items are validated, FMTAXUPLD.PC writes a row into the FM_STG_TAXCHG_DTL table.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing Fmtaxupld post
Threading Scheme N/A

Restart/Recovery

Since this is a file-based upload, file-based restart/recovery logic is applied. The commit_max_ctr field should be set to prevent excessive rollback space usage, and to reduce the overhead of file I/O.

Key Tables Affected

Tables Select Insert Update Delete
FM_STG_TAXCHG_DTL No Yes No Yes
ITEM_MASTER Yes No No No
ITEM_LOC_SOH Yes No No No
SYSTEM_OPTIONS Yes No No No
WH Yes No No No

Input File

The input file name is not fixed, and it is determined by a run time parameter. Records rejected by the import process are written to a reject file. The reject file name is not fixed, and it is determined by a run time parameter.

Record Name Field Name Field Type Default Value Description
FHEAD File record descriptor Char (5) FHEAD It describes the file line type.

Line number Number (10) 0000000001 it is a sequential file line number.

File Type Char (4) TXUP It is the Tax change Upload.

File create date Char (14)
It is YYYYMMDDHH24MISS format.
FDETL File record descriptor Cha r(5) FDETL It describes the file line type.

Line number Number (10)
It is the sequential file line number.

Action Type Char (1)
Following is the type of mode: 'I'nsert or 'D'elete

NF number Number (15)
The NF number is used only for delete scenario.

Series No Char (20)
The series number is used only for delete scenario.

Item Char (25)
It is the item number.

Location_id Number (10)
It is the location ID.

Location_type Char (1)
Following is the type of location: 'S'tore or 'W'arehouse

Quantity Number (12)
Quantity * 10000 (4 implied decimal places), quantity of item at that location. It is used to update the MTR history tables.

Unit cost Number (20)
Unit cost * 10000 (4 implied decimal places), Unit cost of the item. It is assumed that it will be in location currency.

ICMS unit amount Number (20)
Imposto Sobre Circulação de Mercadorias e Serviços (ICMS) unit amount * 10000 (4 implied decimal places), ICMS amount changed per unit. It is assumed that it will be in location currency.

ICMSST unit amount Number (20)
ICMSST unit amount * 10000 (4 implied decimal places), ICMSST amount changed per unit. It is assumed that it will be in location currency.

ICMSST Base Value Number (20)
ICMSST Base Value* 10000 (4 implied decimal places), ICMSST Base value per unit for the item. It is assumed that it will be in location currency.

ICMSSTE unit amount Number (20)
ICMSSTE unit amount * 10000 (4 implied decimal places), ICMSSTE amount changed per unit. It is assumed that it will be in location currency

ICMSSTE Base Value Number (20)
ICMSSTE Base Value * 10000 (4 implied decimal places), ICMSSTE Base value per unit for the item. It is assumed that it will be in location currency.

New average cost Number (20)
New average cost * 10000 (4 implied decimal places), New average cost of the item after tax law change. It is assumed that it will be in location currency.
FTAIL File record descriptor Char (5) FTAIL It describes the file record type.

Line number Number (10)
It is a sequential file line number (total number of lines in the file).

Number of detail records Number (10)
It is the number of FDETL lines in the file.

l10n_br_exec_tax_recalc

Module Name l10n_br_exec_tax_recalc.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch job deals with executing fiscal entity reclass transactions for that day. This logic is performed on the effective date of the fiscal entity reclassification. This consists of updating the cost fields on ITEM_SUPP_COUNTRY_LOC, ITEM_SUPP_COUNTRY and updating the localization extension tables with the new fiscal attribute values.

The work is done in the L10N_BR_T_EXEC_RECLASS_SQL package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Daily
Scheduling Considerations Phase 3
Pre-Processing l10n_br_fiscal_item_reclass_cost.ksh
Post-Processing sccext.pc
Threading Scheme Not applicable

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
COST_TAX_RECALC Yes No Yes Yes
ITEM_COST_HEAD Yes No No No
COUNTRY_ATTRIB Yes No No No
MV_L10N_ENTITY Yes No No No
ITEM_SUPP_COUNTRY_LOC Yes No Yes No
ITEM_SUPP_COUNTRY Yes No No No
STORE_L10N_EXT Yes Yes Yes No
L10N_BR_T_RECLASS_ENTITY Yes No No No
WH_L10N_EXT Yes Yes Yes No
PARTNER_L10N_EXT Yes Yes Yes No
SUPS_L10N_EXT Yes Yes Yes No
L10N_BR_RECLASS_ENTITY_NV Yes No No No
L10N_ATTRIB Yes No No No
L10N_ATTRIB_GROUP Yes No No No
EXT_ENTITY Yes No No No
ITEM_COST_HEAD Yes Yes Yes No
ITEM_COST_DETAIL Yes Yes Yes Yes

l10n_br_fiscal_item_reclass_cost

Module Name l10n_br_fiscal_item_reclass_cost.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module creates cost changes for all item/supplier/origin country/location combinations that are affected by fiscal item reclassifications. The normal cost change processes will then take care of updating RMS with the new tax law information when necessary. If the default location is not ranged to an item being reclassified, the ITEM_COST_HEAD and ITEM_COST_DETAIL tables are handled directly.

This batch stores and maintains data that comes from the external tax engine like the TaxWeb Tax Rules.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations
Pre-Processing N/A
Post-Processing N/A
Threading Scheme

Restart/Recovery

Not applicable

Key Tables Affected

Table Select Insert Update Delete
GTAX_COST_CHANGE_GTT Yes Yes Yes No
L10N_BR_FISCAL_RECLASS Yes No No No
ITEM_SUPP_COUNTRY_LOC Yes No No No
ITEM_MASTER Yes No No No
ADDR Yes No No No
FUTURE COST TABLES Yes Yes Yes Yes
ITEM_COST_HEAD Yes Yes Yes No
MV_L10N_ENTITY Yes No No No
COUNTRY_ATTRIB Yes No No No
ITEM_SUPP_COUNTRY Yes No No No
ITEM_COST_DETAIL Yes Yes Yes No
SYSTEM_OPTIONS Yes No No No
SUPS Yes No No No
COST_SUSP_SUP_HEAD No Yes No No
COST_SUSP_SUP_DETAIL_LOC No Yes No No
COST_EVENT_RUN_TYPE_CONFIG Yes No No No
COST_EVENT No Yes No No
ITEM_COST_DETAILS No No No Yes
STORE Yes No No No
WH Yes No No No
partner Yes No No No
L10N_TAX_OBJECT_CONFIG Yes No No No
VAT_ITEM Yes No No No

l10n_br_fiscal_loc_reclass_cost

Module Name l10n_br_fiscal_loc_reclass_cost.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module deals with processing cost logic of an entity fiscal entity reclassification. This consists of identifying the effected item/supp/country/loc rows, creating the new cost_tax_recalc records and sending them to the cost engine. This logic is preformed when the fiscal entity reclass is initially created.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL.FISCAL_LOC_RECLASS_COST package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Daily
Scheduling Considerations Phase 1
Pre-Processing l10n_br_fiscal_loc_reclass_retail.ksh
Post-Processing None
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
COST_TAX_RECALC Yes Yes No No
ITEM_COST_HEAD Yes No No No
COUNTRY_ATTRIB Yes No No No
MV_L10N_ENTITY Yes No No No
ITEM_SUPP_COUNTRY_LOC Yes No Yes No
ITEM_SUPP_COUNTRY No No No No
L10N_BR_T_RECLASS_ENTITY Yes No Yes No
COST_EVENT No Yes No No

l10n_br_fiscal_loc_reclass_retail

Module Name l10n_br_fiscal_loc_reclass_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module allows for recalculation of tax based on the changed fiscal attribute for store/warehouse/partner/supplier entities.

This consists of identifying the effected item/loc rows, calling the tax engine, and updating POS_MODS_TAX_INFO and GTAX_ITEM_ROLLUP. This logic is performed when the fiscal entity reclass is initially created.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL.FISCAL_LOC_RECLASS_EXTAX_SETUP package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Daily
Scheduling Considerations Phase 1
Pre-Processing None
Post-Processing l10n_br_fiscal_loc_reclass_cost.ksh
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_FISCAL_RECLASS Yes No No No
ITEM_LOC Yes No No No
ITEM_MASTER Yes No No No
V_PACKSKU_QTY Yes No No No
L10N_BR_T_RECLASS_ENTITY Yes No No No
L10N_BR_T_EXTAX_STG_RETAIL No Yes No No
ITEM_SUPP_COUNTRY Yes No No No
GTAX_ITEM_ROLLUP Yes Yes No No
ITEM_SUPP_COUNTRY_DIM Yes No No No

l10n_br_fiscal_reclass_item_finish_retail

Module Name l10n_br_fiscal_reclass_item_finish_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module picks up the group level tax call results that l10n_br_fiscal_reclass_item_process_retail.ksh places on L10N_BR_T_EXTAX_RES_RETAIL and L10N_BR_T_EXTAX_RES_RETAIL_DET and explodes them back to the item/location level. It then uses the item/location level information to write tax information to GTAX_ITEM_ROLLUP and POS_MODS_TAX_INFO tables.

This batch stores and maintains data that comes from the external tax engine like the TaxWeb Tax Rules.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing l10n_br_fiscal_reclass_item_process_retail.ksh
Post-Processing l10n_br_fiscal_item_reclass_cost.ksh
Threading Scheme Not applicable

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_T_EXTAX_HELP_RTL_GTT Yes Yes No No
ITEM_LOC Yes No No No
ITEM_MASTER Yes No No No
ITEM_SUPP_COUNTRY Yes No No No
ITEM_SUPP_COUNTRY_DIM Yes No No No
L10N_BR_T_EXTAX_RES_RETAIL Yes No No No
L10N_BR_FISCAL_RECLASS Yes No Yes No
L10N_BR_T_EXTAX_DEST_GRP_HELP Yes No No No
V_BR_ITEM_FISCAL_ATTRIB Yes No No No
L10N_BR_EXTAX_HELP_NV_PAIR Yes No No No
ITEM_LOC Yes No No No
ITEM_MASTER Yes No No No
V_PACKSKU_QTY Yes No No No
GTAX_ITEM_ROLLUP No Yes Yes No
POS_MODS_TAX_INFO No Yes Yes No
L10N_BR_T_EXTAX_RES_RETAIL_DET Yes No No No
L10N_BR_FISCAL_RECLASS_NV Yes No No No
L10N_ATTRIB Yes No No No
L10N_ATTRIB_GROUP Yes No No No
EXT_ENTITY Yes No No No
ITEM_COUNTRY_L10N_EXT No Yes Yes No

l10n_br_fiscal_reclass_item_process_retail

Module Name l10n_br_fiscal_reclass_item_process_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module picks the staged groups placed on L10N_BR_T_EXTAX_STG_RETAIL by l10n_br_fiscal_reclass_item_setup_retail.ksh and calls the external tax provider with them. The results of these calls are placed in the L10N_BR_T_EXTAX_RES_RETAIL and L10N_BR_T_EXTAX_RES_RETAIL_DET tables.

This batch stores and maintains data that comes from the external tax engine like the TaxWeb Tax Rules.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing l10n_br_fiscal_reclass_item_setup_retail.ksh
Post-Processing l10n_br_fiscal_reclass_item_finish_retail.ksh
Threading Scheme Not applicable

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
RETAIL_SERVICE_REPORT_URL Yes No No No

l10n_br_fiscal_reclass_item_setup_retail

Module Name l10n_br_fiscal_reclass_item_setup_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module looks at all the valid item/location combinations in RMS for items having their fiscal attributes changed. It determines the unique fiscal attribute groups that cover all the item/locations combinations and puts the groups on a stage table (L10N_BR_T_EXTAX_STG_RETAIL).

This batch stores and maintains data that comes from the external tax engine like the TaxWeb Tax Rules.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing None
Post-Processing l10n_br_fiscal_reclass_item_process_retail.ksh
Threading Scheme Not applicable

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_T_EXTAX_STG_RETAIL Yes Yes Yes Yes
L10N_BR_T_EXTAX_RES_RETAIL No No No Yes
L10N_BR_T_EXTAX_RES_RETAIL_DET No No No Yes
V_BR_T_STORE Yes No No No
L10N_BR_ENTITY_CNAE_CODES Yes No No No
V_BR_T_PARTNER Yes No No No
V_BR_T_WH Yes No No No
WH Yes No No No
L10N_BR_SUP_TAX_REGIME Yes No No No
ADDR Yes No No No
COUNTRY_TAX_JURISDICTION Yes No No No
COUNTRY Yes No No No
STATE Yes No No No
L10N_BR_EXTAX_HELP_NV_PAIR Yes Yes Yes Yes
L10N_BR_T_EXTAX_DEST_GRP_HELP Yes Yes Yes Yes
EXT_ENTITY Yes No No No
L10N_ATTRIB_GROUP Yes No No No
L10N_ATTRIB Yes No No No
L10N_BR_FISCAL_RECLASS Yes Yes No No
ITEM_LOC Yes No No No
ITEM_MASTER Yes No No No
ITEM_SUPP_COUNTRY Yes No No No
ITEM_SUPP_COUNTRY_DIM Yes No No No
V_PACKSKU_QTY Yes No No No
L10N_BR_T_TAX_CALL_STAGE_ROUTE Yes No No No
V_BR_ITEM_FISCAL_ATTRIB Yes No No No
V_BR_T_SUPS Yes No No No
V_BR_ITEM_COUNTRY_ATTRIBUTES Yes No No No

l10n_br_refresh_extax_finish_retail

Module Name l10n_br_refresh_extax_finish_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module picks the group level tax call results that l10n_br_refresh_extax_process_retail.ksh places on L10N_BR_T_EXTAX_RES_RETAIL and L10N_BR_T_EXTAX_RES_RETAIL_DET tables and explodes them back to the item/location level. It then uses the item/location level information to write tax information to GTAX_ITEM_ROLLUP and POS_MODS_TAX_INFO tables.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing l10n_br_refresh_extax_process_retail.ksh
Post-Processing None
Threading Scheme Not applicable

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_EXTAX_REFRESH_CONFIG No No Yes No
L10N_BR_T_EXTAX_HELP_RTL_GTT Yes Yes No No
ITEM_LOC Yes No No No
ITEM_MASTER Yes No No No
ITEM_SUPP_COUNTRY Yes No No No
ITEM_SUPP_COUNTRY_DIM Yes No No No
L10N_BR_T_EXTAX_RES_RETAIL Yes No No No
L10N_BR_T_EXTAX_DEST_GRP_HELP Yes No No No
V_BR_ITEM_FISCAL_ATTRIB Yes No No No
L10N_BR_EXTAX_HELP_NV_PAIR Yes No No No
V_PACKSKU_QTY Yes No No No
GTAX_ITEM_ROLLUP No Yes Yes No
POS_MODS_TAX_INFO No Yes Yes No
L10N_BR_T_EXTAX_RES_RETAIL_DET Yes No No No
V_BR_ITEM_COUNTRY_ATTRIBUTES Yes No No No

l10n_br_refresh_extax_future_cost

Module Name l10n_br_refresh_extax_future_cost.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module obtains a list of fiscal attributes that have tax law changes scheduled against them since its last run. It then uses this information to determine what item/supplier/origin country/locations are affected by those scheduled tax law changes. These item/supplier/origin country/location combinations are then used to create new cost changes on the date of their tax law changes. The normal cost change processes then take care of updating RMS with the new tax law information when necessary.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing None
Post-Processing None
Threading Scheme Not applicable

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_EXTAX_REFRESH_CONFIG Yes No No No
L10N_BR_T_TAX_CALL_RES_FSC_CNT Yes No No Yes
L10N_BR_EXTAX_REFRESH_COST Yes Yes No Yes
V_BR_T_STORE Yes No No No
L10N_BR_ENTITY_CNAE_CODES Yes No No No
V_BR_T_PARTNER Yes No No No
V_BR_T_WH Yes No No No
WH Yes No No No
V_BR_T_SUPS Yes No No No
L10N_BR_SUP_TAX_REGIME Yes No No No
ADDR Yes No No No
COUNTRY_TAX_JURISDICTION Yes No No No
COUNTRY Yes No No No
STATE Yes No No No
L10N_BR_EXTAX_HELP_NV_PAIR Yes Yes Yes Yes
L10N_BR_T_EXTAX_DEST_GRP_HELP Yes Yes Yes Yes
L10N_ATTRIB Yes No No No
L10N_ATTRIB_GROUP Yes No No No
EXT_ENTITY Yes No No No
L10N_BR_T_TAX_CALL_STG_FSC_FDN Yes Yes No Yes
L10N_BR_T_TAX_CALL_STAGE_ROUTE Yes Yes No Yes
RETAIL_SERVICE_REPORT_URL Yes No No No
L10N_BR_T_TAX_CALL_STAGE_RMS Yes No No Yes
L10N_BR_T_TAX_CALL_RES_TAXCNTR Yes No No Yes
L10N_BR_T_TAX_CALL_RES_SRVCPRD Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ECO_CLS Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ITM_RL Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ITM_TAX Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ITM Yes No No Yes
L10N_BR_T_TAX_CALL_RES Yes No No Yes
L10N_BR_T_TAX_STAGE_ECO Yes No No Yes
L10N_BR_T_TAX_STAGE_FIS_ENTITY Yes No No Yes
L10N_BR_T_TAX_STAGE_ITEM Yes No No Yes
L10N_BR_T_TAX_STAGE_NAME_VALUE Yes No No Yes
L10N_BR_T_TAX_STAGE_ORDER Yes No No Yes
L10N_BR_T_TAX_STAGE_ORDER_EXP Yes No No Yes
L10N_BR_T_TAX_STAGE_ORDER_INFO Yes No No Yes
L10N_BR_T_TAX_STAGE_REGIME Yes No No Yes
L10N_BR_T_TAX_CALL_RES_FSC_FND Yes No No Yes
L10N_BR_EXTAX_REFRESH_GTT Yes Yes No Yes
GTAX_COST_CHANGE_GTT Yes Yes Yes No
ITEM_MASTER Yes No No No
ITEM_SUPP_COUNTRY_LOC Yes No No No
COST_SUSP_SUP_HEAD No Yes No No
COST_SUSP_SUP_DETAIL_LOC No Yes No No
COST_EVENT_COST_CHG Yes Yes No No
COST_EVENT Yes Yes No No
COST_EVENT_RESULT Yes No No No
COST_EVENT_RUN_TYPE_CONFIG Yes No No No
L10N_BR_FISCAL_RECLASS_NV Yes No No No
L10N_BR_FISCAL_RECLASS Yes No No No
VAT_CODES Yes No No No
COUNTRY_ATTRIB Yes No No No
FM_SYSTEM_OPTIONS Yes No No No
L10N_BR_T_EXTAX_STG_COST Yes No No No
L10N_BR_T_EXTAX_RES_COST No Yes No No
V_BR_ITEM_FISCAL_ATTRIB Yes No No No
ITEM_SUPPLIER Yes No No No
ITEM_LOC Yes No No No
COST_EVENT_DEAL Yes No No No
COST_EVENT_RESULT No Yes No No

l10n_br_refresh_extax_process_retail

Module Name l10n_br_refresh_extax_process_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module picks the staged groups placed in the staging table L10N_BR_T_EXTAX_STG_RETAIL by l10n_br_refresh_extax_setup_retail.ksh and calls the external tax provider with them. The results of these calls are placed on the staging L10N_BR_T_EXTAX_RES_RETAIL and L10N_BR_T_EXTAX_RES_RETAIL_DET tables.

The work is done in the L10N_BR_T_EXTAX_MAINT_SQL package.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing l10n_br_refresh_extax_setup_retail.ksh
Post-Processing l10n_br_refresh_extax_finish_retail.ksh
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
RETAIL_SERVICE_REPORT_URL Yes No No No
L10N_BR_T_TAX_CALL_STAGE_ROUTE Yes No No No
VAT_CODES Yes No No No
L10N_BR_T_EXTAX_STG_RETAIL Yes No No No
L10N_BR_EXTAX_HELP_NV_PAIR Yes No No No
L10N_BR_T_EXTAX_RES_RETAIL No Yes No No
L10N_BR_T_EXTAX_RES_RETAIL_DET No Yes No No

l10n_br_refresh_extax_setup_retail

Module Name l10n_br_refresh_extax_setup_retail.ksh
Description
Functional Area TaxWeb Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module obtains a list of fiscal attributes that have tax law changes scheduled against them since the last run. It then uses this information to determine what item/locations are affected by those scheduled tax law changes. It determines the unique fiscal attribute groups that cover those item/locations combinations and puts the groups on a stage table (L10N_BR_T_EXTAX_STG_RETAIL).

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Phase 1
Pre-Processing N/A
Post-Processing l10n_br_refresh_extax_process_retail.ksh
Threading Scheme N/A

Restart/Recovery

N/A

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_EXTAX_REFRESH_CONFIG Yes No No No
L10N_BR_T_TAX_CALL_RES_FSC_CNT Yes No No No
L10N_BR_EXTAX_REFRESH_RETAIL Yes Yes No Yes
L10N_BR_T_EXTAX_STG_RETAIL Yes Yes No Yes
L10N_BR_T_EXTAX_RES_RETAIL No No No Yes
L10N_BR_T_EXTAX_RES_RETAIL_DET No No No Yes
L10N_BR_T_TAX_CALL_STG_FSC_FDN Yes Yes No Yes
L10N_BR_T_TAX_CALL_STAGE_ROUTE Yes Yes No No
RETAIL_SERVICE_REPORT_URL Yes No No No
L10N_BR_T_TAX_CALL_STAGE_RMS Yes No No Yes
L10N_BR_T_TAX_CALL_RES_TAXCNTR Yes No No Yes
L10N_BR_T_TAX_CALL_RES_SRVCPRD Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ECO_CLS Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ITM_RL Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ITM_TAX Yes No No Yes
L10N_BR_T_TAX_CALL_RES_ITM Yes No No Yes
L10N_BR_T_TAX_CALL_RES Yes No No Yes
L10N_BR_T_TAX_STAGE_ECO Yes No No Yes
L10N_BR_T_TAX_STAGE_FIS_ENTITY Yes No No Yes
L10N_BR_T_TAX_STAGE_ITEM Yes No No Yes
L10N_BR_T_TAX_STAGE_NAME_VALUE Yes No No Yes
L10N_BR_T_TAX_STAGE_ORDER Yes No No Yes
L10N_BR_T_TAX_STAGE_ORDER_EXP Yes No No Yes
L10N_BR_T_TAX_STAGE_ORDER_INFO Yes No No Yes
L10N_BR_T_TAX_STAGE_REGIME Yes No No Yes
L10N_BR_T_TAX_CALL_RES_FSC_FND Yes No No Yes
L10N_BR_EXTAX_REFRESH_GTT Yes Yes Yes Yes
V_BR_ITEM_FISCAL_ATTRIB Yes No No No
V_BR_T_STORE Yes No No No
L10N_BR_ENTITY_CNAE_CODES Yes No No No
V_BR_T_PARTNER Yes No No No
V_BR_T_WH Yes No No No
WH Yes No No No
V_BR_T_SUPS Yes No No No
L10N_BR_SUP_TAX_REGIME Yes No No No
ADDR Yes No No No
COUNTRY_TAX_JURISDICTION Yes No No No
COUNTRY Yes No No No
STATE Yes No No No
L10N_BR_EXTAX_HELP_NV_PAIR Yes Yes Yes Yes
L10N_BR_T_EXTAX_DEST_GRP_HELP Yes Yes Yes Yes
ITEM_MASTER Yes No No No
ITEM_LOC Yes No No No
ITEM_SUPP_COUNTRY Yes No No No
ITEM_SUPP_COUNTRY_DIM Yes No No No
V_PACKSKU_QTY Yes No No No
VAT_CODES Yes No No No
L10N_BR_T_TAX_CALL_RES_FSC_CNT No No No Yes
L10N_BR_T_TAX_CALL_STAGE_ROUTE No No No Yes
L10N_ATTRIB Yes No No No
L10N_ATTRIB_GROUP Yes No No No
EXT_ENTITY Yes No No No

l10nbr_taxweb_fisdnld (Taxweb Fiscal Download)

Module Name l10nbr_taxweb_fisdnld.pc
Description
Functional Area TaxWeb Integration
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch loads all fiscal attributes tables in ORFM from the external tax engine. If it is necessary to download or update a specific fiscal attribute, a parameter can be passed as input, but if it needs to download all of them, user can inform ALL as parameter.

For this batch, RTIL is used to retrieve the request to Taxweb Tax Engine to have latest updated fiscal attribute. The cutoff date to download the data from TaxWeb Tax Engine is fetched from field LAST_UPD_DATE in FISCAL_ATTRIB_UPDATES table. Each time this batch is executed, last execution date is updated in LAST_UPD_DATE field.

If any fiscal attributes are returned, they will be loaded (merged) to the corresponding table for that fiscal attribute. The tables loaded per attribute are as follows:

Attribute Loaded Table
NCM L10N_BR_NCM_CODES
NCM_CHAR_CODES L10N_BR_NCM_CHAR_CODES
NCM_IPI_CODES L10N_BR_NCM_IPI_CODES
NCM_PAUTA_CODES L10N_BR_NCM_PAUTA_CODES
FEDERAIL_SERVICE_CODES L10N_BR_FEDERAL_SVC_CODES
MASSERVICE_CODES L10N_BR_UNIFIED_SVC_CODES
CNAE_CODES L10N_BR_CNAE_CODES
CEST L10N_BR_NCM_CEST_CODES
NOP FM_NOP
ALL All above tables


Note:

A new attribute (CESTFULL) was created to maintain NCM and CEST codes relationship. When the batch is executed with this parameter, relationship table between NCM and CEST is refreshed when there are not exist in the TaxWeb integration.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations This program can run in ad-hoc basis whenever the new fiscal attributes needs to be downloaded from the TaxWeb Tax Engine.
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
L10N_BR_NCM_CODES Yes Yes Yes No
L10N_BR_NCM_CHAR_CODES Yes Yes Yes No
L10N_BR_NCM_PAUTA_CODES Yes Yes Yes No
L10N_BR_FEDERAL_SVC_CODES Yes Yes Yes No
L10N_BR_UNIFIED_SVC_CODES Yes Yes Yes No
L10N_BR_CNAE_CODES Yes Yes Yes No
FISCAL_ATTRIB_UPDATES Yes Yes No No
L10N_BR_T_TAX_CALL_STAGE_FSC_FDN Yes Yes No Yes
L10N_BR_T_TAX_CALL_STAGE_ROUTE Yes Yes No Yes
RETAIL_SERVICE_REPORT_URL Yes No No No
L10N_BR_T_TAX_CALL_RES_FSC_CNT No Yes No Yes
L10N_BR_T_TAX_CALL_RES_FSC_FND Yes Yes No Yes
FM_NOP No Yes Yes No
L10N_BR_NCM_IPI_CODES Yes Yes Yes No
L10N_BR_NCM_CEST_CODES Yes Yes Yes No

Financial Posting Batches

fmtrandata (FM Transaction Data)

Module Name fmtrandata.pc
Description
Functional Area Financial Postings
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

Computes transactional data based on the transaction codes.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme Multi-threaded based on location

Restart/Recovery

The logical unit of work is location_id and fiscal_doc_id.

Key Tables Affected

Tables Select Insert Update Delete
FM_TRAN_DATA No Yes No No
FM_FISCAL_DOC_HEADER Yes No Yes No
FM_TRAN_CODES Yes No No No

fmfinpost (FM Financial Posting)

Module Name fmfinpost.pc
Description
Functional Area Financial Postings
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

Rolls up the transaction amount into accounts based on general ledger.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
FM_GL_OPTIONS Yes No No Yes
FM_COA_SETUP Yes No No No
FM_SOB_SETUP Yes No No No
FM_ACCOUNT_SETUP Yes No No No
FM_DYNAMIC_SEGMENT_SETUP Yes Yes No No
FM_GL_CROSS_REF Yes Yes No No
FM_GL_DYNAMIC_ATTRIBUTES Yes Yes No No
FM_TRAN_DATA Yes No No No
FM_FISCAL_DOC_HEADER Yes No Yes No
FM_SCHEDULE Yes No Yes No
FM_AP_STAGE_HEAD Yes Yes No No
FM_AP_STAGE_DETAIL Yes Yes No No
STG_FIF_GL_DATA Yes Yes No No

import_SPED (SPED Batch)

Module Name Import_SPED.ksh
Description
Functional Area SPED
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch is used to post NF processed transactions (status = FP) into SPED staging tables for SPED (SPED - FM_SPED_FISCAL_DOC_HEADER and FM_SPED_FISCAL_DOC_DETAIL) reporting by Fiscal Partners.

It looks into the driving table, FM_SPED_LAST_RUN_DATE, for the last run date of SPED to fetch all closed NFs whose transaction amounts are also rolled up into ledger accounts based on gl_cross_ref in between last run date and sysdate from the main tables of ORFM. Once the records are successfully inserted, the batch updates the last _run_date date to sysdate.

It is recommended that run this batch job on a daily basis due to performance impacts. This batch has a pre-dependency on the ORFM Financial postings batch, so once this is completed and sets Nota Fiscal status to 'F'inancially 'P'osted (FP).

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations This program should run only after the successful completion of FMFINPOST.PC
Pre-Processing fmfinpost.pc
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
FM_FISCAL_DOC_HEADER Yes No No No
FM_FISCAL_DOC_DETAIL Yes No No No
FM_SCHEDULE Yes No No No
FM_FISCAL_DOC_TAX_HEAD Yes No No No
FM_FISCAL_DOC_TAX_DETAIL Yes No No No
FM_FISCAL_DOC_TAX_DETAIL_EXT Yes No No No
FM_FISCAL_UTILIZATION Yes No No No
FM_FISCAL_DOC_PAYMENTS Yes No No No
FM_SPED_FISCAL_DOC_HEADER No Yes No No
FM_SPED_FISCAL_DOC_DETAIL No Yes No No
ITEM_MASTER Yes No No No
FM_SPED_LAST_RUN_DATE Yes No Yes No
V_BR_ITEM_FISCAL_ATTRIB Yes No No No
V_FISCAL_ATTRIBUTES Yes No No No

Deal Income Postings Batch

Use this batch program to create NFs in Approved status.

fmdealinc (Deal Income Posting)

Module Name fmdealinc.pc
Description
Functional Area Deal income posting
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch program reads the data from RMS staging tables STAGE_FIXED_DEAL_HEAD, STAGE_FIXED_DEAL_DETAIL, STAGE_COMPLEX_DEAL_HEAD, and STAGE_COMPLEX_DEAL_DETAIL and creates the NFs in Approved status. If the NF creation fails for some fatal reason, the error is logged in the error file. This batch runs on a daily basis after vendinvc and vendinvf RMS batches.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing vendinvc and vendinvf RMS batches
Post-Processing N/A
Threading Scheme Multi-threaded based on deal_id

Restart/Recovery

The logical unit of work is Deal_id, Deal_detail_id, and location_id.

Key Tables Affected

Tables Select Insert Update Delete
FM_FIXED_DEAL_LOC_DEFAULT Yes No No No
STAGE_FIXED_DEAL_HEAD Yes No No No
STAGE_FIXED_DEAL_DETAIL Yes No No No
STAGE_COMPLEX_DEAL_HEAD Yes No No No
STAGE_COMPLEX_DEAL_DETAIL Yes No No No
TSF_ENTITY_ORG_UNIT_SOB Yes No No No
MV_L10N_ENTITY Yes No No No
SYSTEM_OPTIONS Yes No No No
FM_SYSTEM_OPTIONS Yes No No No
FM_FISCAL_DOC_HEADER Yes Yes No No
FM_FISCAL_DOC_DETAIL No Yes No No

ORFM Utility Batches

fm_async_queue_cleanup (cleanup queues from async ORFM batches)

Module Name fm_async_queue_cleanup.ksh
Description
Functional Area Queue cleanup
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch program keeps queues that manages asynchronous ORFM batches cleaned up.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
RMS_ASYNC_STATUS Yes No Yes No
RMS_ASYNC_RETRY Yes Yes No No

fm_batch_avg_sales_price (Tax Calculation of Legislation of MG state)

Module Name fm_batch_avg_sales_price.ksh
Description
Functional Area Calculation for average sales price for items
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch supports new legislation of state Minas Gerais (MG) for new calculation for average sales price for items.

This process should be executed monthly to calculate and store the unit average retail price for domestic sales to final consumers.

In general, this process should address:

  • Calculate and store the values of 'Unit Weighted Average Sales Price' per: (Item x Location) and (Item x State) for a specific period;

  • Should be scheduled to perform every month to calculate the values for some specific period (month/year). It could be reported (parameter) or deduced automatically.

    • Create a parameter to allow the user to inform the period to be processed:

      • For every new execution, if there is data for the period the pro-cess should delete all the data first and then start to calculate and store the new data.

      • If there is no period reported in the parameter, the schedule will execute the period preceding (mm/aaaa) the execution date.

Scheduling Constraints

Schedule Information Description
Processing Cycle At the end of RMS batch cycle (Daily).
Scheduling Considerations This program is scheduled once a month.
Pre-Processing N/A
Post-Processing N/A
Threading Scheme Location.

Restart/Recovery

N/A

Key Tables Affected

Tables Select Insert Update Delete
TRAN_DATA_HISTORY Yes No No No
FM_FISCAL_DOC_HEADER_HIST Yes No No No
FM_FISCAL_DOC_DETAIL_HIST Yes No No No
FM_FISCAL_DOC_HEADER Yes No No No
FM_FISCAL_DOC_DETAIL Yes No No No
FM_AVERAGE_SALES_PRICE Yes Yes Yes No

fm_batch_freclass_sql (ORFM Reclassification Process)

Module Name fm_batch_freeclass_sql.ksh
Description
Functional Area Reclassification
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch process fiscal attribute reclassification schedules marked as offline and ready to be processed.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Key Tables Affected

Tables Select Insert Update Delete
FM_FRECLASS_SCHEDULE Yes No Yes No
FM_FRECLASS_CONFIG Yes No No No
L10N_ATTRIB Yes No No No
FM_FRECLASS Yes No No No
ITEM_MASTER Yes No No No
FM_SYSTEM_OPTIONS Yes No No No
ITEM_COUNTRY No Yes Yes No
ITEM_SUPPLIER No No No No
ITEM_LOC No No No No
FM_FRECLASS_STG No Yes No Yes

fm_generate_nf_stkcount (Stock Count)

Module Name fm_generate_nf_stkcount.ksh
Description
Functional Area NF-e Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module creates a NF for inventory adjustment where there is some quantity discrepancy as result of general inventory process.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
FM_SYSTEM_OPTIONS Yes No No No
FM_FISCAL_DOC_HEADER No Yes No No
FM_FISCAL_DOC_DETAIL No Yes No No
FM_TRAN_DATA_HISTORY No Yes No No
FM_FISCAL_UTILIZATION Yes No No No
FM_UTIL_ADJUST_REASON Yes No No No
FM_STG_ADJUST_DTL Yes No No No

fm_reprocess_nf_status_f (Reprocess NF-e with status F)

Module Name fm_reprocess_nf_status_f.ksh
Description
Functional Area NF-e Integration
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module reprocesses all NF-e with status F (Post Sefaz Approve Error) to A (Approved).

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
FM_FISCAL_DOC_HEADER Yes No Yes No
FM_SCHEDULE Yes No Yes No

fm_stock_position (Stock Position)

Module Name fm_stock_position.ksh
Description
Functional Area
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This module provides information about a snapshot of the stock position in RMS in table FM_STOCK_POSITION. This process is asynchronous, and this execution is controlled by parameters.

  • Location

    • If executed without parameters, it will take the stock position snap-shot for all locations.

  • Data of Fiscal Documents

    • Business tables (default and always used)

    • History tables (optional depend on the parameter ('Y' or 'N'(default))

      • If choose 'Y' then Hot and Hist tables will be used;

      • If choose 'N' then only Hot Tables will be used.

Stock Owner (Retailer) - Stock Possession (Retailer)

The tables ITEM_MASTER and ITEM_LOC_SOH will be main source for the batch process.

  • ITEM_MASTER

    • status = 'A'

  • ITEM_LOC_SOH

    • item = item (ITEM_MASTER)

    • loc = <depending on the parameter informed in the schedule of the process>

    • loc_type = <depending on the parameter informed in the schedule of the process>

Stock Owner (Retailer) - Stock Possession (Third-Party)

This scenario is about stock in possession of a Third-Party and the stock owner is the Retailer. This search will cover all the active Items for the specific Org Unit / Location. Below is the rule to search and retrieve the data from the source tables:

  • ITEM_MASTER

    • Status = 'A'.

  • FM_FISCAL_DOC_HEADER (or HIST) / FM_FISCAL_DOC_DETAIL (or HIST) /

  • FM_FISCAL_UTILIZATION

    • Requisition Type = 'REP';

    • Status NF: A, C or FP;

    • Utilization mode type = 'EXIT';

    • item = item (ITEM_MASTER)

    • loc = <depending on the parameter informed in the schedule of the process>

    • loc_type = <depending on the parameter informed in the schedule of the process>

    • Requisition No.

  • TSFHEAD

    • Transfer Parent No = Requisition No (FM_FISCAL_DOC_DETAIL)

  • The search must group and total values for the data found using the functional key below.

    • ITEM

    • LOCATION

    • LOCATION_TYPE

    • PARTICIPANT

    • PARTICIPANT_TYPE

    • UNIT_COST

  • After grouping following the rule above, the totals should be calculated according to the formula below:

    • Quantity of Stock with Third-Party Possession =
      (sum(FM_FISCAL_DOC_DETAIL.QUANTITY for NF Exit Repairing) -
      (sum(FM_FISCAL_DOC_DETAIL.QUANTITY for NF Entry Repairing))

    • If there is no NF Entry Repairing related to the NF Exit Repairing, then to apply the formula above, the quantity for NF Entry Repairing should be considered as zero value ('0').

    • If the result of the formula above is greater than zero (>0), then a line register should be inserted in the table FM_STOCK_POSITION. It means that there is a remaining quantity of merchandise stock in possession of the Third-Party.

    • If the result of the formula above is NOT greater than zero (<=0), then a line register should NOT be inserted in the table FM_STOCK_POSITION. It means that there isn't a remaining quantity of merchandise stock in possession of the Third-Party.

Snapshot of Stock Position - Main Flow

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
WH Yes No No No
STORE Yes No No No
ITEM_MASTER Yes No No No
ITEM_LOC_SOH Yes No No No
PACKITEM_BREAKOUT Yes No No No
FM_SYSTEM_OPTIONS Yes No No No
FM_FISCAL_DOC_HEADER Yes No No No
FM_FISCAL_DOC_DETAIL Yes No No No
TSFHEAD Yes No No No
FM_STOCK_POSITION Yes Yes No No

fmedinf (NF EDI Batch)

Module Name fmedinf.pc
Description
Functional Area NF creation and searching for an item
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch is used to generate NF from EDI staging tables.

This EDI batch runs to create the NF from the entries in the EDI NF tables, in Worksheet status. This NF is not linked to any schedule. Errors can only be viewed in the error log file. A new column in the NF header table displays if the NF has been created manually or through the EDI batch process.

The FM_EDI_DOC_DETAIL table is modified to include a new field, called VPN. This field allows the user to specify the VPN number, if the user is not aware of the RMS item number.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme Multi-threaded based on Supplier

Restart/Recovery

The logical unit of work is Supplier and edi_doc_id.

Key Tables Affected

Tables Select Insert Update Delete
FM_EDI_DOC_HEADER Yes No Yes No
FM_EDI_DOC_DETAIL Yes No No No
FM_EDI_DOC_PAYMENT Yes No No No
FM_EDI_DOC_COMPLEMENT Yes No No No
FM_EDI_IMPORT_HEADER Yes No No No
FM_EDI_IMPORT_DETAIL Yes No No No
FM_FISCAL_IMPORT_HEADER Yes Yes No No
FM_FISCAL_IMPORT_DETAIL Yes Yes No No
FM_EDI_DOC_TAX_HEAD Yes No No No
FM_EDI_DOC_TAX_DETAIL Yes No No No
FM_FISCAL_DOC_HEADER Yes Yes No No
FM_FISCAL_DOC_DETAIL Yes Yes No No
FM_FISCAL_DOC_COMPLEMENT Yes Yes No No
FM_FISCAL_DOC_PAYMENTS Yes Yes No No
FM_FISCAL_DOC_TAX_HEAD No Yes No No
FM_FISCAL_DOC_TAX_DETAIL Yes Yes No No
FM_UTILIZATION_ATTRIBUTES Yes No No No
FM_FISCAL_DOC_TAX_HEAD_EXT Yes Yes No No
FM_FISCAL_DOC_TAX_DETAIL_EXT Yes Yes No No
FM_ERROR_LOG No Yes No Yes

fmmanifest (FM Manifest Batch)

Module Name fmmanifest.ksh
Description
Functional Area Fiscal Receiving
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch inserts in the FM_STG_NFE the record that indicates to the Partner DFe the "Manifestação do Destinatário SEFAZ" request for the "Operação Não Realizada" (status = NFE_C_P) and "Desconhecimento da Operação" (status = NFE_U_P) events.

Are eligible for the event "Operação Não Realizada": the fiscal documents that are in the FM_FISCAL_DOC_HEADER table inactive (status = I), and the fiscal document previews that are in the FM_IRL_STATUS table refused (status: 305- REFUSED BY DISAGREEMENT, 306 - REFUSED AUTOMATICALLY AFTER PRE-VALIDATION, 6- REFUSED RECEIVING or 802- PHYSICAL RECEIVING REFUSED).

Are eligible for the manifestation of the event "Desconhecimento da Operação" are the fiscal document previews that are in the FM_IRL_STATUS table refused exclusively by unknown (status: 304- REFUSED BY UNKNOWN OPERATION).

In addition to the eligibility status criterion, the batch considers the number of days defined through the MDEST_SEFAZ System Option. Only records that have status definition dates less than or equal to the VDATE added to the defined number of days are processed.

If the record has been successfully inserted into the FM_STG_NFE table, the batch changes the status of the fiscal document (status = NFE_MP), and the status of the fiscal document previews (status: 1001- WAITING SEFAZ CONFIRMATION) to Manifest Pending.

Single and daily execution of this batch is recommended.

Scheduling Constraints

Schedule Information Description
Processing Cycle Daily
Scheduling Considerations N/A
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
FM_FISCAL_DOC_HEADER Yes No Yes No
FM_IRL_STATUS Yes No Yes No
FM_IRL_HEADER Yes No No No
FM_IRL_LOG No Yes No No
FM_NFE_STG Yes Yes No No
FM_UTILIZATION_ATTRIBUTES Yes No No No
FM_SYSTEM_OPTIONS Yes No No No

fmprepost (Pre/Post processsing)

Module Name fmprepost.pc
Description
Functional Area Pre/Post functionality for ORFM
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch program has pre/post module for fmtaxupld batch. It contains fmtaxupld_post function. This function processes the records from staging table FM_STG_TAXCHG_DTL, contains process_ind as 'N', and inserts the records into FM_TAXCHG_HEADER and FM_TAXCHG_DETAIL tables.This program considers the following four parameters:

  • Username/password to log on to Oracle

  • A program before or after which this script must run

  • An indicator indicating whether the script is a pre or post function

  • chunk_size for fmtaxupld only, which defines the number of records under one location that need to clubbed as single chunk

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing fmtaxupld
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Table Select Insert Update Delete
FM_STG_TAXCHG_DTL Yes No Yes Yes
FM_TAXCHG_HEADER Yes Yes No No
FM_TAXCHG_DETAIL Yes Yes No No
V_FISCAL_ATTRIBUTES Yes No No No
FM_TAXCHG_HEADER_HIST Yes No No No
FM_TAXCHG_DETAIL_HIST Yes No No No

l10n_ld_iindfiles (Load data into template tables for item induction)

Module Name l10n_id_iindfiles.ksh
Description
Functional Area Item Induction
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch program is process Item Induction files to insert item in system.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Tables Select Insert Update Delete
FM_CLEAR_CALC_STG_TABLES Yes No No Yes

Localization Purge Batch Process

fm_batch_clear_calc_stg_t (Purge localization stage tables)

Module Name fm_batch_clear_calc_stg_t.ksh
Description
Functional Area Purge
Module Type
Module Technology Shell Script
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch is used to clear records from the stage tables.

New batch process to get all data informed in table FM_CLEAR_CALC_STG_TABLES and for each line call function.

  • FM_T_EXT_TAXES_SQL

  • CLEAR_STG_TABLES

After call the function delete the processed lines in table FM_CLEAR_CALC_STG_TABLES.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

This batch program uses table-based restart/recovery. The commit happens in the database when the commit_max_ctr is reached.

Key Tables Affected

Tables Select Insert Update Delete
FM_CLEAR_CALC_STG_TABLES Yes No No Yes

fmpurge (Purging Process Batch)

Module Name fmpurge.pc
Description
Functional Area Purging Process
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch is used to purge the NF records from the transaction and history tables.

In production environment, as the number of transactions increases over a period of time; in order to keep the performance intact it is required to keep purging the data from the active tables of the application periodically. This batch purges the data from the active tables and stores them in history tables.

This batch should be scheduled to purge the data from history tables over a period of time.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Table Select Insert Update Delete
FM_SCHEDULE_HIST No Yes No No
FM_FISCAL_DOC_HEADER_HIST No Yes No No
FM_FISCAL_DOC_DETAIL_HIST No Yes No No
FM_TRAN_DATA_HIST No Yes No No
FM_RECEIVING_HEADER_HIST No Yes No No
FM_RECEIVING_DETAIL_HIST No Yes No No
FM_FISCAL_DOC_TAX_HEAD_HIST No Yes No No
FM_FISCAL_DOC_TAX_DETAIL_HIST No Yes No No
FM_RESOLUTION_HIST No Yes No No
FM_CORRECTION_TAX_DOC_HIST No Yes No No
FM_CORRECTION_DOC_HIST No Yes No No
FM_NF_DOC_TAX_HEAD_EXT_HIST No Yes No No
FM_FISCAL_IMPORT_DETAIL_HIST No Yes No No
FM_FISCAL_IMPORT_HEADER_HIST No Yes No No
FM_NF_DOC_TAX_DETAIL_EXT_HIST No Yes No No
FM_NF_DOC_TAX_DETAIL_WAC_HIST No Yes No No
FM_FISCAL_DOC_PAYMENTS_HIST No Yes No No
FM_NF_DOC_TAX_RULE_EXT_HIST No Yes No No
FM_SPED_FISCAL_DOC_HEADER_HIST No Yes No No
FM_SPED_FISCAL_DOC_DETAIL_HIST No Yes No No
FM_SCHEDULE Yes No No Yes
FM_FISCAL DOC HEADER Yes No No Yes
FM_FISCAL_DOC_DETAIL Yes No No Yes
FM_TRAN_DATA Yes No No Yes
FM_RECEIVING_HEADER Yes No No Yes
FM_RECEIVING_DETAIL Yes No No Yes
FM_FISCAL_DOC_TAX_HEAD Yes No No Yes
FM_FISCAL_DOC_TAX_DETAIL Yes No No Yes
FM_RESOLUTION Yes No No Yes
FM_CORRECTION_TAX_DOC Yes No No Yes
FM_CORRECTION_DOC Yes No No Yes
FM_FISCAL_DOC_TAX_HEAD_EXT Yes No No Yes
FM_FISCAL_DOC_TAX_DETAIL_EXT Yes No No Yes
FM_FISCAL_DOC_TAX_DEATIL_WAC Yes No No Yes
FM_FISCAL_DOC_PAYMENTS Yes No No Yes
FM_FISCAL_DOC_TAX_RULE_EXT Yes No No Yes
FM_SPED_FISCAL_DOC_HEADER Yes No No Yes
FM_SPED_FISCAL_DOC_DETAIL Yes No No Yes
FM_FISCAL_ENTITY_OTHER Yes No No Yes
FM_FISCAL_ENTITY_OTHER_HIST Yes Yes No Yes
FM_EDI_FISCAL_ENTITY_OTHER Yes No No Yes
FM_NF_PURGE_DAYS_SETUP Yes No No Yes
FM_FRECLASS_STG Yes No No Yes
FM_FRECLASS Yes No No Yes
FM_FRECLASS_SCHEDULE Yes No No Yes

l10nbrfreclsprg (Fiscal Reclassification Purge)

Module Name l10nbrfreclsprg.pc
Description
Functional Area TaxWeb Integration
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch purges the processed reclassification data from L10N_BR_FISCAL_RECLASS table. The records to be purged are based on its processed_date or active_date less than the current vdate along with the status.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations This program can run after the successful completion of the following scripts:
  • l10n_br_fiscal_reclass_item_setup_retail.ksh

  • l10n_br_fiscal_reclass_item_process_retail.ksh

  • l10n_br_fiscal_reclass_item_finish_retail.ksh

Pre-Processing
  • l10n_br_fiscal_reclass_item_setup_retail.ksh
  • l10n_br_fiscal_reclass_item_process_retail.ksh

  • l10n_br_fiscal_reclass_item_finish_retail.ksh

Post-Processing N/A
Threading Scheme Threading based on reclassification ID

Restart/Recovery

Not applicable

Key Tables Affected

Table Select Insert Update Delete
L10N_BR_FISCAL_RECLASS Yes No No Yes
PERIOD Yes No No No
L10N_BR_FISCAL_RECLASS_NV Yes No No Yes

l10npurge (Localization Purging)

Module Name l10npurge.pc
Description
Functional Area Purging Process
Module Type
Module Technology ProC
Catalog ID N/A
Runtime Parameters N/A

Design Overview

This batch is used to purge records from the transaction and history tables.

In production environment, as the number of transactions increases over a period of time; in order to keep the performance intact it is required to keep purging the data from the active tables of the application periodically. This batch purges the data from the active tables and stores them in history tables.

Scheduling Constraints

Schedule Information Description
Processing Cycle Ad hoc
Scheduling Considerations Ad hoc
Pre-Processing N/A
Post-Processing N/A
Threading Scheme N/A

Restart/Recovery

Not applicable

Key Tables Affected

Table Select Insert Update Delete
GTAX_ITEM_ROLLUP Yes No No Yes
POS_MODS_TAX_INFO Yes No No Yes
GTAX_ITEM_ROLLUP_HIST No Yes No No
POS_MODS_TAX_INFO_HIST No Yes No No