Programming Helping

By | September 4, 2017

While development there are lots of programming piece of codes that we use again and again. In this post, we shall be piling up such similar codes or tips or code structures which can help us during development.

Structure of Creating Function

create or replace function lsg_function return number
is
ln_temp number;
begin
ln_temp := 339;
return ln_temp;
end;

Structure of Procedure

create or replace procedure lsg_procedure
is
ln_temp number;
begin
ln_temp := 339;
end;

 

Structure of Package

CREATE OR REPLACE PACKAGE lsg_PKG
AS

 

PROCEDURE lsg_function (
p_from_date IN DATE,
p_to_date IN DATE,
p_Cnt_Records OUT NUMBER,
p_Status OUT VARCHAR2
);

 

END lsg_PKG;
/

 

CREATE OR REPLACE PACKAGE BODY lsg_pkg
AS

PROCEDURE lsg_function (
p_from_date IN DATE,
p_to_date IN DATE,
p_Cnt_Records OUT NUMBER,
p_Status OUT VARCHAR2
)
IS
ln_temp number;
BEGIN
ln_temp :=1;

EXCEPTION WHEN OTHERS THEN
dbms_output.put_line(‘ SQLERRM=’||SQLERRM);

END;

END lsg_pkg;
/

Related Posts:

Apps Technical Interview Questions
Oracle HRMS Interview Questions
Question of the Day
9 Steps to become Oracle Apps Consultant
Hierarchy of OLM Tables
How to create backend logging mechanism
Step to Register Discoverer Report
Steps for creating custom form in Oracle Apps
Clear Global Cache in Oracle Apps
Profile Values in Oracle Forms Personalization
2 simple Steps to make a responsibility read only