0% found this document useful (0 votes)
270 views33 pages

DO.080 - Technical Reference Manual

This document provides technical documentation for a Brazilian solution for payables withholding. It includes an overview of the high level design with lists of views, tables, and modules used in the solution. It also includes a detailed design section describing the views and tables definition, package definition, triggers definition, and other components.

Uploaded by

Ricardo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
270 views33 pages

DO.080 - Technical Reference Manual

This document provides technical documentation for a Brazilian solution for payables withholding. It includes an overview of the high level design with lists of views, tables, and modules used in the solution. It also includes a detailed design section describing the views and tables definition, package definition, triggers definition, and other components.

Uploaded by

Ricardo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

LAD Add-on Localizations

CLL F036
Brazilian Solution for Payables
Withholding

Technical Reference Manual


RELEASE 12

Version 3

DISCLAIMER:

CURRENTLY, ORACLE OFFERS CERTAIN RESALABLE ASSETS OR OTHER DEFINED SERVICE


DELIVERABLES (COLLECTIVELY REFERRED TO AS "SERVICE DELIVERABLES") UNDER A LIMITED
USE LICENSE. THE SERVICE DELIVERABLES CURRENTLY INCLUDE, BUT ARE NOT LIMITED TO,
ORACLE INTEGRATION HUB. YOU AGREE THAT :

(i) SERVICE DELIVERABLES ARE NOT ORACLE STANDARD SOFTWARE PROGRAMS,


(ii) TECHNICAL SUPPORT FOR SERVICE DELIVERABLES IS NOT AVAILABLE FROM OR UNDER, OR
PROVIDED BY OR THROUGH, ORACLE'S SUPPORT SERVICES ORGANIZATION OR YOUR ORACLE
PROGRAM LICENSE AGREEMENT,
(iii) YOUR RIGHT TO USE AND RECEIVE SUPPORT SERVICES FOR SERVICE DELIVERABLES IS
SOLELY AS DESCRIBED IN YOUR CONTRACT FOR SUCH SERVICE DELIVERABLES, AND
(iv) A SERVICE REQUEST REGARDING SERVICE DELIVERABLES, REGARDLESS OF HOW INITIATED
OR LOGGED, WILL BE ADDRESSED IN ACCORDANCE WITH THE TERMS OF YOUR CONTRACT FOR
SUCH SERVICE DELIVERABLES.
Document Control

Change Record

Date Author Version Change Reference

16-Oct-07 Ricardo Antonio 1 Creation


04-Dec-12 Gesiane Toryi 2 Correct information on package ap_custom_witholding_pkg
13-aug-14 Diogenes Menezes 3 Package Code Update

Reviewers
Name Role

LAD Consulting Localizations Technical Reference Manual ii


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Content

Document Control.............................................................................................. ii

CHAPTER 1 High Level Design .................................................................................................................... 1

High Level Design Overview..................................................................................................... 2


Oracle Withholding Tax Overview .................................... Error! Bookmark not defined.
List of Views....................................................................................................................... 2
List of Tables ...................................................................................................................... 2
List of Modules ................................................................................................................... 2
List of Views .............................................................................................................................. 3
Withholding Tax Views ...................................................................................................... 3
List of Tables ............................................................................................................................. 4
External Tables ................................................................................................................... 4
CLL F036 Tables ................................................................................................................ 4
List of Modules .......................................................................................................................... 5
Forms .................................................................................................................................. 5
Reports................................................................................................................................ 5
Triggers............................................................................................................................... 5
Packages ............................................................................................................................. 5

CHAPTER 2 Detailed Design......................................................................................................................... 6

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

