490: and organization_id = l_Org_Ids(indx);
491: Exception
492: WHEN OTHERS THEN
493: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
494: fnd_file.put_line(fnd_file.LOG, ' Error in Revision '||sqlerrm);
495: fnd_file.put_line(fnd_file.LOG, l_msg_data);
496: raise;
497:
498: end revise_process_if_necessary;
491: Exception
492: WHEN OTHERS THEN
493: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
494: fnd_file.put_line(fnd_file.LOG, ' Error in Revision '||sqlerrm);
495: fnd_file.put_line(fnd_file.LOG, l_msg_data);
496: raise;
497:
498: end revise_process_if_necessary;
499:
2955: close c2;
2956: end if;
2957: if l_audit_units_tbl.exists(1) then
2958: FOR orgid IN l_audit_units_tbl.first .. l_audit_units_tbl.last loop
2959: -- fnd_file.put_line(fnd_file.LOG, 'Associating to ' || l_audit_units_tbl(orgid).org_name );
2960: push_proc_per_org(
2961: p_parent_orgprocess_id => p_parent_orgprocess_id,
2962: p_process_id => p_process_id,
2963: p_org_id => l_audit_units_tbl(orgid).organization_id,
2971: x_msg_data => l_msg_data);
2972:
2973: IF l_return_status <> 'S' THEN
2974: show_warning := true;
2975: fnd_file.put_line(fnd_file.LOG, 'Error when Associating the process to ' || l_audit_units_tbl(orgid).org_name );
2976: fnd_file.put_line(fnd_file.LOG, l_msg_data );
2977: ELSE
2978: -- If user wants the processes to be associated as approved, user should set this profile to Y.
2979: -- Note that to get the whole hierarchy approved, user needs to set the approval option to
2972:
2973: IF l_return_status <> 'S' THEN
2974: show_warning := true;
2975: fnd_file.put_line(fnd_file.LOG, 'Error when Associating the process to ' || l_audit_units_tbl(orgid).org_name );
2976: fnd_file.put_line(fnd_file.LOG, l_msg_data );
2977: ELSE
2978: -- If user wants the processes to be associated as approved, user should set this profile to Y.
2979: -- Note that to get the whole hierarchy approved, user needs to set the approval option to
2980: -- "approve everything down below". Else only the process id passed will be approved.
2992: show_warning := true;
2993: ROLLBACK;
2994: -- Unapproved object associations exists exception may happen..catche them here..
2995: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
2996: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||l_audit_units_tbl(orgid).org_name );
2997: fnd_file.put_line(fnd_file.LOG, l_msg_data);
2998: END;
2999: END IF;
3000: END IF;
2993: ROLLBACK;
2994: -- Unapproved object associations exists exception may happen..catche them here..
2995: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
2996: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||l_audit_units_tbl(orgid).org_name );
2997: fnd_file.put_line(fnd_file.LOG, l_msg_data);
2998: END;
2999: END IF;
3000: END IF;
3001: -- Done associating...Commit here..
3523: fetch l_org_cur bulk collect into l_audit_units_tbl;
3524: close l_org_cur;
3525: if l_audit_units_tbl.exists(1) then
3526: FOR orgid IN l_audit_units_tbl.first .. l_audit_units_tbl.last loop
3527: -- fnd_file.put_line(fnd_file.LOG, 'Associating to ' || l_audit_units_tbl(orgid).org_name );
3528: push_proc_per_org(
3529: p_parent_orgprocess_id => p_parent_orgprocess_id,
3530: p_process_id => p_process_id,
3531: p_org_id => l_audit_units_tbl(orgid).organization_id,
3539: x_msg_data => l_msg_data);
3540:
3541: IF l_return_status <> 'S' THEN
3542: show_warning := true;
3543: fnd_file.put_line(fnd_file.LOG, 'Error when Associating the process to ' || l_audit_units_tbl(orgid).org_name );
3544: fnd_file.put_line(fnd_file.LOG, l_msg_data );
3545: ELSE
3546: -- If user wants the processes to be associated as approved, user should set this profile to Y.
3547: -- Note that to get the whole hierarchy approved, user needs to set the approval option to
3540:
3541: IF l_return_status <> 'S' THEN
3542: show_warning := true;
3543: fnd_file.put_line(fnd_file.LOG, 'Error when Associating the process to ' || l_audit_units_tbl(orgid).org_name );
3544: fnd_file.put_line(fnd_file.LOG, l_msg_data );
3545: ELSE
3546: -- If user wants the processes to be associated as approved, user should set this profile to Y.
3547: -- Note that to get the whole hierarchy approved, user needs to set the approval option to
3548: -- "approve everything down below". Else only the process id passed will be approved.
3560: show_warning := true;
3561: ROLLBACK;
3562: -- Unapproved object associations exists exception may happen..catche them here..
3563: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
3564: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||l_audit_units_tbl(orgid).org_name );
3565: fnd_file.put_line(fnd_file.LOG, l_msg_data);
3566: END;
3567: END IF;
3568: END IF;
3561: ROLLBACK;
3562: -- Unapproved object associations exists exception may happen..catche them here..
3563: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
3564: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||l_audit_units_tbl(orgid).org_name );
3565: fnd_file.put_line(fnd_file.LOG, l_msg_data);
3566: END;
3567: END IF;
3568: END IF;
3569: -- Done associating...Commit here..
7317:
7318: Exception
7319: when others then
7320: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7321: fnd_file.put_line(fnd_file.LOG, ' Error in sync_people_revoke_grant '||sqlerrm);
7322: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7323: raise;
7324: END ;
7325:
7318: Exception
7319: when others then
7320: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7321: fnd_file.put_line(fnd_file.LOG, ' Error in sync_people_revoke_grant '||sqlerrm);
7322: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7323: raise;
7324: END ;
7325:
7326: --******************************************************************************
7418:
7419: Exception
7420: when others then
7421: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7422: fnd_file.put_line(fnd_file.LOG, ' Error in sync_people_add_grant '||sqlerrm);
7423: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7424: raise;
7425:
7426: END ;
7419: Exception
7420: when others then
7421: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7422: fnd_file.put_line(fnd_file.LOG, ' Error in sync_people_add_grant '||sqlerrm);
7423: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7424: raise;
7425:
7426: END ;
7427:
7449: END LOOP;
7450: EXCEPTION
7451: when others then
7452: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7453: fnd_file.put_line(fnd_file.LOG, ' Error in sync_process_people '||sqlerrm);
7454: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7455: raise;
7456: END;
7457:
7450: EXCEPTION
7451: when others then
7452: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7453: fnd_file.put_line(fnd_file.LOG, ' Error in sync_process_people '||sqlerrm);
7454: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7455: raise;
7456: END;
7457:
7458: /*
7794: END IF;
7795: EXCEPTION
7796: when pending_approval_exception then
7797: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7798: fnd_file.put_line(fnd_file.LOG, ' Error in Revision '||sqlerrm);
7799: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7800:
7801: raise;
7802: WHEN no_data_found THEN
7795: EXCEPTION
7796: when pending_approval_exception then
7797: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7798: fnd_file.put_line(fnd_file.LOG, ' Error in Revision '||sqlerrm);
7799: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7800:
7801: raise;
7802: WHEN no_data_found THEN
7803: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7800:
7801: raise;
7802: WHEN no_data_found THEN
7803: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7804: fnd_file.put_line(fnd_file.LOG, ' Error in Revision '||sqlerrm);
7805: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7806:
7807: return;
7808: END;
7801: raise;
7802: WHEN no_data_found THEN
7803: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
7804: fnd_file.put_line(fnd_file.LOG, ' Error in Revision '||sqlerrm);
7805: fnd_file.put_line(fnd_file.LOG, l_msg_data);
7806:
7807: return;
7808: END;
7809:
8464: show_warning := true;
8465: ROLLBACK;
8466: -- Unapproved object associations exists exception may happen..catche them here..
8467: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8468: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||Org_Ids(indx) );
8469: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8470: END;
8471: END IF;
8472: END LOOP;
8465: ROLLBACK;
8466: -- Unapproved object associations exists exception may happen..catche them here..
8467: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8468: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||Org_Ids(indx) );
8469: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8470: END;
8471: END IF;
8472: END LOOP;
8473:
8477: when pending_approval_exception then
8478: show_warning := true;
8479: ROLLBACK;
8480: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8481: fnd_file.put_line(fnd_file.LOG, ' Error when Synchronizing the process in organization');
8482: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8483: when OTHERS then
8484: show_warning := true;
8485: ROLLBACK;
8478: show_warning := true;
8479: ROLLBACK;
8480: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8481: fnd_file.put_line(fnd_file.LOG, ' Error when Synchronizing the process in organization');
8482: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8483: when OTHERS then
8484: show_warning := true;
8485: ROLLBACK;
8486: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8483: when OTHERS then
8484: show_warning := true;
8485: ROLLBACK;
8486: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8487: fnd_file.put_line(fnd_file.LOG, ' Error when Synchronizing the process in organization ');
8488: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8489: END;
8490:
8491: if show_warning then
8484: show_warning := true;
8485: ROLLBACK;
8486: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8487: fnd_file.put_line(fnd_file.LOG, ' Error when Synchronizing the process in organization ');
8488: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8489: END;
8490:
8491: if show_warning then
8492: conc_status:=FND_CONCURRENT.SET_COMPLETION_STATUS('WARNING','Process cannot be synchronized to some organizations');
8761: IF l_assoc_app_prof = 'Y' THEN
8762: AMW_UTILITY_PVT.cache_appr_options;
8763: END IF;
8764: FOR orgid IN l_audit_units_tbl.first .. l_audit_units_tbl.last loop
8765: -- fnd_file.put_line(fnd_file.LOG, 'Associating to ' || l_audit_units_tbl(orgid).org_name );
8766: push_proc_per_org(
8767: p_parent_orgprocess_id => p_parent_orgprocess_id,
8768: p_process_id => p_process_id,
8769: p_org_id => l_audit_units_tbl(orgid).organization_id,
8777: x_msg_data => l_msg_data);
8778:
8779: IF l_return_status <> 'S' THEN
8780: show_warning := true;
8781: fnd_file.put_line(fnd_file.LOG, 'Error when Associating the process to ' || l_audit_units_tbl(orgid).org_name );
8782: fnd_file.put_line(fnd_file.LOG, l_msg_data );
8783: ELSE
8784: -- If user wants the processes to be associated as approved, user should set this profile to Y.
8785: -- Note that to get the whole hierarchy approved, user needs to set the approval option to
8778:
8779: IF l_return_status <> 'S' THEN
8780: show_warning := true;
8781: fnd_file.put_line(fnd_file.LOG, 'Error when Associating the process to ' || l_audit_units_tbl(orgid).org_name );
8782: fnd_file.put_line(fnd_file.LOG, l_msg_data );
8783: ELSE
8784: -- If user wants the processes to be associated as approved, user should set this profile to Y.
8785: -- Note that to get the whole hierarchy approved, user needs to set the approval option to
8786: -- "approve everything down below". Else only the process id passed will be approved.
8798: show_warning := true;
8799: ROLLBACK;
8800: -- Unapproved object associations exists exception may happen..catche them here..
8801: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8802: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||l_audit_units_tbl(orgid).org_name );
8803: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8804: END;
8805: END IF;
8806: END IF;
8799: ROLLBACK;
8800: -- Unapproved object associations exists exception may happen..catche them here..
8801: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,p_count => l_msg_count,p_data => l_msg_data);
8802: fnd_file.put_line(fnd_file.LOG, ' Error when Approving the process in organization ' ||l_audit_units_tbl(orgid).org_name );
8803: fnd_file.put_line(fnd_file.LOG, l_msg_data);
8804: END;
8805: END IF;
8806: END IF;
8807: -- Done associating...Commit here..
8818: end if;
8819: COMMIT;
8820: EXCEPTION
8821: WHEN same_request_exception THEN
8822: fnd_file.put_line(fnd_file.LOG, 'ERROR:'|| SQLERRM);
8823: conc_status:=FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',
8824: 'There is already a concurrent process running for a similar process id.'||
8825: 'This concurrent request is also being run with the same value for parameter "Process id" '||
8826: ' and the parameter "Organization Name or Range" that the earlier concurrent program is running with. '