197: -- COMMENT:
198: -- Based on input parameter values, eligble records from WDD are fetced.
199: -- Records fetched are grouped into Shipment Batches based on grouping
200: -- criteria returned from WSH_CUSTOM_PUB.Shipment_Batch_Group_Criteria
201: -- Custom API. A record is inserted into Wsh_Shipment_Batches table for
202: -- each shipment Batch and corresponding batch name is stamped in WDD.
203: --
204: -- Mandatory grouping criteria for Shipment Batch is
205: -- a) Customer
834: IF nvl(l_grp_by_fob_code, 'Y') = 'Y' THEN
835: l_shipment_batch_tbl(l_cnt).fob_code := l_fob_code_tbl(i);
836: END IF;
837:
838: SELECT Wsh_Shipment_Batches_S.nextval
839: INTO l_batch_id
840: FROM DUAL;
841:
842: --Stores batch id of batches created.
842: --Stores batch id of batches created.
843: l_batch_tbl(l_batch_tbl.count+1) := l_batch_id;
844: l_raise_batch_tbl(l_raise_batch_tbl.count+1) := l_batch_id; --Fulfillment Batch XML Project
845:
846: INSERT INTO Wsh_Shipment_Batches (
847: batch_id,
848: name,
849: org_id,
850: currency_code,
1114: requested_quantity,
1115: delivery_detail_id
1116: from wsh_delivery_details wdd,
1117: wsh_transactions_history wth,
1118: wsh_shipment_batches wsb
1119: where source_code = 'OE'
1120: and released_status in ( 'R', 'B', 'X' )
1121: and wdd.shipment_batch_id = wsb.batch_id
1122: and wsb.name = entity_number