DO.080 - Technical Reference Manual
DO.080 - Technical Reference Manual
CLL F036
Brazilian Solution for Payables
Withholding
Version 3
DISCLAIMER:
Change Record
Reviewers
Name Role
Document Control.............................................................................................. ii
Detailed Design.......................................................................................................................... 7
Views and Tables Definition .............................................................................................. 7
Module Defintion................................................................................................................ 7
Package Definition.............................................................................................................. 7
Manual changes on Package AP_CUSTOM_WITHHOLDING_PKG .............................. 7
Triggers Definition ............................................................................................................. 7
Descriptive Flexfields ......................................................................................................... 7
T his chapter presents the High Level Design of CLL Withholding Tax application satisfing
the especific necessities of the Strategy and Analises phase of an implementation. A global
view of the Brazilian Withholding process will be explained. A list of tables, modules and
views complements will be shown for the better understanding of the process.
This chapter can be used to rapidly learn what tables, views and module are part of CLL Withholding
Tax. Through this chapter it is possible to understand the details of the design and of the
implementation of Withholding Tax.
List of Views
The List of Views briefly describes each view in CLL Withholding Tax. For more information,
please read the Tables Definition of the Detailed Design in chapter 2.
List of Tables
The list of tables briefly describes each table of CLL Withholding Tax. For more information, please
read the Tables Definition of the Detailed Design in chapter 2.
List of Modules
The list of Modules briefly describes each module of CLL Withholding Tax. For more information
please read the Tables Definition of the Detailed Design in chapter 2.
This section lists each CLL-F036 view and briefly describes each one of them. CLL Withholding Tax
uses the following views:
This section lists and briefly describes each table used on CLL Withholding Tax.
External Tables
CLL-F036 Tables
Table Name Description
This section lists each form, report, concurrent program and stored procedure used in CLL
Withholding.
Forms
CLL_F036_TADE CLL-F189 Integration. Tax that was calculated Integrated Receiving Integration – Deductive
on CLL-F189 and not will calculate again. Withholding Taxes.
CLL_F036_NODE Taxes that belong, but not will be calculate on Withholding Group – Exception on Ranking
the Group. Exception of the rank.
Reports
CLL_F036_AWTR Report that list the Taxes, the withholding values Brazilian Withholding Tax Report by Period
for each Supplier and can detail information
about the invoices.
Triggers
Packages
2 Detailed Design
T his chapter presents a detailed design used during the CLL-F036 implementation. Here
you will find detailed definitions about tables, views, modules and other objects used in CLL-
F036, like lookup codes and descriptive flexfields.
During the Detailed Design phase, each Applications component has its functionality detailed.
This chapter permits the understanding of the detailed structure and information flow of CLL-F036:
Module Defintion
This section provides detailed information about each module in CLL-F036. Use this section to better
understand the content details of each module and how these functionalities are implemented.
Package Definition
This section gives a overview about the Procedures and Functions inside the Calculation Package.
Triggers Definition
This section provides information about the Triggers of CLL-F036. If the Trigger is started in before
or after insert for example.
Descriptive Flexfields
This section provides detailed information of each Descriptive Flexfield used in the CLL-F036. Use
this section to rapidly find the list of Descripttive Flexfields.
Value Sets
This section provides detailed information of Value Set used in the CLL-F036. The Values Sets are
the information that are used in Additional Informations and as Parameter, with List of Values.
Segment Values
This section provides detailed information of Segment Values used in the CLL-F036. The Segment
Values are the information that appears when a Value Set has the type “Independent”.
This section contains a detailed definition of each table and view used in CLL-F036. For each table
or view the following information are presented:
Objective;
Modification;
Column Description ;
Primary Key;
Other Unique Keys;
Check Constraints;
Foreign Key;
Indexes;
QuickCodes;
Sequences;
Database Triggers;
View Definition.
This section only documents the tables and views which CLL-F036 owns. To obtain more details on
other external tables and views used, please search the corresponding application which the table is a
component of.
Objective
Modification
In this topic we will identify object modifications undergone since the previous version: if it is a new
object, if it become optional or obligatory, which columns were added or removed, the column type
changes and if the object was renamed.
Column Description
This topic presents the primary attributes of each column or view with a brief description of its use.
These attributes include the data type and if a value for this column is optional or obligatory.
Once every table contains these additional Standard Who Columns with the various Foreign Keys to
the tables FND_CONCURRENT_REQUESTS, FND_APPLICATION and
FND_CONCURRENT_PROGRAM, you should then not include the REQUEST_ID,
PROGRAM_APPLICATION_ID or PROGRAM_ID columns in the Foreign Keys list of the table.
Primary Key
In this topic you can identify the colums that compose the primary key of the table.
In this topic you can identify the columns that compose other unique keys of the table.
Check Contraints
In this topic you can identify validation rules that have to be respected during the corresponding
update or creation of the column.
Foreign Key
This topic explains the relationship between the tables and lists all the Foreign Keys associated with
each table. For each Foreign Key there is a list with the primary key table name (table that the
Foreign Key refers to), the corresponding primary key table column and the foreign key columns that
refers to the Primary Key Columns.
When the Primary Key Table have a composite Primary Key, each column in the composite key is
listed sequentially.
If the table contains two or more distinct Foreign Keys that refer to the same Primary Key table, then
the Table Name of the Primary Key is repeated and each Foreign Key is listed separately.
Quick Codes
In this topic, we identify every quickcode type that is eventually associated with a column in the
table. Read the QuickCode Section to obtain a complete list of the quickcodes values and their
meaning.
Sequence
In this topic you will be able to identify the sequences related to the table
Database Triggers
In this topic you will find a list of the active database triggers and a brief explanation of each one of
them including when it is fired.
View Definition
In this topic you will learn about the SQL structure that defines or creates a view, permitting a better
understanding of the views columns.
The Table Definition section contains a detailed definition of each table in CLL-F036. For each table,
the following information are available: objective, column description, primary key, unique key,
check constraints, foreign key, indexes, quick codes, sequences and database triggers.
CLL_F036_AP_SUPPLIER_SITES_EXT
Stores the Adicional Information for the Supplier Sites. The Supplier Sites must be Personalized to
be able to call the Flexfield that is based the Additional Information.
Column Description
Column Null / Not Data Type Description
Null
VENDOR_SITE_ID NOT NULL NUMBER(15) ID for Vendor Site
ATTRIBUTE1 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE2 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE3 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE4 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE5 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE6 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE7 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE8 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE9 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE10 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE11 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE12 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE13 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE14 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE15 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE16 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE17 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE18 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE19 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE20 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE_CATEGORY NULL VARCHAR2(150) Flexfield Attribute Category
CREATED_BY NOT NULL NUMBER () Standard Who Column
CREATION_DATE NOT NULL DATE Standard Who Column
LAST_UPDATE_DATE NOT NULL DATE Standard Who Column
LAST_UPDATED_BY NOT NULL NUMBER () Standard Who Column
LAST_UPDATE_LOGIN NULL NUMBER () Standard Who Column
Unique Keys
Name Column
CLL_F036_AP_SUPPLIER_SITES_U1 VENDOR_SITE_ID
CLL_F036_AP_TAX_CODES_EXT
Stores the Adicional Information for the Tax Codes. The Tax Codes screen must be Personalized to
be able to call the Flexfield that is based the Additional Information..
Column Description
Column Null / Not Data Type Description
Null
TAX_ID NOT NULL NUMBER(15) ID of Tax Code
ATTRIBUTE1 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE2 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE3 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE4 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE5 NULL VARCHAR2(150) Flexfield Attribute
ATTRIBUTE6 NULL VARCHAR2(150) Flexfield Attribute
Unique Keys
Name Column
CLL_F036_AP_TAX_CODES_EXT_U1 TAX_ID
CLL_F036_BUCKETS_ALL
Table of CLL-F036 used to store the withholding information grouped by Customer, Operating Unit
and Tax.
Column Description
Column Null / Data Type Description
Not Null
VENDOR_ID NOT NULL NUMBER (15) Vendor ID
VENDOR_SITE_ID NOT NULL NUMBER (15) Site of Vendor ID
ORG_ID NOT NULL NUMBER (15) Operating Unit
PERIOD_NAME NOT NULL VARCHAR2 (15) Period Name
GROUP_ID NOT NULL NUMBER (15) ID of Withholding Group
TAX_ID NOT NULL NUMBER (15) Tax Code
GROSS_AMOUNT NULL NUMBER Gross Amount
WITHHELD_AMOUNT NULL NUMBER Withheld Amount
WITHHELD_BASE_AMOUNT NULL NUMBER Withheld Base Amount
Unique Keys
Name Column
CLL_F036_BUCKETS_U1 PERIOD_NAME
TAX_ID
VENDOR_ID
VENDOR_SITE_ID
GROUP_ID
CLL_F036_DISTRIBUTIONS_GT
Temporary table used for Credit/Debit Memos calculation with origin in a Payment Batch.
Column Description
Column Null / Data Type Description
Not Null
INVOICE_ID NOT NULL NUMBER(15) Invoice ID
PAYMENT_NUM NULL NUMBER(15) Number of Payment
GROUP_ID NOT NULL NUMBER(15) Withholding Tax Group ID
TAX_NAME NOT NULL VARCHAR2(15) Tax Name
Index
Name Column
CLL_F036_DISTRIBUTIONS_GT_N1 CHECKRUN_NAME
VENDOR_ID
VENDOR_SITE_ID
INVOICE_ID
PAYMENT_NUM
CLL_F036_GROUP_TAXES_GT
Temporary table used on calculate. This table is populated before the information are inserted in the
table AP_AWT_TEMP_DISTRIBUTIONS_ALL.
Column Description
Column Null / Data Type Description
Not Null
INVOICE_ID NULL NUMBER() Invoice ID
PAYMENT_NUM NULL NUMBER() Number of Payment
GROUP_ID NULL NUMBER() Withholding Tax Group
RANK NULL NUMBER() Rank
TAX_NAME NULL VARCHAR2(15) Name of Tax
STATUS NULL VARCHAR2(10) Status of register
GROSS_AMOUNT NULL NUMBER() Gross Amount
WITHHELD_AMOUNT NULL NUMBER() Withheld Amount
BASE_WITHHELD_AMOUNT NULL NUMBER() Base Withheld Amount
OFFSET_COUNTER NULL NUMBER() Ofsset Counter
WT_AMOUNT_REC NULL NUMBER() Withholding Amount recorded
GROSS_AMOUNT_REC NULL NUMBER() Gross Amount recorded
Indexs
Name Column
LAD Consulting Localizations Technical Reference Manual 13
CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_GROUP_TAXES_GT_N1 INVOICE_ID
PAYMENT_NUM
GROUP_ID
RANK
CLL_F036_GRP_NO_DEDUCTIONS_ALL
Column Description
Column Null / Data Type Description
Not Null
GROUP_ID NOT NULL NUMBER(15) Withholding Tax Group ID
TAX_ID NOT NULL NUMBER(15) Tax Code
TAX_ID_NO_DEDUC NOT NULL NUMBER(15) Tax Code to not Deduc.
START_DATE NULL DATE Start of valid date
END_DATE NULL DATE End of valid date
CREATED_BY NOT NULL NUMBER () Standard Who Column
CREATION_DATE NOT NULL DATE Standard Who Column
LAST_UPDATE_DATE NOT NULL DATE Standard Who Column
LAST_UPDATED_BY NOT NULL NUMBER () Standard Who Column
LAST_UPDATE_LOGIN NULL NUMBER () Standard Who Column
ORG_ID NULL NUMBER () Operating Unit
Unique Key
Name Column
CLL_F036_GRP_NO_DEDUCTIONS_U1 GROUP_ID
TAX_ID
TAX_ID_NO_DEDUC
START_DATE
CLL_F036_TAX_DEDUCTIONS_ALL
Taxes from CLL-F189, that was calculated and not will calculate again on AP.
Column Description
Column Null / Data Type Description
Not Null
TAX_ID NOT NULL NUMBER(15) Tax Code
TAX_ID_DEDUCTION NOT NULL NUMBER(15) ID corresponding of a F189 Tax
START_DATE NULL DATE Start of a valid date
END_DATE NULL DATE End of a valid date
CREATED_BY NOT NULL NUMBER () Standard Who Column
CREATION_DATE NOT NULL DATE Standard Who Column
LAST_UPDATE_DATE NOT NULL DATE Standard Who Column
LAST_UPDATED_BY NOT NULL NUMBER () Standard Who Column
LAST_UPDATE_LOGIN NULL NUMBER () Standard Who Column
ORG_ID NULL NUMBER () Operating Unit
Unique Key
Name Column
CLL_F036_TAX_DEDUCTIONS_U1 TAX_ID
TAX_ID_DEDUCTION
START_DATE
The View Definition section contains a detailed definition of each view in CLL-F036. You will see
the following fields for each view: objective, definition, column description, indexes and sequences.
CLL_F036_AP_TAX_CODES_DFV
Column Description
Column Null / Data Type Description
Not Null
ROW_ID VARCHAR2(18)
CONTEXT_VALUE VARCHAR2(150)
USE_BRAZILIAN_WT VARCHAR2(150)
DEPENDENT_REDUCTION_AMOUNT VARCHAR2(150)
MINIMUM_WT_AMOUNT VARCHAR2(150)
MINIMUM_WT_AMOUNT_USE VARCHAR2(150)
GROSS_AMOUNT_VARIANCE VARCHAR2(150)
GROSS_AMOUNT_VARIANCE_VALUE VARCHAR2(150)
MINIMUM_GROSS_AMOUNT VARCHAR2(150)
CONCATENATED_SEGMENTS UNDEFINED
CLL_F036_AP_SUPPLIER_SITES_DFV
Column Description
Column Null / Data Type Description
Not Null
ROW_ID VARCHAR2(18)
CONTEXT_VALUE VARCHAR2(150)
NUMBER_OF_DEPENDENTS UNDEFINED
CONCATENATED_SEGMENTS UNDEFINED
This section describes each form, report, concurrent program and stored procedure in the CLL-F036.
Read this section to learn what each module does and when CLL-F036 uses them with each
corresponding table.
Module Overview
This overview briefly describes each module with its functionality, type, category, used language and
the associated title with the corresponding program.
It also presents a detailed description of the module functionalities and you will be able to learn more
about each specific business activity.
The modules list is in alphabetical order, based on the internal names, that correspond to the Forms
names, Reports and Concurrent Programs registered in the Oracle Application Object Library (AOL).
Form Each Form type module corresponds to a simple screen that you can navigate using
a menu or a subroutine activated by an automatic zoom. The Forms type module is
indexed by its registration name in Oracle Application Object Library, that is
identified by the executable file name without the extension FMX.
Report Each Report type module corresponds to a program that generates a report. This
program can be a description file of an Oracle Report, a SQL report program, a
SQL Plus script or a C/ ProC program. The Report type module is indexed by the
concurrent program name, that is registered in the Oracle Application Object
Library. To propagate a concurrent program, the registered name is identified by
the executable file name without its extension. Each Report type corresponds to a
program that generates a report. This program can be a description file of an Oracle
Report, a SQL report program, a SQL Plus script or a C/ ProC program. To
propagate a concurrent program, the registered name is identified by the executable
file name without its extension.
Concurrent Each Concurrent Program type module corresponds to a simple program that can
Program be made by a C/ C Pro program, a SQL Plus script, a SQL Loader script or a SQL
Report program. This module is indexed by the name registered in the Oracle
Application Object Libary. To propagate a concurrent program, the registered
name is identified by the executable file name without its extension.
Stored Each module of the Stored Procedure type corresponds to a simple PL*SQL
Procedure program stored in the data base. This module is indexed by the name of the
PL*SQL creation file without its file extension.
Package Each module of the Package type corresponds to a union of procedures and
variables declaration.
CLL_F036_CALS
Description: Package Specification of Calculate
Type: Package
Language: PL*SQL
Name: CLL_F036_CALCULATION_PKG
CLL_F036_CUSS
Description: Package Specification for Custom CLL F036
Type: Package
Language: PL*SQL
Name: CLL_F036_CUSTOM_WITHHOLD_PKG
CLL_F036_CUSB
Description: Package Body for Custom CLL F036
Type: Package
Language: PL*SQL
Name: CLL_F036_CUSTOM_WITHHOLD_PKG
CLL_F036_NODE
Description: Exception of the Rank.
Type: Form
Language: Form v10.0
Name: Withholding Group – Exception on Ranking
CLL_F036_TADE
Description: F189 Integration. Taxes that was calculated on F189 and not will be
calculate again on CLL Withholding.
Type: Form
Language: Form v10.0
Name: Integrated Receiving – Deductive Withholding Taxes
CLL_F036_AWTR
Description: Report to list the Withholding values
Type: Report
Language: Report v10.0
Name: Brazilian Withholding Tax Report by Period
Populate_Temp
This Procedure create the temporary table CLL_F036_GROUP_TAXES_GT using the Tax Group
and Invoice that receives as parameter.
Calculate
This is the main procedure. It is called from POPULATE_TEMP and calls routines that will calculate
the Withholding and Gross amounts using the information on CLL Withholding.
Get_Gross_Amount
This Procedure is called from CALCULATE Procedure. Verify if the Tax Period is “INVOICE” or
“PERIOD”, if the value is “INVOICE” the Gross returned is the same of the Invoice, if the result of
the condition is “PERIOD” then the value of the tax is recovered, inside of the period. Also is
verified if Dependents Deduction exists as Base Alteration Value.
Calculate_Total_Awt
This Function is called from CALCULATE Procedure. Verifies if the Minimum Base Value exists as
if the selected Base Value is smaller than this value, in this case return zero.
Calculate_Awt_Amount
This Function is called from CALCULATE_TOTAL_AWT Function. Uses the Tax Rates to
calculate the Withholding Amount.
Calculate_Limit_Amount
This Function is called from CALCULATE Procedure. Return the Value of The Invoice, because this
value is the maximum limit to the Withhold.
Calculate_Awt
This Function is called from CALCULATE Procedure. Takes the Limit and the Withheld calculated
and adjust for the set up defined, case “PERIOD” or “INVOICE”.
Br_Awt_Bucket
Calculate_Awt_Batches
Populate_Bucket
This Procedure is called from Trigger on table AP_AWT_BUCKETS_ALL to update the values on
this table accourding with CLL_F036_BUCKETS_ALL.
Prorate_Statement
Prorate_Distributions
This section provides the manual code, that have to be inserted on Package
AP_CUSTOM_WITHHOLDING_PKG. This codes are necessary to CLL-F036 works correctly.
AP_SPECIAL_RATE
This code have to be inserted, after BEGIN.
AP_SPECIAL_ROUNDING
This code have to be inserted, after BEGIN.
This section provides detailed information of each Trigger used on CLL Withholding.
CLL_F036_BUCKETS_T1
This trigger calls the POPULATE_BUCKET Procedure, for each row, before Insert and Update.
CLL_F036_INVOICE_DISTRIB_T1
This trigger calls the BR_AWT_BUCKET Procedure, for each row, after Insert and Update. If a
reversion of another period enter on table, the Procedure BR_AWT_BUCKETS will not be called.
CLL_F036_TEMP_DISTRIB_T1
This trigger calls the POPULATE_TEMP Procedure, for each row, before Insert.
CLL_F036_TEMP_DISTRIB_T2
This trigger calls PRORATE_DISTRIBUTIONS and BR_AWT_BUCKET procedures , for Each
Row, after Insert and Delete.
CLL_F036_TEMP_DISTRIB_T3
This trigger calls the PRORATE_STATEMENT Procedure, for Statement, after Insert and Delete
This section provides detailed information of each Descriptive Segment used on CLL-F036 used with
Extension for Oracle Paybles. You must personalize the screens to call the Additional Informations.
CLL_F036_AP_TAX_CODES_EXT
Segments Summary
Name Window Prompt Column Value Set
Use Brazilian WT Use Brazilian WT ATTRIBUTE1 CLL_F036_BR_EXTENSION
Dependant Reduction Dependant Reduction ATTRIBUTE2
Amount Amount
Minimum WT Amount Minimum WT Amount ATTRIBUTE4
Minimum WT Amount Use Minimum Withholding ATTRIBUTE3 CLL_F036_MIN_USAGE
Gross Applicability
Gross Amount Variance Gross Amount Variance ATTRIBUTE5
Percent
Gross Amount Variance Value for Amount ATTRIBUTE6
Value Variance
Minimum Gross Amount Mininum Gross Amount ATTRIBUTE10
for Withholding
CLL_F036_AP_SUPPLIER_SITES_EXT
Segments Summary
Name Window Prompt Column Value Set
Number od Dependants Number od Dependants ATTRIBUTE1 10/Number
This section provides detailed information about the Value Sets used on CLL-F036.
CLL_F036_BR_EXTENSION