AUTH_ID:
The authid current_user is used when you want a piece of code (PL/SQL) to execute with the privileges of the current user, and NOT the user ID that created the procedure. This is used mainly for BOLINF purposes - when this is installed under BOLINF but run as APPS.
COMMENTS:
The package spec should be formatted as below with revisions and comments
HEADER_VERSION:
The header version should match the specification date, and the version number and be updated for any code changes to be released. The Header Version will appear in the about section in the AIW spreadsheet.
PROCEDURE VERSION:
The procedure version is required for the about section in the AIW spreadsheet.
PROCEDURE UPLOAD:
This is the main procedure that will be called by the loader.
Any columns to be included in the parent section can be called directly as parameters
Any columns to be included in the child sections are included as a table type.
x_return_status - will return Success or Failure from the package body for parent section
x_err_msg - will return the error message for the parent section
Record type:
This is a record type containing all the child columns. The columns that are required are:
x_err_msg - returns an error message for the child section
x_return_status - returns Success or Failure for the child section
p_row_num - required field - keeps track of the child row for AIW
create or replace
PACKAGE M4APS_AIW_XYZ authid current_user AS
/******************************************************************************
NAME: M4APS_AIW_XYZ
PURPOSE: Put the purpose here
REVISIONS:
Ver Date Author Description
----- ----------- --------------- ------------------------------------
1.0.0 31 Aug 2017 S Smith Created
******************************************************************************/
header_version VARCHAR2 (20) := '1.0.0 31-Aug-17';
-- Return the header and body version in XML format
procedure version (p_header_version out varchar2,
p_body_version out varchar2);
type asset_lines_rec is record
(
project_asset_line_id number,
asset_id number,
amount number,
percentage number,
x_err_msg varchar2(4000) ,
x_return_status varchar2(1),
p_row number
);
TYPE asset_lines_tbl_type IS TABLE OF asset_lines_rec index by binary_integer;
PROCEDURE UPLOAD (
p_project_id in number,
p_asset_lines in out asset_lines_tbl_type,
x_return_status out varchar2,
x_err_msg out varchar2
) ;
end M4APS_AIW_XYZ;
Refer to section: