266: PROCEDURE DelComment( X_exp_item_id IN NUMBER
267: , X_status OUT NOCOPY NUMBER )
268: IS
269: BEGIN
270: DELETE FROM pa_expenditure_comments
271: WHERE
272: expenditure_item_id = X_exp_item_id;
273:
274: X_status := 0;
292: , X_status OUT NOCOPY NUMBER )
293: IS
294: BEGIN
295:
296: UPDATE pa_expenditure_comments
297: SET
298: expenditure_comment = X_new_comment
299: , last_update_date = sysdate
300: , last_updated_by = X_user
317: INTO dummy
318: FROM sys.dual
319: WHERE EXISTS
320: ( SELECT NULL
321: FROM pa_expenditure_comments
322: WHERE expenditure_item_id = X_exp_item_id);
323:
324: IF( dummy = 0 ) THEN
325:
764: END IF ;
765:
766: /* Fix for bug 2211472 */
767: /* Adding the comment of original expenditure_item to the reversed expenditure item
768: and storing it in pa_expenditure_comments table */
769: BEGIN
770: SELECT
771: ec.expenditure_comment
772: INTO
771: ec.expenditure_comment
772: INTO
773: item_comment
774: FROM
775: pa_expenditure_comments ec
776: WHERE
777: ec.expenditure_item_id = X_exp_item_id;
778: EXCEPTION
779: WHEN NO_DATA_FOUND THEN
3098: ec.expenditure_comment
3099: INTO
3100: item_comment
3101: FROM
3102: pa_expenditure_comments ec
3103: WHERE
3104: ec.expenditure_item_id = X_exp_item_id;
3105:
3106: EXCEPTION
3709: pa_expenditures_all e
3710: , pa_expenditure_items_all ei
3711: , pa_expenditure_items_all ei2
3712: , pa_transaction_sources ts
3713: , pa_expenditure_comments ec
3714: /* R12 changes - Removed table pa_cost_distribution_lines */
3715: WHERE
3716: e.expenditure_id = ei.expenditure_id
3717: AND ei.expenditure_item_id = ei2.expenditure_item_id