Search Results lookup_code




Overview

PA_FCST_PROJ_SHOW_AMT_V is a VALID Oracle Projects (PA) view owned by the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. Its documented purpose is to show the project forecasting amount type. In practical terms, it is a security-filtered lookup list: rather than exposing a physical forecasting table, it returns the set of forecast amount types (LOOKUP_CODE and MEANING) that the current user is permitted to see for the project currently loaded in the forecasting session. The view is therefore an enabling component of the project forecasting UI and of any integration or report that must present, validate, or default a forecast amount type. Because membership in the result set is conditional on project type class and on labor cost viewing privileges, the view is also a reference example of Oracle Projects row-level and column-level security implemented through lookup filtering. For users searching on "lookup_code," the view is the canonical place in the PA forecast schema where a LOOKUP_CODE is both the key column and the security decision variable.

Underlying Base Objects

The view text is a single SELECT over PA_LOOKUPS, filtered to LOOKUP_TYPE = 'PA_FORECAST_AMOUNT_TYPE'. PA_LOOKUPS is itself an APPS view in the Oracle Projects lookup framework and supplies the LOOKUP_CODE and MEANING pairs returned to the caller. The filter is not static: the WHERE clause invokes two PL/SQL packages that form the documented base objects of this view.

  • PA_FCST_GLOBAL — supplies the session context through GETPROJECTTYPECLASS and GETPROJECTID, which return the project type class (for example, CONTRACT) and the project identifier currently active in the forecasting flow.
  • PA_SECURITY — supplies VIEW_LABOR_COSTS(PA_FCST_GLOBAL.GETPROJECTID), returning 'Y' when the user may view labor costs for that project.

The DECODE ladder evaluates the project type class first, then the labor cost privilege, and returns the LOOKUP_CODE only when the combination is permitted; otherwise it returns a sentinel such as 'X' that cannot equal a real lookup code, so the row is suppressed. This construct means the view has no independent storage and its contents change with session state.

Key Columns

  • LOOKUP_CODE — the forecast amount type identifier. Documented values referenced in the view logic include COST, REVENUE, MARGIN, and MARGIN_PERCENTAGE, mirroring the PA_FORECAST_AMOUNT_TYPE lookup type. It is the column searched when users query for "lookup_code" and functions as the value list item passed into forecasting forms.
  • MEANING — the user-facing, translatable description of the corresponding LOOKUP_CODE, displayed in LOVs and reports.

The effective visibility rules are: for non-contract projects, COST, REVENUE, MARGIN, and MARGIN_PERCENTAGE are all shown when labor costs may be viewed, while COST is suppressed when they may not. For contract projects, COST is shown only when labor costs may be viewed, and the other amount types are filtered as well. Only the two documented columns are exposed; no project identifier, user identifier, or privilege flag is surfaced.

Common Use Cases and Queries

Typical uses include populating the forecast amount type LOV in Oracle Projects forecasting windows, validating a user-supplied amount type before insert or update, and reproducing the UI list in custom reports or interfaces. The following retrieves the visible amount types for the current forecasting context:

  • SELECT lookup_code, meaning FROM apps.pa_fcst_proj_show_amt_v ORDER BY lookup_code;
  • SELECT meaning FROM apps.pa_fcst_proj_show_amt_v WHERE lookup_code = 'COST';
  • SELECT lookup_code FROM apps.pa_fcst_proj_show_amt_v WHERE lookup_code IN ('MARGIN','MARGIN_PERCENTAGE');

Because the result depends on PA_FCST_GLOBAL session values set by the forecasting form, ad hoc queries from SQL*Plus or a reporting tool may return fewer rows than the UI, typically only COST, when no project context has been established. Integrations should therefore call the view inside the same session initialization used by the forecast forms, or query PA_LOOKUPS directly when an unfiltered list of PA_FORECAST_AMOUNT_TYPE values is required.