The following lines contain the word 'select', 'insert', 'update' or 'delete':
that are updated and deleted from the model.
ASO_CFG_INT.Parse_output_xml : parses the CZ output xml message to see if the configuration
is valid and complete.
ASO_CFG_INT.Get_config_details : To save options along with the model line in ASO_QUOTE_LINES_ALL
, ASO_QUOTE_LINE_DETAILS and ASO_LINE_RELATIONSHIPS
-----------------------------------------------------------------------*/
PROCEDURE Validate_Configuration
(P_Api_Version_Number IN NUMBER ,
P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
P_Commit IN VARCHAR2 := FND_API.G_FALSE,
p_control_rec IN aso_quote_pub.control_rec_type
:= aso_quote_pub.G_MISS_control_rec,
P_model_line_id IN NUMBER,
P_Qte_Line_Tbl IN ASO_QUOTE_PUB.Qte_Line_Tbl_Type
:= ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL,
P_Qte_Line_Dtl_Tbl IN ASO_QUOTE_PUB.Qte_Line_Dtl_Tbl_Type
:= ASO_QUOTE_PUB.G_MISS_QTE_LINE_DTL_TBL,
P_UPDATE_QUOTE IN VARCHAR2 := FND_API.G_FALSE,
P_EFFECTIVE_DATE IN Date := FND_API.G_MISS_DATE,
P_model_lookup_DATE IN Date := FND_API.G_MISS_DATE,
X_config_header_id OUT NOCOPY /* file.sql.39 change */ NUMBER,
X_config_revision_num OUT NOCOPY /* file.sql.39 change */ NUMBER,
X_valid_configuration_flag OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
X_complete_configuration_flag OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
X_config_changed OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
X_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
X_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
X_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'Validate_Configuration' ;
l_delete_config VARCHAR2(1) := fnd_api.g_false;
select config_hdr_id
from cz_config_details_v
where config_hdr_id = p_config_hdr_id
and config_rev_nbr = p_config_rev_nbr;
l_delete_config := fnd_api.g_true;
aso_debug_pub.add('Validate_Configuration: l_delete_config: '||l_delete_config);
IF ((l_return_status =FND_API.G_RET_STS_SUCCESS) and (p_update_quote=fnd_api.g_false) and (l_delete_config=fnd_api.g_false))THEN
--dbms_output.put_line('Entered ASO_VALIDATE_CFG_PVT p_update_quote is false');
aso_debug_pub.add('Update Quote: A higher version exist for this configuration so deleting it from CZ');
ASO_CFG_INT.DELETE_CONFIGURATION_AUTO( P_API_VERSION_NUMBER => 1.0,
P_INIT_MSG_LIST => FND_API.G_FALSE,
P_CONFIG_HDR_ID => l_config_header_id,
P_CONFIG_REV_NBR => l_config_revision_num,
X_RETURN_STATUS => x_return_status,
X_MSG_COUNT => x_msg_count,
X_MSG_DATA => x_msg_data);
aso_debug_pub.add('After call to ASO_CFG_INT.DELETE_CONFIGURATION_AUTO: x_Return_Status: ' || x_Return_Status);
FND_MESSAGE.Set_Name('ASO', 'ASO_DELETE');
elsif (l_return_status = FND_API.G_RET_STS_SUCCESS) and (l_delete_config = fnd_api.g_false) and (p_update_quote = fnd_api.g_true)THEN
-- Call GET_CONFIG_DETAILS to update the existing configuration
-- Set the Call_batch_validation_flag to FND_API.G_FALSE to avoid recursive call to update_quote
--dbms_output.put_line('Entered ASO_VALIDATE_CFG_PVT p_update_quote is true');
l_delete_config := fnd_api.g_true;
aso_debug_pub.add('Validate_Configuration: l_delete_config: '||l_delete_config);
if l_delete_config = fnd_api.g_true then
x_return_status := FND_API.G_RET_STS_ERROR;
select org_id from aso_quote_headers_all
where quote_header_id = p_quote_header_id;
select organization_id from aso_quote_lines_all
where quote_line_id = p_quote_line_id;