Order To Cash Cycle (O2C) :: Q. Difference Between Procedure and Function?

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

ORDER TO CASH CYCLE (O2C):

 O2C starts with Sales Order.

 First we need to enter the Sales Order.

 Then we need to Book the Sales Order.

 Once the order is Booked then we need to start Pick Release Process.

 Once the order is Pick confirmed then we need to ship the goods from staging area to customer
place.

 Then we need to create Invoice.

 After that we need to create Receipt.

 Then post the entries into GL.

Q. Difference between Procedure and Function?

 We can call function as a part of Expression where as procedure we can call as a Statement.

 We can call function in select statement but we cannot call procedure in select statement.

 We can call function in if statement but we cannot call procedure in if statement.

 We can pass function as a parameter where as we cannot pass procedure as a parameter

 Function return a value but Procedure may or may not return a value.

PRAGMA AUTONOMOUS TRANSACTION:


 It is an Independent Transaction to the parent transaction.

Suppose Iam having two procedures A and B. In procedure A Iam performing some DML operations and
invoking procedure B. And in procedure B also Iam performing some DML Operations. If I want to use
COMMIT or ROLLBACK in procedure B only, then I need to use PRAGMA AUTONOMOUS TRANSACTION in
procedure B.
MUTATING ERROR:
If the trigger body of a table performing any DML operations on the effected rows of same table
then mutating error will occur. That table is called as mutating table and that trigger is called Mutating
Trigger.

If you are trying to perform two different types of DML Operations on same table in Row Level Trigger then
Mutating Error will occur.

You might also like