LAD Consulting Localizations Technical Reference Manual iii


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Value Sets ........................................................................................................................... 7
Segment Values .................................................................................................................. 7
View and Table Definition......................................................................................................... 8
Objective............................................................................................................................. 8
Modification ....................................................................................................................... 8
Column Description ............................................................................................................ 8
Primary Key ........................................................................................................................ 9
Other Unique Keys ............................................................................................................. 9
Check Contraints ................................................................................................................ 9
Foreign Key ........................................................................................................................ 9
Indexes .............................................................................................................................. 10
Quick Codes ..................................................................................................................... 10
Sequence ........................................................................................................................... 10
Database Triggers ............................................................................................................. 10
View Definition ................................................................................................................ 10
Table Definition ....................................................................................................................... 11
CLL_F036_AP_SUPPLIER_SITES_EXT ....................................................................... 11
CLL_F036_AP_TAX_CODES_EXT .............................................................................. 11
CLL_F036_BUCKETS_ALL ........................................................................................... 12
CLL_F036_DISTRIBUTIONS_GT ................................................................................. 12
CLL_F036_GROUP_TAXES_GT ................................................................................... 13
CLL_F036_GRP_NO_DEDUCTIONS_ALL .................................................................. 14
CLL_F036_TAX_DEDUCTIONS_ALL ......................................................................... 14
View Definition ....................................................................................................................... 15
CLL_F036_AP_TAX_CODES_DFV .............................................................................. 15
CLL_F036_AP_SUPPLIER_SITES_DFV....................................................................... 15
Modules Definition .................................................................................................................. 16
Module Overview ............................................................................................................. 16
CLL_F036_CALB ............................................................................................................ 17
CLL_F036_CALS ............................................................................................................ 17
CLL_F036_CUSS............................................................................................................. 17
CLL_F036_CUSB ............................................................................................................ 17
CLL_F036_NODE ........................................................................................................... 17
CLL_F036_TADE ............................................................................................................ 17
CLL_F036_AWTR ........................................................................................................... 17
Package Definition ................................................................................................................... 18
Populate_Temp ................................................................................................................. 18
Calculate ........................................................................................................................... 18
Get_Gross_Amount .......................................................................................................... 18
Calculate_Total_Awt ........................................................................................................ 18
Calculate_Awt_Amount.................................................................................................... 18
Calculate_Limit_Amount.................................................................................................. 18
Calculate_Awt .................................................................................................................. 18
Ap_Special_Rate .............................................................................................................. 19
Br_Awt_Bucket ................................................................................................................ 19
Calculate_Awt_Batches .................................................................................................... 19
Populate_Bucket ............................................................................................................... 19
Prorate_Statement ............................................................................................................. 19
Prorate_Distributions ........................................................................................................ 19
Manual changes on Package AP_CUSTOM_WITHOLDING_PKG ...................................... 20
AP_SPECIAL_RATE....................................................................................................... 20
AP_SPECIAL_ROUNDING ............................................................................................ 20
Triggers Definition .................................................................................................................. 21
LAD Consulting Localizations Technical Reference Manual iv
CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_BUCKETS_T1 .............................................................................................. 21
CLL_F036_INVOICE_DISTRIB_T1 .............................................................................. 21
CLL_F036_TEMP_DISTRIB_T1 .................................................................................... 21
CLL_F036_TEMP_DISTRIB_T2 .................................................................................... 21
CLL_F036_TEMP_DISTRIB_T3 .................................................................................... 21
Descriptive Flexfield Segments ............................................................................................... 22
CLL_F036_AP_TAX_CODES_EXT .............................................................................. 22
CLL_F036_AP_SUPPLIER_SITES_EXT ....................................................................... 22
Value Sets ................................................................................................................................ 23
CLL_F036_BR_EXTENSION ......................................................................................... 23
CLL_F036_CALENDAR ................................................................................................. 24
CLL_F036_MIN_USAGE................................................................................................ 25
CLL_F036_PERIOD ........................................................................................................ 26
CLL_F036_SUPPLIER .................................................................................................... 27
CLL_F036_TAXES .......................................................................................................... 28

LAD Consulting Localizations Technical Reference Manual v


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CHAPTER

1 High Level Design

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.

LAD Consulting Localizations Technical Reference Manual 1


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
High Level Design Overview
During the High Level Design, the major application componentes are defined (tables, views and
modules) necessary to construct the application. Below we specify what each component does
without entering in details on how its done.

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.

LAD Consulting Localizations Technical Reference Manual 2


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
List of Views

This section lists each CLL-F036 view and briefly describes each one of them. CLL Withholding Tax
uses the following views:

Withholding Tax Views

View Name Description

CLL_F036_AP_TAX_CODES_DFV Descriptive Flexfield View on


CLL_F036_AP_TAX_CODES_EXT
CLL_F036_AP_SUPPLIER_SITES_DFV Descriptive Flexfield View on
CLL_F036_AP_SUPPLIER_SITES_EXT

LAD Consulting Localizations Technical Reference Manual 3


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
List of Tables

