555: X_progress := '060';
556:
557: SELECT count(po_distribution_id)
558: INTO X_num_of_distributions
559: FROM po_distributions pd
560: WHERE pd.po_line_id = X_po_line_id
561: AND NOT EXISTS (SELECT 'there are encumbered distributions'
562: FROM po_distributions pd2
563: WHERE pd2.po_line_id = X_po_line_id
558: INTO X_num_of_distributions
559: FROM po_distributions pd
560: WHERE pd.po_line_id = X_po_line_id
561: AND NOT EXISTS (SELECT 'there are encumbered distributions'
562: FROM po_distributions pd2
563: WHERE pd2.po_line_id = X_po_line_id
564: AND nvl(pd2.encumbered_flag, 'N') <> 'N');
565:
566:
571:
572: /*Bug4906693 who columns like last_updated_by and last_update_login
573: also needs to be updated.*/
574:
575: UPDATE po_distributions
576: SET amount_ordered = X_amount_db,
577: last_update_date = sysdate,
578: last_updated_by = X_last_updated_by,
579: last_update_login = X_last_update_login
583:
584: /*Bug4906693 who columns like last_updated_by and last_update_login
585: also needs to be updated.*/
586:
587: UPDATE po_distributions
588: SET quantity_ordered = X_quantity,
589: last_update_date = sysdate,
590: last_updated_by = X_last_updated_by,
591: last_update_login = X_last_update_login