Pl/Sql Sample Program 2

CREATE TABLE TAD_EMP_SALARY
(
  EMP_ID        NUMBER(10),
  MONTH         NUMBER(10),
  YEAR          NUMBER(10),
  BASIC_SALARY  NUMBER(15),
  PF            NUMBER(15),
  VAR_ALLOW     NUMBER(10),
  TOTAL         NUMBER(15),primary key(emp_id,month,year)
)

CREATE OR REPLACE procedure TAD_EMP_PAY(p_month number,p_year number)
is
v_month number(20);
v_year number(20);
v_pf number(10);
v_var_allow number(10);
PF varchar2(10);
VAR_ALLOW varchar2(10);
TOTAL varchar2(10);
--c2 tad_pf_var1%rowtype;
cursor c1 is
select empid ,basic_salary from tad_employe_details;
begin
select pf,var_allow into v_pf,v_var_allow from tad_pf_var1 where month=p_month and year=p_year;
for c in c1
loop
PF:= c.basic_salary * v_pf/100;
VAR_ALLOW:= c.basic_salary * v_var_allow/100;
TOTAL:= c.basic_salary +PF +VAR_ALLOW;
v_month:=p_month;
v_year:=p_year;
insert into tad_employe_salary values(c.empid,v_month,v_year,c.basic_salary,PF,var_allow,total);
dbms_output.put_line('record is inserted');
commit;
End loop;
end;

___________________________________________
___________________________________________

set serveroutput on 
begin
tad_emp_pay(1,2013);
end;

No comments:

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