ERRBUFF and RETCODE : PL/Sql Mandatory Parameters for Concurrent Programs

In Oracle EBS, we can use Concurrent Programs to call a procedure within a package. Every PL/SQL procedure of packages which is being called in a concurrent program must have two mandatory OUT parameters – ERRBUFF and RETCODE
ERRBUF : is used to get error messages.
RETCODE: is used to get the status of the concurrent program. It can take any of the following values
0 – Concurrent Program is successful.
1 – Concurrent program completed with warning.
2 – Concurrent Program has some Error.
Why Do we Have This
Different business have different needs. These two mandatory parameters makes it flexible for the developers to end a concurrent program in error or warning as per their custom needs.
For eg : Lets say we have a procedure that computes salary of a person. A negative salary is an error scenario for the business but not for oracle. As a result concurrent program will end up in success on completion of request. But using RETCODE we can make the concurrent program to end in error by setting its value to 2 and in the similar way we can add our custom error message to the ERRBUF parameter.
Sample Procedure Declaration
CREATE OR REPLACE PACKAGE XX_CUSTOM_PKG
   PROCEDURE validate_salary (X_ERRBUF              OUT VARCHAR2,
                              X_RETCODE             OUT NUMBER,
                              P_USER_ID             IN  NUMBER);
BEGIN
.
.
.
EXCEPTION
     WHEN NEGATIVE_SALARY THEN
        X_ERRBUF : 'Negative salary computed. Incorrect data';
        X_RETCODE = 2;
END;

2 comments:

Anonymous said...

This does not seem to be working when concurrent programs end in warning. The completion text is NULL in those cases.

nachmannoberlander said...

Raging Bull Casino - DRMCD
The Raging Bull Casino is a gambling operation based on a 전주 출장마사지 horse 제주 출장마사지 race that 원주 출장샵 is run by a racetrack, not 김포 출장마사지 the race track. 경기도 출장안마 The Raging Bull Casino

Topics Covered

Purchasing Concurrent program INVENTORY MODULE Inventory Concepts Min-Max Puchasing Sales Order Supply Chain Management Xml Publisher dff Alert Creation Assembly Pull Assigning Approval Groups Assigning Item BOM Tables Backend Tables Base Tables Bills of Material Tables CATALOG TABLES CATEGORY TABLES Closed not Summarized Concurrent Programs Concurrent Request Consigned and VM Inventory Count (*) Customer Items Customer Items Architecture DDL DML Defining Line Type Defining Subinventories Drop Ship EBS EVEN NUMBERED Error: - APP-PER-50022 FND Tables FRM-40735 Fetch Item Information Flexfields Functional GENERIC DISPOSITIONS Hosting ITEM LOCATIONS TABLE Idle Session Timeout Important questions Introduction to Database Invalid Identifier Error Inventory Inventory Implementation Inventory Item master Inventory Transaction Item Attributes Item Cross Reference Item Defining Attributes Item Deletion Item Master Item Relationships Item Status Attributes Item Tables Java Setup for R12 Key Tables Location Creation Lot and Serial Manufacturer Items Move order Normalization ODD NUMBERED ORA-29273 ORDER MANAGEMENT Oracle Apps Oracle Instance Oracle Order Management PURCHASING MODULE Payable Table Payment Terms Procure to Pay Cycle Profile Categories Purchase - PO Revisions Purchase - Purchase Document Types Purchase Order Purchasing - Define Buyers Purchasing - Defining Approval Groups Purchasing - Invoice matching Purchasing Options Quotations Quote Analysis RFQ RICE Components Receipt Routings Receivables (AR) Tables Receiving Options Registration of a Report Requisition Templates Responsibility Query SALES ORDER TABLE SALES PERSON CREATION SCM Service Contract Sql Self Joins Subinventory Subinventory Transfer Supplier Lists Suppliers TEMP Tablespace Toad Value Sets Wildcard Workflow copy column find an PO details implementation inbound order to cash org_id out bound out of the box implementation vanilla implementation