This section lists and briefly describes each table used on CLL Withholding Tax.

External Tables

Table Name Description

AP_AWT_BUKETS_ALL Accumulative table with values for retention on the period.


AP_AWT_GROUPS Register the retention groups.
AP_AWT_GROUP_TAXES_ALL Input the taxes of certain tax group.
AP_AWT_TAX_RATES_ALL Register of the strips of certain tax.
AP_AWT_TEMP_DISTRIBUTIONS_ALL Temporary table used for the core calculations. If the payment lot
is with “build” status, the registrations will stay in this table.
AP_INVOICE_DISTRIBUTIONS_ALL Final table when a withholding line is generated.
AP_TAX_CODES_ALL Register the informations about the taxes.
AP_SELECTED_INVOICES_ALL Storage the Invoices selected in a payment lot.
AP_SYSTEM_PARAMETERS_ALL The principal set-up on “AP” is storage in this table.
AP_OTHER_PERIODS The Special Calendar table, used with period of the Tax.
AP_SELECTED_INVOICE_CHECKS_ALL Storage the Invoices selected in a payment lot.

CLL-F036 Tables
Table Name Description

CLL_F036_AP_SUPPLIER_SITES_EXT Additional Information Table to AP_SUPPLIER_SITES.


CLL_F036_AP_TAX_CODES_EXT Additional Information Table to AP_TAX_CODES
CLL_F036_BUCKETS_ALL Table used on CLL Withholding to store the accumulated for the
Taxes, in the period.
CLL_F036_DISTRIBUTIONS_GT Temporary table used in calculate of CLL Withholding.
CLL_F036_GROUP_TAXES_GT Temporary table used in calculate of CLL Withholding.
CLL_F036_GRP_NO_DEDUCTIONS_ALL Used to enter the exceptions of Ranks, on the groups
CLL_F036_TAX_DEDUCTIONS_ALL Used to integration with CLL-F189. When the taxes were
already calculated.

LAD Consulting Localizations Technical Reference Manual 4


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
List of Modules

This section lists each form, report, concurrent program and stored procedure used in CLL
Withholding.

Forms

Form Description Name

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

Report Description Name

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

Trigger Description Name

CLL_F036_BUCK Update the table AP_AWT_BUCKETS_ALL CLL_F036_BUCKETS_T1


with the CLL Withholding values
CLL_F036_INVO Trigger based on CLL_F036_INVOICE_DISTRIB_T1
AP_INVOICE_DISTRIBUTIONS_ALL
CLL_F036_TBEF Trigger based on table CLL_F036_TEMP_DISTRIB_T1
AP_AWT_TEMP_DISTRIBUTIONS_ALL
CLL_F036_TEMP Trigger based on table CLL_F036_TEMP_DISTRIB_T2
AP_AWT_TEMP_DISTRIBUTIONS_ALL
CLL_F036_TEMS Trigger based on table CLL_F036_TEMP_DISTRIB_T3
AP_AWT_TEMP_DISTRIBUTIONS_ALL

Packages

Package Spec Package Name


Procedure Description
Package Body Procedure Name

CLL_F036_CALS CLL_F036_CALCULATION_PKG Calculate the withholding for Invoice


CLL_F036_CALB Distributions, using the informations
CALCULATE containeds on CLL F036.
CLL_F036_CUSC CLL_F036_CUSTOM_WITHHOLDING_PKG Custom package to allow the client change
CLL_F036_CUSB de CLL F036 calculate
AP_SPECIAL_BUCKETS

LAD Consulting Localizations Technical Reference Manual 5


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CHAPTER

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.

LAD Consulting Localizations Technical Reference Manual 6


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Detailed Design

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:

Views and Tables Definition


This section contains a detailed definition of CLL-F036 tables and views. For each table, it provides
information about objective, column description, primary key, unique key, check constraints, foreign
keys, indexes, quickcodes, sequences, module access and database triggers. It also contains the SQL
structure of each view.

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.

Manual changes on Package AP_CUSTOM_WITHHOLDING_PKG


This section shows the manual entrances on this 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”.

LAD Consulting Localizations Technical Reference Manual 7


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
View and Table Definition

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

In this topic we will describe why this table will be used.

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.

Standard Who Column


