DBA Data[Home] [Help]

PACKAGE BODY: APPS.USER_PKG_SERIAL

Source


1 PACKAGE BODY user_pkg_serial AS
2 /* $Header: INVUDSGB.pls 120.1 2005/05/25 16:34:55 appldev  $ */
3 
4 -- PROCEDURE: generate_serial_number
5 -- INPUTS:
6 -- 1) p_org_id: Organization_id is supplied in this parameter
7 -- 2) p_item_id: Inventory_item_id is supplied in this parameter
8 
9 -- OUTPUTS:
10 -- 1) x_serial_number: Serial NUMBER created using the User defined
11 -- logic should be returned IN this variable.
12 -- Note that the serial Number returned should not be greater than 30 characters.
13 --
14 -- 2) x_return_status: on successful generation of the serial number using
15 -- the User defined logic, this variable needs TO be assigned the value
16 -- FND_API.G_RET_STS_SUCCESS and returned.
17 -- All other return values returned in the varaible are interpreted as error
18 -- by the calling program
19 --
20 -- 3) x_msg_data: Error message should be returned in this variable on
21 -- encountering an error
22 --
23 -- 4) x_msg_count: Number of errors encountered
24 
25 procedure generate_serial_number(x_return_status               OUT  NOCOPY VARCHAR2
26 				,x_msg_data                   OUT  NOCOPY VARCHAR2
27 				,x_msg_count                  OUT  NOCOPY NUMBER
28 				,x_serial_number              OUT  NOCOPY VARCHAR2
29 				,p_org_id                     IN   NUMBER
30 				,p_item_id                    IN   NUMBER)
31   IS
32 BEGIN
33 
34    NULL;
35 
36 EXCEPTION
37    WHEN OTHERS THEN
38       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
39       x_serial_number := NULL;
40       IF fnd_msg_pub.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
41 	THEN
42 	 FND_MSG_PUB.Add_Exc_Msg ('USER_PKG_SERIAL','GENERATE_SERIAL_NUMBER');
43       END IF;
44 END generate_serial_number;
45 
46 END user_pkg_serial;