DBA Data[Home] [Help]

PACKAGE BODY: APPS.PA_CLIENT_EXTN_ASSET_CREATION

Source


1 PACKAGE BODY PA_CLIENT_EXTN_ASSET_CREATION AS
2 -- $Header: PACCXACB.pls 115.2 2003/08/18 14:30:35 ajdas noship $
3 
4 PROCEDURE CREATE_PROJECT_ASSETS(p_project_id            IN      NUMBER,
5                                 p_asset_date_through    IN      DATE,
6                                 p_pa_date_through       IN      DATE DEFAULT NULL,
7                                 p_capital_event_id      IN      NUMBER DEFAULT NULL,
8                                 x_return_status    OUT NOCOPY VARCHAR2,
9                                 x_msg_data         OUT NOCOPY VARCHAR2) IS
10 
11 BEGIN
12  /* This client extension contains no default code, but can be used by customers
13     to perform logic prior to Asset Line Generation.  One example of such logic
14     would be to automatically create and assign Project Assets (or Retirement Adjustment Assets)
15     based on transactional data, such as Inventory Issues or Supplier Invoices
16     against a blanket project.  If desired, these expenditure items can later be directly
17     assigned to the Project Assets using the CLIENT_ASSET_ASSIGNMENT client extension.
18     The assigned Current Cost of each asset can then be used as an Asset Allocation method
19     for indirect costs such as labor and overheads.  Note that the project asset itself
20     must be first assigned to the project, top task or lowest task where the costs reside,
21     or else the costs must be identified as common-- this is a prerequisite for the costs
22     being eligible for generation.
23 
24     When creating Project Assets, be sure to use the CREATE_ASSETS public API to ensure
25     validation on asset and asset assignment data. Standard business rules surrounding
26     Asset Assignments must be adhered to, such as the concept that asset assignments cannot
27     simultaneously exist as multiple Grouping Levels.  For example, if one asset is assigned
28     to the project, another asset cannot be assigned to a Top Task.  Or if one asset is
29     assigned to a Top Task, another asset cannot be assigned to a child task beneath that
30     Top Task, or vice versa.
31 
32     The p_asset_date_through, p_ei_date_through and p_capital_event_id parameters are
33     the run-time parameters of the PRC: Generate Asset Lines program.  These are
34     included here so that if the customer chooses to create assets as part of this client
35     extension, he can use these parameters to ensure that the newly created assets will or
36     will not be subsequently processed by the Generate Asset Lines program.
37 
38     The mandatory OUT Parameter x_return_status indicates the return status of the API.
39     The following values are valid:
40         'S' for Success
41         'E' for Error
42         'U' for Unexpected Error
43 
44  */
45 
46     x_return_status := 'S';
47     x_msg_data := NULL;
48 
49     RETURN;
50 
51 EXCEPTION
52   WHEN OTHERS THEN
53       x_return_status := 'U';
54       x_msg_data := SQLCODE||' '||SQLERRM;
55       fnd_msg_pub.add_exc_msg(p_pkg_name     => 'PA_CLIENT_EXTN_ASSET_CREATION',
56                               p_procedure_name => 'CREATE_PROJECT_ASSET',
57                               p_error_text => SUBSTRB(x_msg_data,1,240));
58       ROLLBACK;
59       RAISE;
60 END;
61 
62 END;