Search Results g_gl




Overview

PSP_XMLGEN is an Oracle E-Business Suite PL/SQL package owned by APPS that provides XML generation, PDF attachment, and supporting data-management services for the Proposals and Awards (PSP) module. Its principal responsibility is to construct approver-facing CLOB documents using DBMS_XMLGEN context queries, then persist the resulting XML and its rendered PDF output into the EBS attachment framework. The package forms part of the Proposal and Award approval printing infrastructure, allowing report templates defined in PSP_REPORT_TEMPLATES_H to be merged with personnel, award, and project data and delivered through the concurrent manager. Version information in the source header indicates the file has been maintained through the 12.1 and 12.2 release cycles, making it compatible with both 12.1.1 and 12.2.2 environments.

The global variable g_request_id is initialized in the package body from fnd_global.conc_request_id and is subsequently used to tie error records and PDF output to the originating concurrent request. The search term "g_gl" relates to the local variable l_gl_sob, which holds the set of books identifier retrieved from the report template header and is used when deriving chart-of-accounts context for the generated report.

Key Procedures and Functions

  • GENERATE_APPROVER_HEADER_XML — builds the header section of the approver report as a CLOB, resolving user name, date format mask, and set of books from the report template.
  • GENERATE_APPROVER_XML — produces the main approver body content, assembling the personnel and award detail elements into XML.
  • GENERATE_PERSON_XML — constructs the XML fragment describing an individual approver or personnel record.
  • STORE_PDF — writes the rendered PDF output into the FND_LOBS and attached document tables.
  • ATTACH_PDF — links the stored PDF to the appropriate document category and entity so it appears in the EBS attachment region.
  • UPDATE_ER_PERSON_XML — updates the stored XML for a person associated with an expense report or approval record.
  • UPDATE_ER_DETAILS — refreshes detail-level XML content for the approval entity.
  • COPY_PTAOE_FROM_GL_SEGMENTS — copies project, task, award, and organization element values from General Ledger segment definitions, supporting the g_gl / l_gl_sob derivation.
  • CONVERT_XML_CONTROLS — translates XML control tokens into their rendered equivalents prior to PDF output.
  • UPDATE_ER_ERROR_DETAILS — records processing errors against the concurrent request in PSP_REPORT_ERRORS.
  • UPDATE_GROUPING_CATEGORY — sets or updates the grouping category used to organize report output.

The package also exposes helper cursors for resolving the user name from FND_USER and FND_CONCURRENT_REQUESTS and for de-duplicating error messages before insertion.

Tables Accessed

The package reads FND_APPLICATION, FND_CONCURRENT_REQUESTS, FND_USER, FND_LOOKUP_VALUES, and FND_NEW_MESSAGES to resolve application context, request ownership, user identity, and display meanings. Attachment handling relies on FND_ATTACHED_DOCUMENTS, FND_ATTACHED_DOCUMENTS_S, FND_DOCUMENT_CATEGORIES, and FND_LOBS. Chart-of-accounts logic draws on FND_ID_FLEX_SEGMENTS. Award and personnel data are sourced from GMS_AWARDS_ALL, GMS_PERSONNEL, PER_ALL_ASSIGNMENTS_F, and HR_ALL_ORGANIZATION_UNITS, while PA_PROJECTS_ALL supplies project context.

Usage Notes

PSP_XMLGEN is invoked almost exclusively from the concurrent manager, either directly from the Generate Approver Letter or similar PSP programs, or indirectly through the two packages documented as referencing it. It is not intended for direct form-level invocation. Customizations should avoid altering the g_request_id initialization sequence, since downstream error and attachment logic depends on that value matching the running concurrent request.