38: p_trx_type_id IN OUT NOCOPY NUMBER,
39: p_trx_type_code IN OUT NOCOPY VARCHAR2
40: ) IS
41:
42: l_initiator_id_per_name fun_interface_batches.initiator_id%type;
43: l_From_Le_id_per_name fun_interface_batches.from_le_id%type;
44: l_From_Le_id_per_initiator_id fun_interface_batches.from_le_id%type;
45: l_Trx_type_id_per_name fun_interface_batches.trx_type_id%type;
46: l_Trx_type_id_per_code fun_interface_batches.trx_type_id%type;
39: p_trx_type_code IN OUT NOCOPY VARCHAR2
40: ) IS
41:
42: l_initiator_id_per_name fun_interface_batches.initiator_id%type;
43: l_From_Le_id_per_name fun_interface_batches.from_le_id%type;
44: l_From_Le_id_per_initiator_id fun_interface_batches.from_le_id%type;
45: l_Trx_type_id_per_name fun_interface_batches.trx_type_id%type;
46: l_Trx_type_id_per_code fun_interface_batches.trx_type_id%type;
47: l_From_Ledger_id_per_le fun_interface_batches.from_ledger_id%type;
40: ) IS
41:
42: l_initiator_id_per_name fun_interface_batches.initiator_id%type;
43: l_From_Le_id_per_name fun_interface_batches.from_le_id%type;
44: l_From_Le_id_per_initiator_id fun_interface_batches.from_le_id%type;
45: l_Trx_type_id_per_name fun_interface_batches.trx_type_id%type;
46: l_Trx_type_id_per_code fun_interface_batches.trx_type_id%type;
47: l_From_Ledger_id_per_le fun_interface_batches.from_ledger_id%type;
48:
41:
42: l_initiator_id_per_name fun_interface_batches.initiator_id%type;
43: l_From_Le_id_per_name fun_interface_batches.from_le_id%type;
44: l_From_Le_id_per_initiator_id fun_interface_batches.from_le_id%type;
45: l_Trx_type_id_per_name fun_interface_batches.trx_type_id%type;
46: l_Trx_type_id_per_code fun_interface_batches.trx_type_id%type;
47: l_From_Ledger_id_per_le fun_interface_batches.from_ledger_id%type;
48:
49: Cursor c_Init_id_per_name(l_initiator_name IN VARCHAR2) IS
42: l_initiator_id_per_name fun_interface_batches.initiator_id%type;
43: l_From_Le_id_per_name fun_interface_batches.from_le_id%type;
44: l_From_Le_id_per_initiator_id fun_interface_batches.from_le_id%type;
45: l_Trx_type_id_per_name fun_interface_batches.trx_type_id%type;
46: l_Trx_type_id_per_code fun_interface_batches.trx_type_id%type;
47: l_From_Ledger_id_per_le fun_interface_batches.from_ledger_id%type;
48:
49: Cursor c_Init_id_per_name(l_initiator_name IN VARCHAR2) IS
50: SELECT p.party_id
43: l_From_Le_id_per_name fun_interface_batches.from_le_id%type;
44: l_From_Le_id_per_initiator_id fun_interface_batches.from_le_id%type;
45: l_Trx_type_id_per_name fun_interface_batches.trx_type_id%type;
46: l_Trx_type_id_per_code fun_interface_batches.trx_type_id%type;
47: l_From_Ledger_id_per_le fun_interface_batches.from_ledger_id%type;
48:
49: Cursor c_Init_id_per_name(l_initiator_name IN VARCHAR2) IS
50: SELECT p.party_id
51: FROM hz_parties p
444: )
445: IS
446:
447: CURSOR c_batches IS
448: SELECT * FROM fun_interface_batches
449: WHERE source = p_source
450: AND group_id = p_group_id;
451:
452: Cursor c_head(l_batch_id IN NUMBER) is
465: Select allow_invoicing_flag
466: from fun_trx_types_vl
467: where trx_type_id = c_trx_type_id;
468:
469: Curr_batch fun_interface_batches%rowtype;
470: Curr_head fun_interface_headers%rowtype;
471: Curr_dist_line fun_interface_dist_lines%rowtype;
472: Curr_batch_dist fun_interface_batchdists%rowtype;
473:
872: Overall_Status := 'R';
873: end if; ---- Overall Status is Accepted
874:
875: /*Set Import_status_code of Batch with Overall Status; */
876: UPDATE fun_interface_batches set import_status_code = Overall_Status
877: Where batch_id = curr_batch.batch_id;
878:
879: l_trx_tbl.delete;
880: l_init_dist_tbl.delete;
988: BEGIN
989:
990: Delete from fun_interface_dist_lines where
991: Trx_id in (select trx_id from fun_interface_headers where
992: batch_id in (select batch_id from fun_interface_batches where
993: source = p_source and group_id = p_group_id and import_status_code = 'A')) ;
994:
995: Delete from fun_interface_batchdists where
996: batch_id in (select batch_id from fun_interface_batches where
992: batch_id in (select batch_id from fun_interface_batches where
993: source = p_source and group_id = p_group_id and import_status_code = 'A')) ;
994:
995: Delete from fun_interface_batchdists where
996: batch_id in (select batch_id from fun_interface_batches where
997: source = p_source and group_id = p_group_id and import_status_code = 'A');
998:
999: Delete from fun_interface_headers where
1000: Batch_id in (select batch_id from fun_interface_batches where
996: batch_id in (select batch_id from fun_interface_batches where
997: source = p_source and group_id = p_group_id and import_status_code = 'A');
998:
999: Delete from fun_interface_headers where
1000: Batch_id in (select batch_id from fun_interface_batches where
1001: source = p_source and group_id = p_group_id and import_status_code = 'A');
1002:
1003: Delete from fun_interface_batches where
1004: source = p_source and group_id = p_group_id
999: Delete from fun_interface_headers where
1000: Batch_id in (select batch_id from fun_interface_batches where
1001: source = p_source and group_id = p_group_id and import_status_code = 'A');
1002:
1003: Delete from fun_interface_batches where
1004: source = p_source and group_id = p_group_id
1005: and import_status_code = 'A';
1006:
1007: select count(*) into l_count