Several tables in CLL-F036 contain standard who columns. When a program or SQL command
selects a row from a table, these columns are used to determine who did the last update in this row. If
your program or SQL command inserts or updates a line in an interface table, you should update the
five Standard Who Columns:

LAST_UPDATE_DATE Date when a user last updated this row.


LAST_UPDATED_BY User who last updated this row (Foreign Key to
FND_USER.USER_ID).
CREATION_DATE Date when this row was created.
CREATED_BY User who created this row(Foreign key to FND_USER.USER_ID).
LAST_UPDATE_LOGIN Operation system login of user who last updated this row (Foreign
Key to FND_LOGINS.LOGIN_ID).

LAD Consulting Localizations Technical Reference Manual 8


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Once every line in this table contains the additional Standard Who Columns with various Foreign
Keys corresponding to the FND_USERS and FND_LOGINS tables, you should not include
LAST_UPDATED_BY, CREATED_BY or LAST_UPDATE_LOGIN columns in the Foreign Keys
list of the table.

Standard Columns about the Who (for concurrent programs)


Several tables in CLL Withholding Application have standard columns about the USER, to
distinguish changes made by each user in the forms or in the concurrent programs. When a
concurrent program inserts or updates rows in a table, the following additional columns about the
responsible user are updated.:

REQUEST_ID Concurrent request id of the program that last updated this


row (Foreign Key to FND_CONCURRENT_REQUESTS.
REQUEST_ID).
PROGRAM_APPLICATION_ID Application id of the program that last updated this row
(Foreign Key to FND_APPLICATION.APLLICATION_ID).
PROGRAM_ID Program id of the program that last updated this row. (Foreign
Key to FND_CONCURRENT_PROGRAM.
CONCURRENT_PROGRAM_ID).
PROGRAM_UPDATE_DATE Date when a program last updated this row.

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.

Other Unique Keys

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.

LAD Consulting Localizations Technical Reference Manual 9


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Indexes
In this topic you can identify all the indexes related to this table and the database columns that
implement this index sequentially.

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.

LAD Consulting Localizations Technical Reference Manual 10


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Table Definition

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

LAD Consulting Localizations Technical Reference Manual 11


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
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_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

LAD Consulting Localizations Technical Reference Manual 12


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
TAX_CODE_COMBINATION_ID NOT NULL NUMBER(15) Combination ID
GROSS_AMOUNT NOT NULL NUMBER() Gross Amount
WITHHOLDING_AMOUNT NOT NULL NUMBER() Withholding Amount
BASE_WITHHOLDING_AMOUNT NULL NUMBER Base Withholding Amount
ACCOUNTING_DATE NOT NULL DATE Date of Accounting
PERIOD_NAME NOT NULL VARCHAR2(15) Name for Period
CHECKRUN_NAME NULL VARCHAR2(50) Checkrun Name
TAX_RATE_ID NOT NULL NUMBER(15) Tax Rate ID
INVOICE_PAYMENT_ID NULL NUMBER(15) ID of Payment
GLOBAL_ATTRIBUTE_CATEGORY NULL VARCHAR2(150) Global Attribute Category
GLOBAL_ATTRIBUTE1 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE2 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE3 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE4 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE5 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE6 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE7 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE8 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE9 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE10 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE11 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE12 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE13 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE14 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE15 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE16 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE17 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE18 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE19 NULL VARCHAR2(150) Global Flexfield Attribute
GLOBAL_ATTRIBUTE20 NULL VARCHAR2(150) Global Flexfield Attribute
OK_TO_PAY_FLAG NULL VARCHAR2(01) OK to Payment
RANK NULL NUMBER(15) Rank
INVOICE_TYPE NULL NUMBER(15) Type for Invoice
VENDOR_ID NULL NUMBER(15) Vendor ID
VENDOR_SITE_ID NULL NUMBER(15) Site for Vendor ID
INVOICE_AMOUNT NULL NUMBER Invoice Amount
PAYMENT_AMOUNT NULL NUMBER Amount of Payment
EXTERNAL_BANK_ACCOUNT_ID NULL NUMBER(15) External Bank Account ID
PAY_SELECTED_CHECK_ID NULL NUMBER(15) Check ID Selected

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

Exception on Rank Taxes inside a Withholding Group.

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

LAD Consulting Localizations Technical Reference Manual 14


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
View Definition

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

