Sunday, September 6, 2015

API to Delete Approver Group

DECLARE
   l_approval_group_name     VARCHAR2 (500) := 'AZHD AP Approval';
   l_approval_group_id       NUMBER := NULL;
   l_object_version_number   NUMBER := NULL;
   l_start_date              DATE := NULL;
   l_end_date                DATE := NULL;
BEGIN
   SELECT approval_group_id, object_version_number
     INTO l_approval_group_id, l_object_version_number
     FROM ame_approval_groups
    WHERE name = l_approval_group_name;

   ame_approver_group_api.
    delete_ame_approver_group (
      p_validate                => FALSE,
      p_approval_group_id       => l_approval_group_id,
      p_object_version_number   => l_object_version_number,
      p_start_date              => l_start_date,
      p_end_date                => l_end_date);

   COMMIT;

   DBMS_OUTPUT.put_line (l_approval_group_id || ' has been deleted ');
END;



--select * from ame_approval_groups where  name = 'Testing with Actual API';

No comments:

Post a Comment