Search Results insert_temp_data




Overview

JL_ZZ_AP_MONOTRIB_AWT_PKG is an Oracle EBS localization package owned by the APPS schema and classified as an "OTHER" API type. It supports Argentine withholding tax processing for suppliers operating under the Monotributo regime (a simplified tax status for small taxpayers). The package provides the PL/SQL backend logic invoked by the corresponding Oracle Reports report for Monotributo withholding, specifically gathering supplier, invoice, and threshold data into a temporary staging structure for subsequent extraction and printing. The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user rather than the definer, which is standard for report-backend packages that must respect the caller's data access. The header attribution (jlarmtbs.pls, version 120.2.12020000.1, dated 2012/06/27) confirms this object ships with the Oracle E-Business Suite 12.1.1 and 12.2.2 localization codebase for Argentina (JL = Latin America / Argentina).

Key Procedures and Functions

The package exposes six documented program units. Together, they implement the complete data-preparation and withholding-calculation cycle required by the Monotributo withholding report.

  • BeforeReport (FUNCTION) — Standard Oracle Reports report-trigger function, returning BOOLEAN. It initializes package-level state and report parameters before the query executes.
  • AfterReport (FUNCTION) — Standard Oracle Reports report-trigger function, returning BOOLEAN. It performs post-report cleanup or finalization.
  • Insert_temp_data (PROCEDURE) — The core staging procedure, and the object the user searched for. It accepts granular supplier and invoice attributes (supplier name/ID, taxpayer ID, simplified-regime type, Monotributo status, update status, threshold amount, invoice ID/number/date/status, DGI type, invoice amount, amount without tax, and a threshold-met flag) and loads them into a temporary table used as the report's data source. This is the entry point that consolidates withholding-relevant invoice data.
  • Update_Supplier_Applicability (PROCEDURE) — Determines and updates whether a supplier is subject to Monotributo withholding, returning an applicability-changed flag via an OUT NOCOPY parameter.
  • Update_Monotrib_Inv_Distrib_Wh (PROCEDURE) — Applies Monotributo withholding at the invoice distribution level, keyed by invoice and vendor.
  • Monotrib_Wh_Def_Line (PROCEDURE) — Derives the default withholding line for a given invoice distribution, using taxpayer ID, ship-to location, line type, and vendor.

Tables Accessed

The package reads and writes several AP and JL tables through APPS synonyms. Supplier and invoice data come from AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICES, AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_LINES, and AP_SUPPLIERS. Tax configuration is drawn from AP_TAX_CODES and the Argentine localization tables JL_AR_AP_MTBT_THRESHOLDS (Monotributo thresholds), JL_AR_AP_PROVINCES, JL_ZZ_AP_AWT_TYPES, JL_ZZ_AP_SUPP_AWT_TYPES, JL_ZZ_AP_SUPP_AWT_TYPES_S, JL_ZZ_AP_SUP_AWT_CD, and JL_ZZ_AP_SUP_AWT_CD_ALL. HR_LOCATIONS_ALL supplies ship-to address information used in default-line derivation.

Usage Notes

This package is not referenced by any other documented package (referenced by 0 packages), indicating it is invoked directly as the backend PL/SQL library for an Oracle Reports report (the .rdf associated with jlarmtbs.pls) rather than as a shared API. It is triggered at report runtime through the BeforeReport and AfterReport formula columns and the report's data-model triggers, with Insert_temp_data populating the staging table from which the report layout reads. Because it relies on report parameters such as P_SOB_ID, P_ORG_ID, P_REPORT_MODE, and P_LEGAL_ENTITY_ID, it must be called within the correct operating unit and legal entity context. Custom extensions modifying Monotributo withholding should call these procedures only in the same transactional context as the standard report to avoid orphaned temporary rows.