396: p_simulation in varchar2
397: )
398: is
399:
400: cursor c_rcv_shipment_headers(p_shipment_header_id number) is
401: select receipt_num
402: from rcv_shipment_headers
403: where shipment_header_id = p_shipment_header_id;
404:
398: is
399:
400: cursor c_rcv_shipment_headers(p_shipment_header_id number) is
401: select receipt_num
402: from rcv_shipment_headers
403: where shipment_header_id = p_shipment_header_id;
404:
405: cursor c_rcv_transactions
406: (p_shipment_header_id number)is
612: ln_tparty_invalid_comb_cnt number;
613: lv_assets_tracking_flag varchar2(1);
614: ln_accrual_account number;
615: ld_goods_received_date date;
616: lv_receipt_num rcv_shipment_headers.receipt_num%type;
617:
618: r_rcv_transactions c_rcv_transactions%rowtype;
619: r_get_vendor_details c_get_vendor_details%rowtype;
620:
824: open c_get_assets_tracking_flag(p_shipment_header_id);
825: fetch c_get_assets_tracking_flag into lv_assets_tracking_flag;
826: close c_get_assets_tracking_flag;
827:
828: open c_rcv_shipment_headers(p_shipment_header_id);
829: fetch c_rcv_shipment_headers into lv_receipt_num;
830: close c_rcv_shipment_headers;
831:
832: if r_rcv_transactions.po_distribution_id is not null then
825: fetch c_get_assets_tracking_flag into lv_assets_tracking_flag;
826: close c_get_assets_tracking_flag;
827:
828: open c_rcv_shipment_headers(p_shipment_header_id);
829: fetch c_rcv_shipment_headers into lv_receipt_num;
830: close c_rcv_shipment_headers;
831:
832: if r_rcv_transactions.po_distribution_id is not null then
833:
826: close c_get_assets_tracking_flag;
827:
828: open c_rcv_shipment_headers(p_shipment_header_id);
829: fetch c_rcv_shipment_headers into lv_receipt_num;
830: close c_rcv_shipment_headers;
831:
832: if r_rcv_transactions.po_distribution_id is not null then
833:
834: open c_get_po_dist_account(r_rcv_transactions.po_distribution_id);