This chapter covers the following topics:
PL/SQL Package Name: HZ_CLASSIFICATION_V2PUB
Java Class Name: HzClassificationV2Pub
TYPE class_category_rec_type IS RECORD ( class_category VARCHAR2(30), allow_multi_parent_flag VARCHAR2(1), allow_multi_assign_flag VARCHAR2(1), allow_leaf_node_only_flag VARCHAR2(1), created_by_module VARCHAR2(150), application_id NUMBER delimiter VARCHAR2(1), )
TYPE class_code_relation_rec_type IS RECORD class_category VARCHAR2(30), class_code VARCHAR2(30), sub_class_code VARCHAR2(30), start_date_active DATE, end_date_active DATE, created_by_module VARCHAR2(150), application_id NUMBER )
TYPE code_assignment_rec_type IS RECORD ( code_assignment_id NUMBER, owner_table_name VARCHAR2(30), owner_table_id NUMBER, owner_table_key_1 VARCHAR2(255) owner_table_key_2 VARCHAR2(255) owner_table_key_3 VARCHAR2(255) owner_table_key_4 VARCHAR2(255) owner_table_key_5 VARCHAR2(255) class_category VARCHAR2(30), class_code VARCHAR2(30), primary_flag VARCHAR2(1), content_source_type VARCHAR2(30):= HZ_PARTY_V2PUB.G_MISS_ CONTENT_SOURCE_TYPE, start_date_active DATE, end_date_active DATE, status VARCHAR2(1), created_by_module VARCHAR2(150), application_id NUMBER rank NUMBER )
TYPE class_category_use_rec_type IS RECORD ( class_category VARCHAR2(30), owner_table VARCHAR2(240), column_name VARCHAR2(240), additional_where_clause VARCHAR2(4000), created_by_module VARCHAR2(150), application_id NUMBER )
public static class ClassCategoryRec { public String class_category; public String allow_multi_parent_flag; public String allow_multi_assign_flag; public String allow_leaf_node_only_flag; public String created_by_module; public BigDecimal application_id; public String delimiter
public ClassCategoryRec(); public ClassCategoryRec(boolean __RosettaUseGMISSValues); }
public static class ClassCodeRelationRec { public String class_category; public String class_code; public String sub_class_code; public java.sql.Timestamp start_date_active; public java.sql.Timestamp end_date_active; public String created_by_module; public BigDecimal application_id;
public ClassCodeRelationRec(); public ClassCodeRelationRec(boolean __RosettaUseGMISSValues); }
public static class CodeAssignmentRec { public BigDecimal code_assignment_id; public String owner_table_name; public BigDecimal owner_table_id; public String class_category; public String class_code; public String primary_flag; public String content_source_type; public java.sql.Timestamp start_date_active; public java.sql.Timestamp end_date_active; public String status; public String created_by_module; public BigDecimal application_id; public String rank;
public CodeAssignmentRec(); public CodeAssignmentRec(boolean __RosettaUseGMISSValues); }
public static class ClassCategoryUseRec { public String class_category; public String owner_table; public String column_name; public String additional_where_clause; public String created_by_module; public BigDecimal application_id;
public ClassCategoryUseRec(); public ClassCategoryUseRec(boolean__RosettaUseGMISSValues); }
This routine is used to create a Class Category. The API creates a record in the HZ_CLASS_CATEGORIES table. A Class Category provides a way to classify parties and party sites. For example, NAICS_1997 (1997 North American Industry Classification System) is a class category. A class category corresponds to an AR lookup type and the related class codes are lookup codes of the lookup type. Users has to create a valid lookup type before creating the class category using that lookup type.
PROCEDURE create_class_category( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_class_category_rec IN CLASS_CATEGORY_REC_TYPE, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void createClassCategory ( OracleConnection_connection, String p_init_msg_list, ClassCategoryRec p_class_category_rec, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Create Class Category API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | ValidationDefaultComment |
---|---|---|---|---|
class_category | IN | VARCHAR2 | Yes | Validation:
|
allow_multi_parent_flag | IN | VARCHAR2 | No | Validation: Validated against FND lookup type YES/NO |
allow_multi_assign_flag | IN | VARCHAR2 | No | Validation: Validated against FND lookup type YES/NO |
allow_leaf_node_only_flag | IN | VARCHAR2 | No | Validation: Validated against FND lookup type YES/NO |
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate application from which creation of record is initiated |
delimiter | IN | VARCHAR2 | No | Comment: Used for concatenated class code in the HZ_CLASS_CODE_DENORM table. Default value is / . |
This routine is used to update a Class Category. The API updates a record in the HZ_CLASS_CATEGORIES table.
PROCEDURE update_class_category( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_class_category_rec IN CLASS_CATEGORY_REC_TYPE, p_object_version_number IN OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void updateClassCategory( OracleConnection_connection, String p_init_msg_list, ClassCategoryRec p_class_category_rec, BigDecimal [ ] p_object_version_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Update Class Category API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
class_category | IN | VARCHAR2 | Yes | Validation:
|
allow_multi_parent_flag | IN | VARCHAR2 | No | Validation:
|
allow_multi_assign_flag | IN | VARCHAR2 | No | Validation:
|
allow_leaf_node_only_flag | IN | VARCHAR2 | No | Validation:
|
created_by_module | IN | VARCHAR2 | Yes | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if value exists |
delimiter | IN | VARCHAR2 | No | Comment: Used for concatenated class code in the HZ_CLASS_CODE_DENORM table. Default value is / . |
p_object_version_number | IN OUT |
NUMBER | Yes | Validation:
Comment:
|
This routine is used to create a Class Code Relation. The API creates a record in the HZ_CLASS_CODE_RELATIONS table. The class codes are related to a class category. For example, the class category NAICS_1997 has
the code 11 (Agriculture, Forestry, Fishing and Hunting).
the code 111 (Crop Production)
the code 1111 (Oilseed and Grain Farming)
You can relate the code 11 as parent code of the code 111, which in turn can be related as parent code of the code 1111. This way you can set up the class codes as parent child relationship. As a class category is a lookup type, the class codes of a class category are the lookup codes of that lookup type.
PROCEDURE create_class_code_relation p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_class_code_relation_rec IN CLASS_CODE_RELATION_REC_TYPE, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void createClassCodeRelation( OracleConnection_connection, String p_init_msg_list, ClassCodeRelationRec p_class_code_relation_rec, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Create Class Code Relation API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
class_category | IN | VARCHAR2 | Yes | Validation: Validated against HZ_CLASS_CATEGORIES.CLASS_CATEGORY |
class_code | IN | VARCHAR2 | Yes | Validation:
|
sub_class_code | IN | VARCHAR2 | Yes | Validation:
|
start_date_active | IN | DATE | No | |
end_date_active | IN | DATE | No | Validation:
|
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate application from which creation of record is initiated |
This routine is used to update a Class Code Relation. The API updates a record in table HZ_CLASS_CODE_RELATIONS.
PROCEDURE update_class_code_relation( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_class_code_relation_rec IN CLASS_CODE_RELATION_REC_TYPE, p_object_version_number IN OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void updateClassCodeRelation( OracleConnection_connection, String p_init_msg_list, ClassCodeRelationRec p_class_code_relation_rec, BigDecimal [ ] p_object_version_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Update Class Code Relation API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
class_category | IN | VARCHAR2 | Yes | Validation: Validated against HZ_CLASS_CATEGORIES |
class_code | IN | VARCHAR2 | Yes | Validation: Validated the existence of the relation (class_category, class_code, sub_class_code, start_date_active) |
sub_class_code | IN | VARCHAR2 | Yes | Validation: Part of the existence validation |
start_date_active | IN | DATE | No | Validation: Part of the existence validation |
end_date_active | IN | DATE | No | Validation:
|
created_by_module | IN | VARCHAR2 | No | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if value exists |
p_object_version_number | IN OUT |
NUMBER | Yes | Validation:
Comment:
|
This routine is used to create a Code Assignment. The API creates a record in the HZ_CODE_ASSIGNMENTS table. An assignment of class code links an instance of the class code to an instance of the classified table. The HZ_CODE_ASSIGNMENTS table is an intersection table that links the classification codes in the AR_LOOKUPS view to the instances of the parties or other entities stored in the table identified in the OWNER_TABLE_NAME column. The OWNER_TABLE_ID column holds the value of the ID column of the classified table.
The primary code assignment of type CUSTOMER_CATEGORY is denormalized into the HZ_PARTIES table. The primary SIC code assignment is denormalized into HZ_PARTIES and HZ_ORGANIZATION_PROFILES.
PROCEDURE create_code_assignment( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_code_assignment_rec IN CODE_ASSIGNMENT_REC_TYPE, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2, x_code_assignment_id OUT NUMBER )
public static void createCodeAssignment( OracleConnection_connection, String p_init_msg_list, CodeAssignmentRec p_code_assignment_rec, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data, BigDecimal [ ] x_code_assignment_id ) throws SQLException;
The following table lists information about the parameters in the Create Code Assignment API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
code_assignment_id | IN | NUMBER | No | Validation: Unique if passed in, else generated from sequence |
owner_table_name | IN | VARCHAR2 | No | Validation: Validated against fnd lookup values where lookup type = 'CODE_ASSIGN_OWNER_TABLE' |
owner_table_id | IN | NUMBER | No | Validation: One or the other of owner_table_id or owner_table_key_1 must be supplied. Both cannot be supplied. If supplied the value must correspond to the primary key value of the entity which is being classified. |
owner_table_key_1 | IN | VARCHAR2 | No | Validation: One or the other of owner_table_id or owner_table_key_1 must be supplied. Both cannot be supplied. If supplied the value must correspond to the primary key value of the entity which is being classified. Not updateable. |
owner_table_key_2 | IN | VARCHAR2 | No | Validation: If owner_table_key_1 is not supplied, then this parameter cannot be supplied. If supplied the value must correspond to the primary key value of the entity which is being classified. Not updateable. |
owner_table_key_3 | IN | VARCHAR2 | No | Validation: If owner_table_key_2 is not supplied, then this parameter cannot be supplied. If supplied the value must correspond to the primary key value of the entity which is being classified. Not updateable. |
owner_table_key_4 | IN | VARCHAR2 | No | Validation: If owner_table_key_3 is not supplied, then this parameter cannot be supplied. If supplied the value must correspond to the primary key value of the entity which is being classified. Not updateable. |
owner_table_key_5 | IN | VARCHAR2 | No | Validation: If owner_table_key_4 is not supplied, then this parameter cannot be supplied. If supplied the value must correspond to the primary key value of the entity which is being classified. Not updateable. |
class_category | IN | VARCHAR2 | No | Validation: Validated against HZ_CLASS_CATEGORIES |
class_code | IN | VARCHAR2 | No | Validation: Validated against FND lookup values where the LOOKUP_TYPE = CLASS_CATEGORY. A class code must be a valid lookup_code from the lookup_type which name is the CLASS_CATEGORY. |
primary_flag | IN | VARCHAR2 | No | Validation:
|
content_source_type | IN | VARCHAR2 | No | Comment: This parameter is no longer used. Use actual_content_source. Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system with sst_flag value of Y. Default: USER_ENTERED |
start_date_active | IN | DATE | No | |
end_date_active | IN | DATE | No | Validation: must be null or greater than start_date_active |
Status | IN | VARCHAR2 | No | Validation: Validated against AR_LOOKUP type CODE_STATUS |
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate module from which creation of record is initiated |
actual_content_source | IN | VARCHAR2 | No | Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system with sst_flag value of Y. |
x_code_assignment_id | OUT | NUMBER | No | Comment: Return the code_assignment_id of the code assignment record created |
rank | IN | NUMBER | No | Comment: Provides the ability to rank classes if multiple classes have been assigned to a party. |
This routine is used to update a Code Assignment. The API updates a record in the HZ_CODE_ASSIGNMENTS table.
The primary code assignment of type CUSTOMER_CATEGORY is denormalized into the HZ_PARTIES table. The primary SIC code assignment is denormalized into HZ_PARTIES and HZ_ORGANIZATION_PROFILES.
PROCEDURE update_code_assignment( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_code_assignment_rec IN CODE_ASSIGNMENT_REC_TYPE, p_object_version_number IN OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void updateCodeAssignment( OracleConnection_connection, String p_init_msg_list, CodeAssignmentRec p_code_assignment_rec, BigDecimal [ ] p_object_version_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Update Code Assignment API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
code_assignment_id | IN | NUMBER | Yes | Validation: Validated against HZ_CODE_ASSIGNMENTS.CODE_ASSIGNMENT_ID |
owner_table_name | IN | VARCHAR2 | No | |
owner_table_id | IN | NUMBER | No | |
class_category | IN | VARCHAR2 | Yes | |
class_code | IN | VARCHAR2 | No | |
primary_flag | IN | VARCHAR2 | No | |
content_source_type | IN | VARCHAR2 | No | Comment: This parameter is no longer used. Use actual_content_source. |
start_date_active | IN | DATE | No | |
end_date_active | IN | DATE | No | Comment: Cannot create classification with time period that overlaps an existing classification. Validation: Done in HZ_CLASS_VALIDATE_V2.validate_code_assignment |
status | IN | VARCHAR2 | No | Validation: Validated against AR_LOOKUP type CODE_STATUS |
created_by_module | IN | VARCHAR2 | No | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if value exists |
p_object_version_number | IN OUT |
NUMBER | Yes | Validation:
Comment:
|
rank | IN | NUMBER | No | Comment: Provides the ability to rank classes if multiple classes have been assigned to a party. |
This routine is used to create a Class Category Use. The API creates a record in the HZ_CLASS_CATEGORY_USES table. The classification model is an open structure, the HZ_CLASS_CATEGORY_USES table indicates which tables or subsets of tables, use which classifications. The HZ_CLASS_CATEGORY_USES table stores information about the tables which are going to use a particular class category. The ADDITIONAL_WHERE_CLAUSE is the filter for the subsets of tables. For example the SIC 1987 class category can be used to classify the parties, which have the party type Organization. The COLUMN_NAME column holds the value of the column of the classified table in the OWNER_TABLE column that is used as ID column for class code assignment.
PROCEDURE create_class_category_use ( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_class_category_use_rec IN CLASS_CATEGORY_USE_REC_TYPE, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void createClassCategoryUse( OracleConnection_connection, String p_init_msg_list, ClassCategoryUseRec p_class_category_use_rec, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Create Class Category Use API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
class_category | IN | VARCHAR2 | Yes | Validation: Validated against HZ_CLASS_CATEGORIES |
owner_table | IN | VARCHAR2 | Yes | Validation:
|
column_name | IN | VARCHAR2 | No | |
additional_where_clause | IN | VARCHAR2 | No | |
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate application from which creation of record is initiated |
This routine is used to update a Class Category Use. The API updates a record in the HZ_CLASS_CATEGORY_USES table.
PROCEDURE update_class_category_use ( p_init_msg_list IN VARCHAR2:=FND_API.G_FALSE, p_class_category_use_rec IN CLASS_CATEGORY_USE_REC_TYPE, p_object_version_number IN OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void updateClassCategoryUse( OracleConnection_connection, String p_init_msg_list, ClassCategoryUseRec p_class_category_use_rec, BigDecimal [ ] p_object_version_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Update Class Category Use API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
class_category | IN | VARCHAR2 | Yes | Validation: Validated against HZ_CLASS_CATEGORIES |
owner_table | IN | VARCHAR2 | Yes | Validation:
|
column_name | IN | VARCHAR2 | No | |
additional_where_clause | IN | VARCHAR2 | No | |
created_by_module | IN | VARCHAR2 | No | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if value exists |
p_object_version_number | IN OUT |
VARCHAR2 | Yes | Validation:
Comment:
|
This function determines if an ID can be assigned to a class_category and owner_table. The function returns T if an ID can be assigned to the given class_category, otherwise the function returns F.
FUNCTION is_valid_category( p_owner_table IN VARCHAR2, p_class_category IN VARCHAR2, p_id IN NUMBER, p_key_1 IN NUMBER, p_key_2 IN NUMBER, ) RETURN VARCHAR2
The following table lists information about the parameters in the Is Valid Category API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
p_class_category | IN | VARCHAR2 | Yes | |
p_owner_table | IN | VARCHAR2 | Yes | |
p_id | IN | VARCHAR2 | Yes | Default: NULL |
p_key_1 | IN | VARCHAR2 | Default: NULL | |
p_key_2 | IN | VARCHAR2 | Default: NULL |