386: PROCEDURE Add_Allocation_From_Charge
387: ( p_charge IN po_rcv_charges%ROWTYPE
388: , p_charge_allocation_table IN OUT NOCOPY PO_CHARGES_GRP.charge_allocation_table_type
389: ) IS
390: l_charge_allocation po_rcv_charge_allocations%ROWTYPE;
391: BEGIN
392: SELECT po_rcv_charge_allocations_s.NEXTVAL
393: INTO l_charge_allocation.charge_allocation_id
394: FROM dual;
388: , p_charge_allocation_table IN OUT NOCOPY PO_CHARGES_GRP.charge_allocation_table_type
389: ) IS
390: l_charge_allocation po_rcv_charge_allocations%ROWTYPE;
391: BEGIN
392: SELECT po_rcv_charge_allocations_s.NEXTVAL
393: INTO l_charge_allocation.charge_allocation_id
394: FROM dual;
395:
396: l_charge_allocation.creation_date := SYSDATE;
1034:
1035: RAISE l_fail_all_charges;
1036: END IF;
1037:
1038: -- populate po_rcv_charge_allocations
1039: Allocate_Charges( l_charge_table, l_charge_allocation_table , l_charge_interface_table );
1040:
1041: -- populate po_rcv_charges
1042: FORALL i IN 1..l_charge_table.COUNT
1045:
1046: asn_debug.put_line('Inserted ' || SQL%ROWCOUNT || ' rows into PO_RCV_CHARGES');
1047:
1048: FORALL i IN 1..l_charge_allocation_table.COUNT
1049: INSERT INTO po_rcv_charge_allocations
1050: VALUES l_charge_allocation_table(i);
1051:
1052: asn_debug.put_line('Inserted ' || SQL%ROWCOUNT || ' rows into PO_RCV_CHARGE_ALLOCATIONS');
1053:
1048: FORALL i IN 1..l_charge_allocation_table.COUNT
1049: INSERT INTO po_rcv_charge_allocations
1050: VALUES l_charge_allocation_table(i);
1051:
1052: asn_debug.put_line('Inserted ' || SQL%ROWCOUNT || ' rows into PO_RCV_CHARGE_ALLOCATIONS');
1053:
1054: -- update rcv_charges_interface with status code
1055: Update_Interface_Charges(l_charge_interface_table);
1056: