Create relation for ATO products
This will create all entry's in line_detail table and line table and line relation table fro ATO items
l_model_line_rec.quote_line_id := l_model_quote_line_id;
l_model_line_rec.quote_header_id := p_active_header_id;
l_model_line_rec.org_id := l_org_id;
--l_model_line_rec.
line_category_code
:= 'ORDER';
l_model_line_rec.item_type_code := 'MDL';
l_model_line_rec.organization_id := li_organization_id;
l_model_line_rec.inventory_item_id := l_cfg_inventory_item_id;
l_model_line_rec.quantity := 1;
l_model_line_rec.order_line_type_id := 1028;
l_model_line_rec.price_list_id := l_cfg_price_list_id;
-----------------------------
l_config_rec.quote_line_id := l_model_quote_line_id;
l_config_rec.qte_line_index := 1;
l_config_rec.complete_configuration_flag := 'Y';
l_config_rec.valid_configuration_flag := 'Y';
l_config_rec.config_header_id := l_new_config_hdr_id;
l_config_rec.config_revision_num := l_new_config_rev_nbr;
l_config_rec.quote_line_detail_id := l_aso_quote_line_detail_id;
------------------------------
--control details --
l_control_rec.pricing_request_type := 'ASO';
l_control_rec.calculate_freight_charge_flag := 'Y';
l_control_rec.calculate_tax_flag := 'Y';
l_control_rec.header_pricing_event := 'BATCH';
l_control_rec.price_mode := 'ENTIRE_QUOTE';
l_return_message := NULL;
l_return_status := NULL;
l_msg_count := NULL;
l_msg_data := NULL;
aso_cfg_pub.get_config_details (
p_api_version_number => c_api_version1,
p_init_msg_list =>
l_init_msg_list,
p_commit
=>
l_commit,
p_control_rec => l_control_rec,
p_config_rec => l_config_rec,
p_model_line_rec =>
l_model_line_rec,
p_config_hdr_id =>
l_new_config_hdr_id,
p_config_rev_nbr =>
l_new_config_rev_nbr,
p_quote_header_id => p_active_header_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data
=>
l_msg_data
);
No comments:
Post a Comment