[Home] [Help]
2760: p_data => x_msg_data);
2761:
2762: END AddItemsToCart_orig;
2763:
2764: /*This function creates the XML message required by the CZ_CF_API.Validate API*/
2765: function get_xml_for_validate(p_model_item_id IN number,
2766: p_model_quantity IN number,
2767: p_quote_header_id IN number,
2768: p_inv_org_id IN number,
2790: str_xml_string varchar2(2000);
2791: begin
2792:
2793: l_database_id := fnd_web_config.database_id;
2794: l_session_ticket :=cz_cf_api.icx_session_ticket;
2795: --l_context_org_id :=fnd_profile.value('ORG_ID');
2796: l_responsibility_id := fnd_profile.value('RESP_ID') ;
2797: l_calling_application_id := fnd_profile.value('RESP_APPL_ID');
2798: l_servlet_url := fnd_profile.value('CZ_UIMGR_URL') ;
2919: /*Following parameters added for Education project*/
2920: loop_counter Number;
2921: l_xml_string_for_validate varchar2(2000); /*This holds the XML string to be passed to validate API*/
2922: lx_xml_from_validate varchar2(2000); /*This holds the XML string returned by validate API*/
2923: l_input_selection cz_cf_api.input_selection;
2924: l_cfg_input_list cz_cf_api.cfg_input_list;
2925: lx_cfg_output_pieces cz_cf_api.cfg_output_pieces;
2926: l_validation_status number;
2927: l_config_header_id number := fnd_api.g_miss_num;
2920: loop_counter Number;
2921: l_xml_string_for_validate varchar2(2000); /*This holds the XML string to be passed to validate API*/
2922: lx_xml_from_validate varchar2(2000); /*This holds the XML string returned by validate API*/
2923: l_input_selection cz_cf_api.input_selection;
2924: l_cfg_input_list cz_cf_api.cfg_input_list;
2925: lx_cfg_output_pieces cz_cf_api.cfg_output_pieces;
2926: l_validation_status number;
2927: l_config_header_id number := fnd_api.g_miss_num;
2928: l_config_rev_num number;
2921: l_xml_string_for_validate varchar2(2000); /*This holds the XML string to be passed to validate API*/
2922: lx_xml_from_validate varchar2(2000); /*This holds the XML string returned by validate API*/
2923: l_input_selection cz_cf_api.input_selection;
2924: l_cfg_input_list cz_cf_api.cfg_input_list;
2925: lx_cfg_output_pieces cz_cf_api.cfg_output_pieces;
2926: l_validation_status number;
2927: l_config_header_id number := fnd_api.g_miss_num;
2928: l_config_rev_num number;
2929: l_complete_config_flag varchar2(5);
3093: end if;
3094:
3095: /*Call Batch validation program here*/
3096: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3097: IBE_Util.Debug('Begin cz_cf_api.validate');
3098: END IF;
3099: cz_cf_api.validate(config_input_list =>l_cfg_input_list,
3100: init_message =>get_xml_for_validate(x_qte_line_tbl(loop_count).inventory_item_id,
3101: x_qte_line_tbl(loop_count).quantity,
3095: /*Call Batch validation program here*/
3096: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3097: IBE_Util.Debug('Begin cz_cf_api.validate');
3098: END IF;
3099: cz_cf_api.validate(config_input_list =>l_cfg_input_list,
3100: init_message =>get_xml_for_validate(x_qte_line_tbl(loop_count).inventory_item_id,
3101: x_qte_line_tbl(loop_count).quantity,
3102: x_quote_header_id,
3103: x_qte_line_tbl(loop_count).organization_id,
3105: config_messages =>lx_cfg_output_pieces,
3106: validation_status =>l_validation_status,
3107: url =>l_servlet_url);
3108: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3109: IBE_Util.Debug('End cz_cf_api.validate');
3110: END IF;
3111: /*Parse the XML message for config_header_id, config_rev_num returned by the Batch validate program*/
3112: lx_xml_from_validate := lx_cfg_output_pieces(1);
3113: l_config_header_id := to_number(substr(lx_xml_from_validate,(instr(lx_xml_from_validate, '
3116: l_complete_config_flag :=
3117: substr(lx_xml_from_validate,(instr(lx_xml_from_validate,'
3118: l_qte_line_rec := x_qte_line_tbl(loop_count);
3119:
3120: /*Error handling if cz_cf_api.validate failed*/
3121: IF (l_config_header_id is NULL) THEN
3122: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3123: IBE_Util.Debug('Error in CZ_CF_API.Validate:Printing the terminate string: '||lx_xml_from_validate);
3124: END IF;
3119:
3120: /*Error handling if cz_cf_api.validate failed*/
3121: IF (l_config_header_id is NULL) THEN
3122: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3123: IBE_Util.Debug('Error in CZ_CF_API.Validate:Printing the terminate string: '||lx_xml_from_validate);
3124: END IF;
3125: IF FND_Msg_Pub.Check_Msg_Level(FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
3126: FND_Message.Set_Name('IBE','IBE_DSP_GENERIC_ERROR_TXT');
3127: FND_Message.Set_Token('IBE_DSP_GENERIC_ERROR_TXT',lx_xml_from_validate);