DBA Data[Home] [Help]

PACKAGE: APPS.WMS_UCC_128_PVT

Source


1 PACKAGE WMS_UCC_128_PVT AS
2 /* $Header: WMSUCCSS.pls 120.0.12010000.2 2008/08/04 19:11:27 bvanjaku ship $ */
3 
4 -- ======================================================================
5 -- PROCEDURE get_xref_values
6 -- ======================================================================
7 -- Purpose
8 --   Retrieve crossreferenced item, UOM and Revision based on cross-reference
9 --     value
10 -- Input Parameters
11 --    p_organization_id
12 --    p_cross_reference
13 --
14 -- Output Parameters
15 --    x_uom_code return a UOM if defined , otherwise NULL
16 --    x_revision return a revision if defined , otherwise NULL
17 --    x_item_id  returns the matching item of the p_cross_reference
18 
19 PROCEDURE get_xref_values
20   (x_uom_code     OUT NOCOPY VARCHAR2,
21    x_revision     OUT NOCOPY VARCHAR2,
22    x_item_id      OUT NOCOPY NUMBER,
23    p_org_id          IN NUMBER ,
24    p_cross_reference IN VARCHAR2);
25 
26 
27 -- ======================================================================
28 -- PROCEDURE get_xref_values
29 -- ======================================================================
30 -- Purpose
31 -- This procedure is another version of get_xref_values which uses concatenated_segments as
32 -- one of the input parameters instead of zero padded concatenated segments
33 --     Retrieve crossreference UOM and Revision base on cross reference type
34 --     and number .
35 -- Input Parameters
36 --    p_org_id
37 --    p_concatenated_segments -
38 --
39 -- Output Parameters
40 --    x_uom_code return a revision if define , otherwise NULL
41 --    x_revision return a revision if define , otherwise NULL
42 --    x_item_id  returns matching item-id of p_cross_reference value
43 
44 PROCEDURE get_xref_values
45   (x_uom_code              OUT NOCOPY VARCHAR2,
46    x_revision              OUT NOCOPY VARCHAR2,
47    x_concatenated_segments OUT NOCOPY VARCHAR2,
48    p_org_id                IN NUMBER,
49    p_cross_reference       IN VARCHAR2);
50 
51 
52 -- ======================================================================
53 -- FUNCTION GenCheckDigit
54 -- ======================================================================
55 -- Purpose
56 --     Generate the CheckDigit for LPN using Modulo 10 Check Digit Algorithm
57 --      1. Consider the right most digit of the code to be in an 'even'
58 --           position and assign odd/even to each character moving from right to
59 --           left.
60 --      2. Sum the digits in all odd positions
61 --      3. Sum the digits in all even positions and multiply the result by 3 .
62 --      4. Sum the totals calculated in steps 2 and 3.
63 --      5. The Check digit is the number which, when added to the totals
64 --         calculated in step 4, result in a number  evenly divisible by 10.
65 
66 -- Input Parameters
67 --    P_lpn_str  (Required)
68 --
69 -- Output value :
70 --    Valid single check digit .
71 --
72 
73 FUNCTION GenCheckDigit(p_lpn_str IN VARCHAR2)
74     RETURN NUMBER;
75 
76 -- Rec Type for UCC128 Attributes from MTL_PARAMETERS
77 TYPE UCC_128_Attributes is RECORD (
78   ORGANIZATION_ID     NUMBER
79 , TOTAL_LPN_LENGTH    NUMBER
80 , UCC_128_SUFFIX_FLAG VARCHAR2(1)
81 );
82 
83 -- Start of comments
84 --  API name: Get_UCC_128_Attributes
85 --  Type    : Private
86 --  Pre-reqs: None.
87 --  Function: Returns the column values from MTL_SYSTEM_ITEMS
88 --            concerning UCC 128 support for a given organization
89 --  Parameters:
90 --  IN OUT:
91 --      x_ucc_128_attributes IN OUT UCC128_Attributes Required
92 --        SUBTYPE to pass in and retrieve UCC128 attributes from
93 --        MTL_PARAMETERS.   It is required that the organization_id
94 --        parameter in this subtype is populated if the p_org
95 --        input parameter is not used
96 --  IN: p_org                IN     INV_VALIDATE.ORG  Optional
97 --        If a properly validated org rec type is available, it
98 --        can be passed to this API to return the values in the
99 --        UCC128RecType.  In this case this api serves as an
100 --        abstraction layer to prevent compile time dependencies
101 --  Version : Current version 1.0
102 -- End of comments
103 
104 PROCEDURE Get_UCC_128_Attributes (
105   x_return_status         OUT NOCOPY VARCHAR2
106 , x_ucc_128_attributes IN OUT NOCOPY UCC_128_Attributes
107 , p_org                IN            INV_VALIDATE.ORG   := NULL
108 );
109 
110 END WMS_UCC_128_PVT;