Salary Management rollback the proposed Salary


To rollback the proposed salary which has been uploaded by webadi in Salary Management we have to use API to delete the uploaded Records.

So first query the records that has been uploaded in the backend by the below Query

select * from per_pay_proposals where change_date = :p_date;

Once you are sure to remove the records use the below

DECLARE
CURSOR fetch_det
IS
SELECT   *
FROM   per_pay_proposals
WHERE   TRUNC (change_date) = trunc(sysdate-73);

l_salary_warning   BOOLEAN;
l_err_msg          VARCHAR2 (500);
BEGIN
FOR i IN fetch_det
LOOP
BEGIN
hr_maintain_proposal_api.delete_salary_proposal (
p_pay_proposal_id         => i.pay_proposal_id,
p_business_group_id       => i.business_group_id,
p_object_version_number   => i.object_version_number,
p_validate                => FALSE,
p_salary_warning          => l_salary_warning
);
COMMIT;
DBMS_OUTPUT.put_line (
‘Proposal has been Deleted: ‘ || i.pay_proposal_id
);

COMMIT;
EXCEPTION
WHEN OTHERS
THEN
l_err_msg := SQLERRM;
DBMS_OUTPUT.put_line (‘Inner Exception: ‘ || l_err_msg);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
l_err_msg := SQLERRM
DBMS_OUTPUT.put_line (‘Main Exception: ‘ || l_err_msg);
END;

Advertisements

About pacesettergraam

A good and realistic person

Posted on March 15, 2017, in Oracle, oracle apps and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: