Call the Create Parameter API
To create a Parameter, call the API CDR_PUB_DF_PARAMETER.CREATEPARAMETER.
Its signature is:
PROCEDURE CREATEPARAMETER( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_PARAMNAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PIO_CDRPARAMOBJTYPE IN OUT CDR_PARAMETER_OBJ_TYPE, PI_CREATE_OBJECT IN VARCHAR2, PI_INSTANCE_SUBTYPE_ID IN CDR_NAMINGS.OBJECT_SUBTYPE_ID%TYPE, PI_PARENTNAMING IN OUT CDR_BASE_OBJ_TYPE, PO_DEFCLASSIFICATIONCOLL IN CDR_CLASSIFICATIONS_COLL );
Enter parameter values as follows:
- PIO_PARAMNAMING. Enter CDR_NAMING_VERSION_OBJ_TYPE values as follows:
- company_id =
Enter_your_company_ID
- obj_id = null
- obj_ver = null
- object_type_rc =
'$OBJTYPES$PARAMETER'
- name = '
Enter_a_name_for_the_Parameter
'Note:
For the Name and Description attributes, enter a meaningful value appropriate for each Parameter. This is important because you will probably create many Parameters and you will need to create instances of them. - namespace_obj_id =
Enter_your_Adapter_Area's_obj_id
- namespace_obj_ver = 1
- namespace_start_obj_ver = 1
- namespace_end_obj_ver=
cdr_def_constants.cdr_max_def_object_version
- owning_location_rc = null
- checked_out_flag_rc =
'$YESNO$NO'
- checked_out_id = null
- object_subtype_id = null
- description =
'Enter_a_Description_for_the_Parameter
' - copied_from_company_id = null
- copied_from_obj_id = null
- copied_from_obj_ver = null
- ref_company_id =
Enter_your_company_ID
- ref_obj_id =
Enter_the_obj_ID_of_the_Variable_this_Parameter_references
- ref_obj_ver = 1
- object_version_number = 1
- status_rc =
'$NAMING_STATUS$INSTALLABLE'
- validation_status_rc = null
- version_label = null
- company_id =
- PIO_CDRPARAMOBJTYPE. Enter CDR_PARAMETER_OBJ_TYPE values that apply to the Parameter definition, as follows:
- company_id =
Enter_your_company_ID
- obj_id = null
- obj_ver = 1
- prompt =
'Enter_the_label_you_want_to_appear_in_the_UI'
- allowed_values_rc (Required) This attribute determines what type of value the Parameter will support. For further information, see the chapter on Parameters in the Oracle LSH Application Developer's Guide. The allowed attribute values are:
- $PARAMALLOWVALS$PGMGENLOV (Program-generated list of values)
- $PARAMALLOWVALS$STATICLOV (Static list of values)
- $PARAMALLOWVALS$SINGLEVALUE ( Single value)
- lov_company_id = null
- lov_id = null
- lov_ver = null
- lov_prg_inst_company_id = null or, if you are defining a programmatically generated list of values, enter the company_id of the Program instance that you need to run to generate the LOV.
- lov_prg_inst_id = null or, if you are defining a programmatically generated list of values, enter the obj_id of the Program instance that you need to run to generate the LOV.
- lov_prg_inst_ver = null or, if you are defining a programmatically generated list of values, enter the obj_ver of the Program instance that you need to run to generate the LOV.
- lov_sc_ref_company_id = null or, if you are defining a programmatically generated list of values, enter the company_id of the relevant Source Code instance in the Program instance.
- lov_sc_ref_id = null or, if you are defining a programmatically generated list of values, enter the obj_id of the relevant Source Code instance in the Program instance.
- lov_sc_ref_ver = null or, if you are defining a programmatically generated list of values, enter the obj_ver of the relevant Source Code instance in the Program instance.
- lov_cla_level_id = null or, if you are defining a list of values based on terms in a classification hierarchy level, enter the level_id of the of the relevant level.
- lov_default_cla_id = null
- lov_multi_flag_rc Enter
$YESNO$YES
if the Parameter supports either a static list of values or a program-generated list of values and you want to support selecting more than one value at a time in the user interface.Enter
$YESNO$NO
if the Parameter supports only a single value. - validation_rule_rc Enter one of the following values:
$VALDNRULES$NONE
(no validation rule defined)$VALDNRULES$USEALLOWEDVALS
(the parameter's value will be validated against the list of values defined for the parameter, either Programatic or Static)$VALDNRULES$PROGRAMMATIC
(the parameter's value will be validated against a list of values generated by source code different from the source code that generates the Parameter's list of values—if any)
- val_prg_inst_company_id = null or, if you are validating user-entered values programmatically, enter the company_id of the Program instance that you run to perform the validation.
- val_prg_inst_id = null or, if you are validating user-entered values programmatically, enter the obj_id of the Program instance that you run to perform the validation.
- val_prg_inst_ver = null or, if you are validating user-entered values programmatically, enter the obj_ver of the Program instance that you run to perform the validation.
- val_sc_ref_company_id = null or, if you are validating user-entered values programmatically, enter the company_id of the relevant Source Code instance in the Program instance.
- val_sc_ref_id = null or, if you are validating user-entered values programmatically, enter the obj_id of the relevant Source Code instance in the Program instance.
- val_sc_ref_ver = null or, if you are validating user-entered values programmatically, enter the obj_ver of the relevant Source Code instance in the Program instance.
- input_output_rc =
'$PARAMDIRECTS$INOUT'
- read_only_flag_rc =
'$YESNO$NO'
- visible_flag_rc =
'$YESNO$YES'
- mandatory_flag_rc =
'$YESNO$YES'
- default_value = null (or enter a default value if you want one)
- position = null
- param_type_rc = null
Note:
By default the system sets the Parameter type to Scalar. - auto_share_field_flag_rc = null
- company_id =
- PI_CREATEOBJECT Enter
DEFN
. - PI_INSTANCE_SUBTYPE_ID = null
- PI_PARENTNAMING Enter CDR_BASE_OBJ_TYPE values that apply to your Adapter Area as follows:
- company_id =
Enter_the_company_id_of_your_Adapter_Area
- obj_id =
Enter_the_obj_id_of_your_Adapter_Area
- obj_ver = 1
- company_id =
- PO_DEFCLASSIFICATIONCOLL Null
Parent topic: Creating a Parameter