Search Results create_flat_file




Overview

FV_FLATFILES is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Federal Financials regulatory reporting subsystem, and is most closely associated with IRS Form 1099 processing. Its central purpose is the generation of flat file extracts — fixed-format, delimited, or positional text files — that must be produced for electronic submission to external agencies. In the context of Oracle Federal Financials, these extracts correspond to the magnetic media and electronic filing requirements for 1099 information returns, where the output format is dictated by strict external specifications rather than by internal application structures. The package is declared with AUTHID CURRENT_USER, meaning that privilege evaluation occurs under the invoking schema rather than the definer, which is relevant when the extract logic is executed from concurrent program sessions.

The package is a low-level utility rather than a user-facing feature. It is not exposed through a form; instead it is driven by concurrent programs and by other packages within the Federal Financials module. The ETRM metadata records that it is referenced by four other packages, confirming its role as shared infrastructure for flat file production across multiple reporting flows.

Key Procedures and Functions

  • MAIN — The concurrent program entry point. It follows the standard Oracle EBS concurrent manager signature convention, accepting an error buffer and return code as OUT parameters, a concurrent program name, and up to seven positional parameters of mixed NUMBER and VARCHAR2 types. This design allows a single entry point to service multiple flat file extract requests, with the concurrent program name and parameters determining which extract is produced. It is this procedure that the concurrent manager invokes.
  • CREATE_FLAT_FILE — The core extract routine. It accepts a SQL statement supplied as a VARCHAR2 argument, executes that statement dynamically, and writes the resulting rows to the flat file output. Because the source text passes a statement string rather than a cursor or a predefined query, the procedure is generic: any caller that can construct a valid query can use it to render an extract in the required file layout. Dynamic SQL execution is corroborated by the package's reference to DBMS_SQL.

Tables Accessed

The referenced tables reflect the data domains the package serves. FV_1099C holds 1099-C cancellation-of-debt information, while FV_PAYMENT_FORMAT_TEMP and FV_FACTS_TEMP serve as transient working storage for rows staged during extract assembly. FV_FACTS_SUBMISSION, FV_FACTS_FOOTNOTE_HDR, and FV_FACTS_FOOTNOTE_LINES relate to the FACTS submission and footnote reporting structures, where header and line tables preserve the footnote text that must accompany a filed return. DBMS_SQL is accessed as the dynamic SQL engine that executes the statement string passed to CREATE_FLAT_FILE.

Usage Notes

Typical invocation is through the Concurrent Programs form or the Submit Request window, where MAIN is registered as the program executable and the parameters supply the extract-specific selection criteria. Because CREATE_FLAT_FILE accepts an arbitrary statement string, it is also directly callable from custom PL/SQL or from other APPS packages that need a consistent file-writing mechanism; the four documented dependent packages are the most likely consumers. Implementers should note that the header comment dates the source to 2004, so behavior is stable across 12.1.1 and 12.2.2, and that the dynamic statement passed to CREATE_FLAT_FILE should be constructed with care to avoid SQL injection and to ensure the output columns match the external filing specification.