417: p_simulation in varchar2
418: )
419: is
420:
421: cursor c_rcv_shipment_headers(p_shipment_header_id number) is
422: select receipt_num
423: from rcv_shipment_headers
424: where shipment_header_id = p_shipment_header_id;
425:
419: is
420:
421: cursor c_rcv_shipment_headers(p_shipment_header_id number) is
422: select receipt_num
423: from rcv_shipment_headers
424: where shipment_header_id = p_shipment_header_id;
425:
426: cursor c_rcv_transactions
427: (p_shipment_header_id number)is
651: ln_tparty_invalid_comb_cnt number;
652: lv_assets_tracking_flag varchar2(1);
653: ln_accrual_account number;
654: ld_goods_received_date date;
655: lv_receipt_num rcv_shipment_headers.receipt_num%type;
656:
657: r_rcv_transactions c_rcv_transactions%rowtype;
658: r_get_vendor_details c_get_vendor_details%rowtype;
659:
866: open c_get_assets_tracking_flag(p_shipment_header_id);
867: fetch c_get_assets_tracking_flag into lv_assets_tracking_flag;
868: close c_get_assets_tracking_flag;
869:
870: open c_rcv_shipment_headers(p_shipment_header_id);
871: fetch c_rcv_shipment_headers into lv_receipt_num;
872: close c_rcv_shipment_headers;
873:
874: if r_rcv_transactions.po_distribution_id is not null then
867: fetch c_get_assets_tracking_flag into lv_assets_tracking_flag;
868: close c_get_assets_tracking_flag;
869:
870: open c_rcv_shipment_headers(p_shipment_header_id);
871: fetch c_rcv_shipment_headers into lv_receipt_num;
872: close c_rcv_shipment_headers;
873:
874: if r_rcv_transactions.po_distribution_id is not null then
875:
868: close c_get_assets_tracking_flag;
869:
870: open c_rcv_shipment_headers(p_shipment_header_id);
871: fetch c_rcv_shipment_headers into lv_receipt_num;
872: close c_rcv_shipment_headers;
873:
874: if r_rcv_transactions.po_distribution_id is not null then
875:
876: open c_get_po_dist_account(r_rcv_transactions.po_distribution_id);