1 PACKAGE ego_item_associations_util AUTHID CURRENT_USER AS
2 /* $Header: EGOVIAUS.pls 120.1 2007/03/26 15:22:12 earumuga noship $ */
3
4 G_SUPPLIER_NAME VARCHAR2(500) := 'aas.vendor_name';
5 G_SUPPLIER_NUMBER VARCHAR2(500) := 'aas.segment1';
6 G_DUNS_NUMBER VARCHAR2(500) := 'hp.duns_number_c';
7 G_TAX_PAYER_ID VARCHAR2(500) := 'aas.num_1099';
8 G_TAX_REGISTRATION_NUMBER VARCHAR2(500) :='aas.vat_registration_num';
9 G_SUPPLIER_SITE_NAME VARCHAR2(500) := 'asa.vendor_site_code';
10 G_CITY VARCHAR2(500) := 'asa.city';
11 G_STATE VARCHAR2(500) := 'asa.state';
12 G_COUNTRY VARCHAR2(500) := 'asa.country';
13
14 -- Start of comments
15 -- API name : search_supplier_and_site
16 -- Type : Private.
17 -- Function : Searches the supplier and site for the given criteria
18 -- Pre-reqs :
19 -- i) Search criteria is built using the constants specified in ego_item_associations_util or EgoSearchAssociationAM.
20 -- ii) Search Columns and Criteria has same number of values
21 -- iii) If p_search_sites is fnd_api.G_FALSE, then the criteria
22 -- for those columns should not be passed.
23 -- Will result in SQL exception if passed.
24 -- iv) Atleast one criteria has been specified to search.
25 -- v) Passed organization id should be master organization id. No validation will be done from search. Wrong value
26 -- will result in no rows.
27 -- Parameters :
28 -- IN : p_api_version IN NUMBER Required
29 -- p_batch_id INOUT NOCOPY NUMBER Required
30 -- p_search_cols IN EGO_VARCHAR_TBL_TYPE Required
31 -- p_search_criteria IN EGO_VARCHAR_TBL_TYPE Required
32 -- p_search_sites IN VARCHAR2 Optional Default fnd_api.G_FALSE
33 -- p_filter_rows IN VARCHAR2 Optional Default fnd_api.G_FALSE
34 -- p_inventory_item_id IN NUMBER Optional Default NULL
35 -- p_master_org_id IN NUMBER Required
36 -- p_search_existing_site_only IN VARCHAR2 Optional Default fnd_api.G_FALSE
37 -- Version : Current version 1.0
38 -- Initial version 1.0
39 -- Notes : p_search_cols contains the search criteria columns. The list of columns are
40 -- defined as constants in ego_item_associations_util.
41 -- p_search_criteria will be corresponding search criteria for the columns.
42 -- Criteria and column names mapped based on index of the tables.
43 -- p_search_sites allows to search/return site results.
44 -- p_filter_rows specifies whether already associated needs to be filtered or not
45 -- p_master_org_id Master Organization Id in context of which the search needs to be performed
46 -- p_search_existing_site_only Searches only existing sites. Used in item-site-org flow
47 --
48 -- End of comments
49 PROCEDURE search_supplier_and_site
50 (
51 p_api_version IN NUMBER
52 ,p_batch_id IN OUT NOCOPY NUMBER
53 ,p_search_cols IN EGO_VARCHAR_TBL_TYPE
54 ,p_search_criteria IN EGO_VARCHAR_TBL_TYPE
55 ,p_search_sites IN VARCHAR2 DEFAULT fnd_api.G_FALSE
56 ,p_filter_rows IN VARCHAR2 := fnd_api.G_FALSE
57 ,p_inventory_item_id IN NUMBER := NULL
58 ,p_master_org_id IN NUMBER
59 ,p_search_existing_site_only IN VARCHAR2 := fnd_api.G_FALSE
60 ,p_filter_suppliers IN VARCHAR2 := fnd_api.G_FALSE
61 );
62
63 /*PROCEDURE a_debug(p_msg VARCHAR2);*/
64
65 FUNCTION is_supplier_contact(p_party_id IN NUMBER) RETURN VARCHAR2;
66
67 END ego_item_associations_util;