Descriptive Flexfield View based on Additional Information for CLL_F036_AP_TAX_CODES_


EXT table.

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

Descriptive Flexfield View based on Additional Information for CLL_F036_AP_SUPPLIER


_SITES_EXT table.

Column Description
Column Null / Data Type Description
Not Null
ROW_ID VARCHAR2(18)
CONTEXT_VALUE VARCHAR2(150)
NUMBER_OF_DEPENDENTS UNDEFINED
CONCATENATED_SEGMENTS UNDEFINED

LAD Consulting Localizations Technical Reference Manual 15


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Modules Definition

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).

We classified the modules in the following categories:

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.

LAD Consulting Localizations Technical Reference Manual 16


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_CALB
Description: Package Body of Calculate
Type: Package
Language: PL*SQL
Name: CLL_F036_CALCULATION_PKG

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

LAD Consulting Localizations Technical Reference Manual 17


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Package Definition

This section provides detailed information about the Package CLL_F036_CALCULATION_PKG.


The Procedures and Functions inside the Package are listed and a overview about them is presented.

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”.

LAD Consulting Localizations Technical Reference Manual 18


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Ap_Special_Rate

This Function is called from AP_CUSTOM_WITHOLDING_PKG Package. From the Function


AP_SPECIAL_RATE.

Br_Awt_Bucket

This Procedure is called from Triggers on tables AP_AWT_TEMP_DISTRIBUTIONS and


AP_INVOICE_DISTRIBUTIONS, after the register enter on tables. This routine updates the table
CLL_F036_BUCKETS_ALL.

Calculate_Awt_Batches

This Procedure is called from AP_CUSTOM_WITHHOLDING_PKG Package. It is used to


calculate Credit an Debit Memos, to a Payment Batch.

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

This Procedure is called from Trigger on table AP_AWT_TEMP_DISTRIBUTIONS, at statement


level. This routine is used to calculate when different accounts are used in the items of a Invoice.

Prorate_Distributions

This Procedure is called from Trigger on table AP_AWT_TEMP_DISTRIBUTIONS. This routine is


used to calculate when different accounts are used in the items of a Invoice.

LAD Consulting Localizations Technical Reference Manual 19


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Manual changes on Package AP_CUSTOM_WITHOLDING_PKG

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.

-- (++) CLL_F036 Code Start


IF cll_f036_calculation_pkg.CHECK_COUNTRY(NULL,P_INVOICE_ID,NULL) = true THEN
RETURN(cll_f036_calculation_pkg.AP_SPECIAL_RATE
(p_tax_name, p_invoice_id, p_payment_num, p_awt_date,p_amount));
END IF;
-- (++) CLL_F036 Code End

AP_SPECIAL_ROUNDING
This code have to be inserted, after BEGIN.

--(++) CLL_F036 Code Start

IF cll_f036_calculation_pkg.CHECK_COUNTRY(null,null,p_checkrun_name) = true THEN


cll_f036_calculation_pkg.CALCULATE_AWT_BATCHES (p_checkrun_name =>
p_checkrun_name);
END IF;

--(++) CLL_F036 Code End

LAD Consulting Localizations Technical Reference Manual 20


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Triggers Definition

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

LAD Consulting Localizations Technical Reference Manual 21


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Descriptive Flexfield Segments

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

This Flexfield is used on Additional Information for Tax Code.

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

This Flexfield is used on Additional Information for Supplier Sites.

Segments Summary
Name Window Prompt Column Value Set
Number od Dependants Number od Dependants ATTRIBUTE1 10/Number

LAD Consulting Localizations Technical Reference Manual 22


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
Value Sets

This section provides detailed information about the Value Sets used on CLL-F036.

CLL_F036_BR_EXTENSION

LAD Consulting Localizations Technical Reference Manual 23


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_CALENDAR

LAD Consulting Localizations Technical Reference Manual 24


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_MIN_USAGE

LAD Consulting Localizations Technical Reference Manual 25


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_PERIOD

LAD Consulting Localizations Technical Reference Manual 26


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_SUPPLIER

LAD Consulting Localizations Technical Reference Manual 27


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract
CLL_F036_TAXES

LAD Consulting Localizations Technical Reference Manual 28


CLL F036 Brazilian Withholding
Oracle Proprietary, Confidential Information - Use Restricted by Contract

You might also like