SlideShare a Scribd company logo
1 of 203
Download to read offline
Enterprise
Resource
Planning
ORACLE APPLICATIONS
(11.5.9)
SSSSELECTELECTELECTELECT **** FROMFROMFROMFROM CCCCONTENTSONTENTSONTENTSONTENTS;;;;
SQL CONCEPTSSQL CONCEPTSSQL CONCEPTSSQL CONCEPTS ....................................................................................................................................................................................................................................................................................................................................................................................................................................
CLASSIFICATION OF SQCLASSIFICATION OF SQCLASSIFICATION OF SQCLASSIFICATION OF SQL COMMANDSL COMMANDSL COMMANDSL COMMANDS.................................................................................................................................................................................................................................................... 1111
TABLESTABLESTABLESTABLES ........................................................................................................................................................................................................................................................................................................................................................................................................................................................2222
VIVIVIVIEWSEWSEWSEWS....................................................................................................................................................................................................................................................................................................................................................................................................................................................................3333
SEQUENCESSEQUENCESSEQUENCESSEQUENCES............................................................................................................................................................................................................................................................................................................................................................................................................................3333
EXPLAIN PLANEXPLAIN PLANEXPLAIN PLANEXPLAIN PLAN ............................................................................................................................................................................................................................................................................................................................................................................................................4444
SQLTRACESQLTRACESQLTRACESQLTRACE ....................................................................................................................................................................................................................................................................................................................................................................................................................................5555
TKPROFTKPROFTKPROFTKPROF ........................................................................................................................................................................................................................................................................................................................................................................................................................................................5555
PL SQL CONCEPTSPL SQL CONCEPTSPL SQL CONCEPTSPL SQL CONCEPTS ................................................................................................................................................................................................................................................................................................................................................................................................................
BLOCK STRUCTUREBLOCK STRUCTUREBLOCK STRUCTUREBLOCK STRUCTURE ........................................................................................................................................................................................................................................................................................................................................................................6666
CURSORSCURSORSCURSORSCURSORS............................................................................................................................................................................................................................................................................................................................................................................................................................................7777
CURSOR ATTRIBUTESCURSOR ATTRIBUTESCURSOR ATTRIBUTESCURSOR ATTRIBUTES ........................................................................................................................................................................................................................................................................................................................................................ 8888
EXCEPTIONSEXCEPTIONSEXCEPTIONSEXCEPTIONS............................................................................................................................................................................................................................................................................................................................................................................................................................ 9999
PROCEDURESPROCEDURESPROCEDURESPROCEDURES............................................................................................................................................................................................................................................................................................................................................................................................................ 10101010
FUNCTIONSFUNCTIONSFUNCTIONSFUNCTIONS........................................................................................................................................................................................................................................................................................................................................................................................................................ 11111111
PACKAGESPACKAGESPACKAGESPACKAGES ............................................................................................................................................................................................................................................................................................................................................................................................................................ 12121212
TRIGGERSTRIGGERSTRIGGERSTRIGGERS................................................................................................................................................................................................................................................................................................................................................................................................................................ 13131313
ORACLE APPLICATIONSORACLE APPLICATIONSORACLE APPLICATIONSORACLE APPLICATIONS................................................................................................................................................................................................................................................................................................................................................................................
ERP & AIM METHODOLOGERP & AIM METHODOLOGERP & AIM METHODOLOGERP & AIM METHODOLOGYYYY........................................................................................................................................................................................................................................................................................................................ 14141414
INTRODUCTIONINTRODUCTIONINTRODUCTIONINTRODUCTION ................................................................................................................................................................................................................................................................................................................................................................................................ 15151515
DATABASE STRDATABASE STRDATABASE STRDATABASE STRUCTUREUCTUREUCTUREUCTURE .................................................................................................................................................................................................................................................................................................................................... 16161616
FILE ARCHITECTUREFILE ARCHITECTUREFILE ARCHITECTUREFILE ARCHITECTURE ............................................................................................................................................................................................................................................................................................................................................................17171717
ENTERING ORACLE APPLENTERING ORACLE APPLENTERING ORACLE APPLENTERING ORACLE APPLICATIONS 11.5.9ICATIONS 11.5.9ICATIONS 11.5.9ICATIONS 11.5.9........................................................................................................................................................................................................................ 18181818
USER CREATIONUSER CREATIONUSER CREATIONUSER CREATION........................................................................................................................................................................................................................................................................................................................................................................................ 19191919
STEPS TO REGISTER ASTEPS TO REGISTER ASTEPS TO REGISTER ASTEPS TO REGISTER A REPORTREPORTREPORTREPORT.................................................................................................................................................................................................................................................................................... 20202020
PL/SQL PROCEDURE REGPL/SQL PROCEDURE REGPL/SQL PROCEDURE REGPL/SQL PROCEDURE REGISTRATION STEPSISTRATION STEPSISTRATION STEPSISTRATION STEPS ................................................................................................................................................................................................27272727
XML PUBLISHER REPORTXML PUBLISHER REPORTXML PUBLISHER REPORTXML PUBLISHER REPORT REGISTRATION STEPSREGISTRATION STEPSREGISTRATION STEPSREGISTRATION STEPS ................................................................................................................................................................34343434
TABLE REGISTRATION STABLE REGISTRATION STABLE REGISTRATION STABLE REGISTRATION STEPS IN APPSTEPS IN APPSTEPS IN APPSTEPS IN APPS .................................................................................................................................................................................................................................... 39393939
VALUSETS EXPLANATIONVALUSETS EXPLANATIONVALUSETS EXPLANATIONVALUSETS EXPLANATION ........................................................................................................................................................................................................................................................................................................................ 41414141
WORKING WITH USER EXWORKING WITH USER EXWORKING WITH USER EXWORKING WITH USER EXITSITSITSITS ....................................................................................................................................................................................................................................................................................................45454545
PROFILESPROFILESPROFILESPROFILES ....................................................................................................................................................................................................................................................................................................................................................................................................................................49494949
DIFFERENT API'S WITHDIFFERENT API'S WITHDIFFERENT API'S WITHDIFFERENT API'S WITH SYNTAXSYNTAXSYNTAXSYNTAX.................................................................................................................................................................................................................................................................................... 51515151
MULTI ORGMULTI ORGMULTI ORGMULTI ORG............................................................................................................................................................................................................................................................................................................................................................................................................................53535353
FLEX FEILDSFLEX FEILDSFLEX FEILDSFLEX FEILDS....................................................................................................................................................................................................................................................................................................................................................................................................................55555555
INTERFACESINTERFACESINTERFACESINTERFACES ................................................................................................................................................................................................................................................................................................................................................................................................................56565656
SQL LOADERSQL LOADERSQL LOADERSQL LOADER................................................................................................................................................................................................................................................................................................................................................................................................................ 58585858
CONVERSIONSCONVERSIONSCONVERSIONSCONVERSIONS....................................................................................................................................................................................................................................................................................................................................................................................................60606060
ITEM CONVERSION CONVITEM CONVERSION CONVITEM CONVERSION CONVITEM CONVERSION CONVERSION SCRIPTERSION SCRIPTERSION SCRIPTERSION SCRIPT ....................................................................................................................................................................................................................62626262
ITEM CATEGORIES CONVITEM CATEGORIES CONVITEM CATEGORIES CONVITEM CATEGORIES CONVERSION SCRIPTERSION SCRIPTERSION SCRIPTERSION SCRIPT........................................................................................................................................................................................................................70707070
ITEM ATTACHMENTS CONITEM ATTACHMENTS CONITEM ATTACHMENTS CONITEM ATTACHMENTS CONVERSION SCRIPTVERSION SCRIPTVERSION SCRIPTVERSION SCRIPT.................................................................................................................................................................................................... 77777777
JOINS OF THE TABLESJOINS OF THE TABLESJOINS OF THE TABLESJOINS OF THE TABLES MODULE WISEMODULE WISEMODULE WISEMODULE WISE............................................................................................................................................................................................................................................ 82828282
PURCHASE ORDER WORKFPURCHASE ORDER WORKFPURCHASE ORDER WORKFPURCHASE ORDER WORKFLOWLOWLOWLOW ................................................................................................................................................................................................................................................................................ 88888888
ORDER MANAGEMENT WORORDER MANAGEMENT WORORDER MANAGEMENT WORORDER MANAGEMENT WORKFLOWKFLOWKFLOWKFLOW........................................................................................................................................................................................................................................................................
BOOKING ORDERBOOKING ORDERBOOKING ORDERBOOKING ORDER .................................................................................................................................................................................................................................................................................................................................................... 115115115115
CREATING INVOICECREATING INVOICECREATING INVOICECREATING INVOICE ............................................................................................................................................................................................................................................................................................................................................119119119119
MAKING THE RECEIPTMAKING THE RECEIPTMAKING THE RECEIPTMAKING THE RECEIPT .................................................................................................................................................................................................................................................................................................................... 121121121121
TRANSFERING TO GLTRANSFERING TO GLTRANSFERING TO GLTRANSFERING TO GL........................................................................................................................................................................................................................................................................................................................ 122122122122
RETURNING THE ORDERRETURNING THE ORDERRETURNING THE ORDERRETURNING THE ORDER.................................................................................................................................................................................................................................................................................................... 123123123123
OM FLOWDIAGRAMOM FLOWDIAGRAMOM FLOWDIAGRAMOM FLOWDIAGRAM........................................................................................................................................................................................................................................................................................................................................ 126126126126
OM TABLE RELATION DIOM TABLE RELATION DIOM TABLE RELATION DIOM TABLE RELATION DIAGRAMAGRAMAGRAMAGRAM .................................................................................................................................................................................................................................................... 128128128128
FLOW HOWFLOW HOWFLOW HOWFLOW HOW TABLE EFFECTED WHILETABLE EFFECTED WHILETABLE EFFECTED WHILETABLE EFFECTED WHILE BOOKING ORDERBOOKING ORDERBOOKING ORDERBOOKING ORDER ............................................................................................ 129129129129
TRADING COMMUNITY ARTRADING COMMUNITY ARTRADING COMMUNITY ARTRADING COMMUNITY ARCHITECTURE(TCA)CHITECTURE(TCA)CHITECTURE(TCA)CHITECTURE(TCA)................................................................................................................................................................ 131131131131
CREATION OF ITEMCREATION OF ITEMCREATION OF ITEMCREATION OF ITEM ................................................................................................................................................................................................................................................................................................................................................................ 135135135135
FREQUENTLY ASKED QUEFREQUENTLY ASKED QUEFREQUENTLY ASKED QUEFREQUENTLY ASKED QUERIESRIESRIESRIES................................................................................................................................................................................................................................................................................ 140140140140
Oracle Application 11.5.9 Bias Technologies
0000
Oracle Application 11.5.9 Bias Technologies
1111
SQL CONCEPTS
Structured Query Language(SQL) is the standard language designed to access
relational databases. SQL is pronounced either as the word Sequel or as the letters SQL.
SQL uses simple syntax that is easy to learn and use there are five types of SQL
statements given below.
Query Statements: Allow you to retrieve the rows stored in the database tables. You
write a query using the SQL SELECT statement.
Data Manipulation Language (DML) Statements: Allows you to modify the contents
of the tables. There are three DML statements.
INSERT - Allows you to Insert row(s) into the Table.
UPDATE - Allows you to change a Row.
DELETE - Allows you delete the rows from the Table.
Data Definition Language (DDL): Allows you to define the Data structures, such as
tables that make up a database. There are five basic types of DDL statements.
CREATE – Allows you to Create Database structure.
Ex: Create Table – Used to create a Table in the Database.
Create User – Used to create the database user.
ALTER – Allows you to modify a database structure.
DROP – Allows you to remove a database structure.
RENAME – Allows you to change the name of the table.
TRUNCATE – Allows you to delete the entire contents of the table.
Transaction Control (TC) Statements: Allows you to permanently record the changes
made to rows stored in a table or undo the changes. There are three TC Statements.
COMMIT – Allows you to permanently record the changes made to the rows.
ROLLBACK – Allows you to undo the changes made to the rows.
SAVEPOINT – Allows you to set a SAVEPOINT to which you can rollback changes
you made.
Data Control Language (DCL): Allows you to change the permissions on the database
structures. There are two DCL statements.
GRANT – Allows you to give another user access to your database structures,
such as tables.
REVOKE – Allows you to prevent another user from accessing to your database
structures, such as tables.
Oracle Application 11.5.9 Bias Technologies
2222
Tables: Table is a database object which holds the data and contains one or more
columns associated with its datatypes
Creating a Table: we use the create table statement to create a table. The simple
syntax for the creation of table.
Syntax: CREATE Table table_name
(column_name type [CONSTRAINT constraint_def DEFAULT default_exp],
column_name type [CONSTRAINT constraint_def DEFAULT default_exp],
column_name type [CONSTRAINT constraint_def DEFAULT default_exp]…
)
[ON COMMIT {DELETE | PRESERVE} ROWS]
TABLESPACE tab_space;
Ex: SQL> Create table hariha_0016(ename varchar2(10),
Eno number unique);
Table Created.
Altering a Table: we can alter the table using the alter statement. The alter table
statement perform such tasks given below.
Add, modify, or drop a column.
Add or drop a constraint.
Enable or Disable a constraint.
Ex: SQL> Alter table hariha_0016
Add address varchar2(10);
Modifying a Column:
Ex: SQL> Alter table hariha_0016
Modify address varchar2(20);
Dropping a Column:
Ex: SQL> Alter table hariha_0016
Drop address;
Renaming a Table: If we want to change the name of the table then we use this
RENAME statement.
Ex: SQL> Rename table hariha_0016
To
Hariha_0015;
Truncating a Table: If we want to delete all the rows existing in the table then we use
the TRUNCATE Statement.
Ex: SQL> Truncate table hariha_0015;
Dropping a Table: If we want to drop the total structure along with the records existing
in the table we use this DROP statement.
Ex: SQL> Drop table hariha_0015;
Oracle Application 11.5.9 Bias Technologies
3333
Views: A view is basically a predefined query on one or more tables. Retrieving
information from the view is done in the same manner as retrieving from the table.
Creating a View: by using the create view statement we can create a view.
Syntax: Create [Or Replace]
View view_name
[(allias_name[,allias_name….])]
AS subquery
[WITH {CHECK OPTION | READ ONLY} CONSTRAINT
Constraint_name];
Ex: SQL> Create view medha_0016_view AS
Select ename, eno, address from
Hariha_0016;
View Created.
Performing an Insert using a View: we can also perform DML operations using the
views. Given below is the example for that.
Ex: SQL> Insert into medha_0016_view(
Ename, eno, address) Values (HARIHA, 0016, HYD);
1 Row Created.
Modifying a View: we can modify the view using the REPLACE. If there any view
existing with that name then it was modified with the current one.
Ex: SQL> Create or Replace
view medha_0016_view
AS
Select a.ename, a.eno, a.address, b.city from
Hariha_0016 a, hariha_0011 b
Where a.eno = b.eno;
Dropping a View: when want to drop the view we use this statement. Only the view
will be dropped from the database the table was not effected.
Ex: SQL> Drop view hariha_0016_view;
Sequence: A sequence is a database item that generates a sequence of integers. We
create the sequence using the CREATE SEQUENCE statement.
Syntax: Create Sequence Sequence_name
[Start with Start_num]
[Increment by increment_num]
[ {MAXVALUE max_num | NOMAXVALUE} ]
[ {MINVALUE min_num | NOMINVALUE} ]
[ {CYCLE | NOCYCLE} ]
[ {ORDER | NOORDER} ];
Oracle Application 11.5.9 Bias Technologies
4444
Ex: SQL> Create Sequence medha_seq_0016
Start with 100 Increment by 1;
Sequence Created.
Using the Sequence:
Ex: SQL> Select medha_seq_0016.currval ”Currval”,
medha_seq_0016.nextval “Nextval”
From
Dual;
Output: Currval Nextval
--------- ----------
101 101
Modifying the Sequence: If we want to modify the sequence by using the ALTER
SEQUENCE we can do that.
Ex: SQL> Alter Sequence medha_seq_0016
Start with 1000 Increment by 2;
Sequence Altered.
Dropping a Sequence: If we want to drop the sequence then we use this DROP
STATEMENT.
Ex: SQL> Drop Sequence medha_seq_0016;
Sequence Dropped.
Explain Plan: Explain plan gives the execution plan of the statement. PLAN_TABLE is
necessary for explain plan.
If there is no PLAN_TABLE in your system then go with UTLXPLAN.SQL from the
SQL Prompt.
Syntax:
SQL> Explain plan
Set statement_id = ‘hariha_0016’
[into PLAN_TABLE ]
for
select * from scott.emp
where empno = 7369;
Plan Explained.
In TOAD(Tools for Oracle Application Design) write the SQL statement and press
CTRL+E then it automatically shows the explain plan. It is the simple way to get the
explain plan instead of writing the explain plan in SQL.
Oracle Application 11.5.9 Bias Technologies
5555
SQL Trace: SQL Trace gives a wide range of information & statistics that used to tune a
group of SQL operations. We do the Sequel Trace at three levels.
1. SQL
2. Reports
3. Forms
Trace the Sequel Statements. How much time it was taking, how many rows it was
fetching, all the information was given from SQL Trace.
Steps for generating Trace file:
Enable the Trace.
Run the DML statements.
Disable the Trace.
Get the Trace file.
Convert the Trace File to Readable Format.
The Trace file was generated with he extension .TRC. Oracle has give specified
directory for trace files. To get the path use the query below.
EX: SQL> Select value from
V$PARAMETER
Where name = ‘USER_DUMP_DEST’;
To get the name of the Trace file also we have to use the Query.
SQL> Select c.value || ‘ORA’ || TO_CHAR(a.spid, ‘FM00000’) || ‘.TRC’
From
V$PROCESS a,
V$SESSION b,
V$PARAMETER c
Where
a.addr = b.paddr
and b.ausid = userenv(‘sessionid’)
and c.name = ‘USER_DUMP_DEST’;
TKPROF: Copy the trace file, which was generated earlier, and paste it in your custom
directory.
Syntax: CMD> TKPROF d:siri_0016.trc siri_0016.txt
The Hariha_0016.txt was created in the same drive where the Trace file was located.
Ex: --Query to Print the Cumulative Salary of the Employee table order by DEPTNO
SQL> Select deptno, ename, sal, sum(sal) over(partition by
deptno order by deptno, ename) “CUM_SAL”
from
scott.emp;
Oracle Application 11.5.9 Bias Technologies
6666
PL/SQL CONCEPTS
Oracle added a procedural programming language known, as PL/SQL (Procedural
Language/SQL). PL/SQL is a third generation language and contains the standard
programming constructs.
Anonymous Block: An Unnamed block which will not store any where in the database is
know as Anonymous block.
Block Structure: PL/SQL programs are divided up into structures known as blocks, with
each block containing the PL/SQL and SQL statements. The syntax for the structure is
given below.
Syntax: [DECLARE
Variable declaration
Begin
Executable_statements
[Exception
Exception_handling_statements]
End;
Ex: SQL> SET SERVEROUT ON;
SQL> Declare
v_1 number;
v_2 number;
v_3 number;
Begin
v_1:=&v_1;
v_2:=&v_2;
v_3:=&v_3;
if v_1 < v_2 and v_1 < v_3 then
dbms_output.put_line('1st is small');
elsif v_2 < v_3 then
dbms_output.put_line('2nd is small');
else
dbms_output.put_line('3rd is small');
end if;
Exception
When zero_divide then
DBMS_OUTPUT.PUT_LINE(‘Division by ZERO’);
End;
O/p: It will ask for the three input values and will display the smallest number in that.
Difference between PL/SQL and SQL: In PL/SQL there is no buffer to hold the values
so we pass into variables. Here in SQL there is buffer to hold the data temporarily.
Ex: SQL> Select ename from emp where is empno = 7788;
SQL> Declare
V_name varchar2(10);
Begin
Select ename into v_name from emp where empno = 7788;
End;
Oracle Application 11.5.9 Bias Technologies
7777
Cursors: Cursor is a private SQL area provided by the oracle engine. It is mainly used to
retrieve the data from more than one column. There are two types of cursors they are
given below.
Implicit Cursors
Explicit Cursors
Implicit Cursors: Implicit cursor raises implicitly when we use INSERT, UPDATE,
DELETE and SELECT..INTO statements. Because the Implicit cursor is opened and closed
by the PL/SQL engine.
Ex: SQL> declare
v_edata emp%ROWTYPE;
begin
select * into v_edata from emp where empno=7788;
if sql%notfound then
dbms_output.put_line('Record Not Found');
else
dbms_output.put_line('Record Found');
end if;
end;
Processing Explicit Cursors: The four PL/SQL steps necessary for explicit cursor
processing are as follows.
Declare the cursor.
Open the cursor for a Query.
Fetch the results into PL/SQL variables.
Close the Cursor.
Declaration of Cursor: The declaration of the cursor is associated with the select
statement. The syntax for the cursor is given below.
Syntax: CURSOR cursor_name IS select_statement;
Ex: -- To print the Cumulative SAL of the Employee table order by empno
SQL>declare
v_sal number;
v_dno number;
l_count number;
cursor test_cursor is select * from scott.emp order by empno;
begin
v_sal:=0;
v_dno:=0;
for i in test_cursor
loop
if(i.deptno!=v_dno) then
v_sal:= 0;
end if;
v_sal:=v_sal+i.sal;
dbms_output.put_line('Ename: ' || i.ename||' Sal: '|| i.sal || '_
Cum_sal: '|| v_sal || 'Deptno: ' || i.deptno);
l_count:=test_cursor%rowcount;
end loop;
dbms_output.put_line(l_count||' Row(s) Fetched by the Cursor');
end test_cursor;
Oracle Application 11.5.9 Bias Technologies
8888
Cursor Attributes: There are four cursors available in PL/SQL that can be applied to
cursors. Those are given below.
%FOUND
%NOTFOUND
%ISOPEN
%ROWCOUNT
%FOUND: %FOUND is a Boolean attribute. It returns TRUE if the previous FETCH
returned a row and FALSE if it didn’t.
%NOTFOUND: %NOTFOUND is also a Boolean attribute. It returns FALSE if the
previous FETCH returned a row and TRUE if it didn’t. It behaves opposite to the
%FOUND.
%ISOPEN: %ISOPEN is a Boolean attribute. It returns TRUE if the associated cursor is
open other wise it will return FALSE.
%ROWCOUNT: %ROWCOUNT is a Numeric attribute. It returns number of rows
returned by the cursor so far.
Declaring, Opening Fetching and Closing the Cursor:
Ex: SQL> declare
v_eno number;
v_ename varchar2(20);
l_count number;
cursor razia_cursor is select empno,ename from scott.emp;
begin
open razia_cursor;
loop
fetch razia_cursor into v_eno, v_ename;
exit when razia_cursor%notfound;
l_count:=razia_cursor%rowcount;
dbms_output.put_line('Ename: ' || v_ename||' ENUM: '|| v_eno);
end loop;
close razia_cursor;
dbms_output.put_line(l_count||' Row(s) Fetched by the Cursor');
end;
Ex: SQL> -- Example to print the odd rows in the Table EMP
declare
n number;
l_count number;
cursor razia_cursor is select empno,ename,rownum from scott.emp;
begin
for i in razia_cursor
loop
n:=mod(i.rownum,2);
if (n>0) then
dbms_output.put_line('Empno: ' || i.empno||' NAME: '|| i.ename||'
ROWNUM: '|| i.Rownum);
end if;
l_count:=razia_cursor%rowcount;
end loop;
dbms_output.put_line(l_count||' Number of Row(s) Fetched by the Cursor');
end razia_cursor;
Oracle Application 11.5.9 Bias Technologies
9999
Exceptions: An Exception is a error handling statement. It is used when ever our
program terminates abnormally by using the exception we can execute the program
from abnormal termination to normal termination. There are mainly two types of
exceptions they are given below.
Predefined Exceptions.
User defined Exceptions.
Predefined Exceptions: Oracle has predefined several exceptions that correspond to
the most common oracle errors. Some predefined exceptions are given below.
LOGIN_DENIED
NO_DATA_FOUND
ZERO_DIVIDE
TOO_MANY_ROWS
STORAGE_ERROR
ROWTYPE_MISMATCH
INVALID_CURSOR
CURSOR_ALREADY_OPEN
Ex: SQL> declare
cursor test_cursor is select e.ename, d.deptno,
d. dname from scott.emp e, scott.dept d
where e.deptno=20 and d.dname='RESEARCH';
begin
for i in test_cursor
loop
dbms_output.put_line(i.ename || ' ' || i.deptno ||' '|| i.dname);
end loop;
exception
when no_data_found then
dbms_output.put_line('NO DATA FOUND EXCEPTION RAISED');
when others then
dbms_output.put_line(' An Error Raised ' || sqlerrm);
end test_cursor;
User Defined Exceptions: A user defined exception is an error defined by the
programmer. User defined exceptions are declared in the declarative section of the
PL/SQL block just like variables.
Syntax: DECLARE
E_myexception EXCEPTION;
Ex: SQL> create or replace procedure razia_proc(v_sal in number) as
v_sl number;
razia_excep exception;
begin
if(v_sal >= 5000)
then
raise razia_excep;
else
select sal into v_sl from emp order by deptno;
end if;
exception
when razia_excep then
dbms_output.put_line( 'YOU HAVE PERFORMED AN ILLEGAL OPERATION');
end razia_proc;
Oracle Application 11.5.9 Bias Technologies
10101010
Procedures: Procedures are also known as subprograms. Given below is the syntax for
the creation of the procedure.
Syntax: CREATE [OR REPLACE] PROCEDURE procedure_name
[(argument [{IN | OUT | IN OUT}] type,
…
[(argument [{IN | OUT | IN OUT}] type) ] {IS | AS}
BEGIN
procedure_body
END procedure_name;
Ex: SQL> create or replace procedure razia_proc as
v_sal number;
cursor razia_cursor is select * from emp order by deptno;
begin
v_sal := &v_s;
for i in razia_cursor
loop
if(i.sal > v_sal) then
dbms_output.put_line( 'Employee Name: ' || i.ename);
end if;
end loop;
exception
when others then
dbms_output.put_line( 'YOU HAVE PERFORMED AN ILLEGAL OPERATION');
dbms_output.put_line( 'THE PROGRAM MAY TERMINATE NOW');
end razia_proc;
Execution: exec razia_proc;
Passing IN Parameter to the Procedures:
Ex: SQL> create or replace procedure kanthi_proc(p_inpar in number) as
v_name varchar2(30);
begin
select ename into v_name from emp where empno=p_inpar;
dbms_output.put_line( 'Employee Name: ' || v_name);
exception
when others then
dbms_output.put_line( 'YOU HAVE PERFORMED ILLEGAL OPERATION');
end kanthi_proc;
Using IN and OUT parameters to Procedures:
Ex: SQL> create or replace procedure
shabbir_proc(p_outpar out varchar2,p_inpar in number) as
begin
select ename into p_outpar from emp where empno=p_inpar;
end;
--To Catch the Output variable out side the procedure in the SQL
declare
v_name varchar2(20);
v_num number;
begin
mypro(v_name,&v_num);
dbms_output.put_line( 'Employee Name: ' || v_name);
end shabbir_proc;
Oracle Application 11.5.9 Bias Technologies
11111111
Functions: Function is similar to a procedure except that a function must return a value
to the statement from which it is called. The syntax for creating a function is given
below.
Syntax: SQL> CREATE [OR REPLACE] FUNCTION function_name
[(parameter_name[IN | OUT | IN OUT] type [,….])]
RETURN type;
{IS | AS}
BEGIN
Function_body
END function_name;
Ex: create or replace function haritha_func(p_empno number)
return varchar2 is
v_ename varchar2(20);
v_sal number;
begin
select ename,sal into v_ename, v_sal from emp where empno=p_empno;
if v_sal>=6000 then
return 'TRUE';
else
return 'FALSE';
end if;
end haritha_func;
Execution: SQL> select haritha_func(7788) from dual;
Ex: SQL> create or replace function haritha_fun(p_radius number)
return number as
v_pi number := 3.141;
v_area number;
begin
v_area := v_pi * POWER(p_radius,2);
return v_area;
end haritha_fun;
Execution: SQL> select haritha_fun(7) from dual;
Dropping Function and Procedure: When we want to drop the function or procedure
then we use this DROP statement the syntax for the DROP is given below.
Syntax for Dropping Function:
DROP FUNCTION function_name;
Syntax for Dropping Procedure:
DROP PROCEDURE procedure_name;
Oracle Application 11.5.9 Bias Technologies
12121212
Packages: Package is declarative part of the functions and procedures which are stored
in that package. There are two blocks in defining a package.
Package Specification
Package body
Package Specification: The package specification contains information about the
contents of the package. It does not contain code for any subprograms.
Syntax: CREATE [OR REPLACE] PACKAGE package_name {IS | AS}
Type_definition |
Procedure_specification |
Function_specification |
Variable_declaration |
Exception_declaration |
Cursor_declaration |
Pragma_declaration
END [package_name];
Package Body: The package body is separate data dictionary object from the package
header. It cannot be successfully compiled unless the package header is already been
successfully compiled.
Syntax: CREATE [OR REPLACE] PACKAGE BODY package_name {IS | AS}
….
BEGIN
Initialization_code;
END package_name;
Ex: SQL> create or replace package vamsi_pack as
procedure razia_proc(mynum in number);
end vamsi_pack;
-- Declaration of Package Body and passing value to the procedure
create or replace package body vamsi_pack as
procedure razia_proc(mynum in number) as
cursor mycursor is select ename,empno,sal from emp where empno=mynum;
begin
dbms_output.put_line(' NAME ' || ' NUMBER ' || ' SALARY ');
for i in mycursor
loop
dbms_output.put_line(' '||i.ename||' '|| i.empno ||' '|| i.sal);
end loop;
exception
when others then
dbms_output.put_line('YOU HAVE DONE AN ILLEGAL OPERATION ');
end myproc;
end vamsi_pack;
Execution: SQL> exec vamsi_pack.razia_proc(7788);
Oracle Application 11.5.9 Bias Technologies
13131313
Triggers: A Trigger is a procedure that will fire automatically by the database. When a
specified DML statement is run against the specified table. Triggers are useful for doing
things like advanced auditing of changes made to a column values in a table. The syntax
for creating the trigger is given below.
Syntax: CREATE [OR REPLACE] TRIGGER trigger_name
{BEFORE | AFTER | INSTEAD OF} trigger_event
ON table_name
[FOR EACH ROW [WHEN trigger_condition]]
BEGIN
Trigger_body;
END;
Ex: This example is when we insert into a table t1 then the same data has to be inserted
into the table t2. For that we require two tables of one same column.
SQL> CREATE TABLE t1(
Eno number);
SQL> CREATE TABLE t2(
Eno number,
Ins_date date);
SQL> CREATE OR REPLACE TRIGGER razia_trigger
BEFORE INSERT ON TABLE t1
FOR EACH ROW
BEGIN
INSERT INTO TABLE t2
VALUES(:new.eno,sysdate);
END;
Note: For every insert operation on t1 it will insert the eno col values to t2 along with the current
sysdate in the other column.
Disabling and Enabling Trigger: We can stop the trigger from firing by disabling the
trigger by using the ALTER TRIGGER statement. The syntax for enabling the trigger and
disabling the trigger is given below.
Syntax: ALTER TRIGGER trigger_name DISABLE;
ALTER TRIGGER trigger_name ENABLE;
Dropping a Trigger: If we want to drop the trigger from the database then we have to
use DROP TRIGGER statement. The syntax for dropping the trigger is given below.
Syntax: DROP TRIGGER trigger_name;
Oracle Application 11.5.9 Bias Technologies
14141414
ERP: Enterprise Resource Planning
Here Resource means 5 m’s
1. Money
2. Man power
3. Machinery
4. Material and
5. Management
ERP Purpose: Planning for proper utilization of resources for a business organization .
ERP as a Product : all objects(i.e. forms, reports )and all other programs are
developed and throwly tested and those will be provided with these ERP.
Methodology : the process used to implement ERP Product for a business Organization.
AIM (APPLICATION IMPLEMENTATION METHODOLOGY):
Methodology for Oracle Apps is AIM(Applications Implementation Methodology)
Phases in Aim Methodology:
1. Definition Phase
2. Operational Analysis Phase
3. Solution Design Phase
4. Build Phase
5. Transition Phase
6. Production Phase
1. Definition Phase: Here the functional consultants prepare the sample structure
(Blue Print) for the real business by gathering the information.
2. Operational Analysis phase: In this the functional consultant prepare BR100
(Business Requirement).
3. Solution Design Phase: here the functional consultant will prepare MD50 by using
BR100. MD50 is the functional document.
4. Build Phase: here the technical consultant converts MD50 to MD70. MD70 is the
technical document. Then the technical consultant prepare the final object and go
with testing, i.e. Unit Testing.
5. Transition Phase: here SIT(System Integration Testing) and UAT(User
Acceptance Testing) is done. Functional consultant does SIT. After this the
functional consultant will train the user in oracle apps product and user does UAT.
If it is satisfied by the user, it is sign off and product will be given to the user.
6. Production phase: loading the project in the client place. Where the server of
oracle apps in the client place.
Oracle Application 11.5.9 Bias Technologies
15151515
Introduction: The Oracle Applications is an ERP, which was developed by the
Oracle Corp and was used by the several companies to utilize several resources
contained with them.
Business Flow of Oracle Applications:
Oracle Applications is designed for the Financial and Manufacturing clients. The
categories in the modules are given below.
Financial Modules: Account Payables, Account Receivables, General Ledger and Fixed
Assets.
Manufacturing Modules: Purchasing, Inventory, Bill Of Materials, Work in Progress and
Order Management.
In HRMS we maintain all the details of the employee as well as the organization details.
Module: It is a collection of forms and reports which are related to particular business
process.
Purchase order module has the forms and reports which are related to the purchasing
business process. It contains nearly 50,000 tables they are accessed by only purchase
order module.
Oracle Application 11.5.9 Bias Technologies
16161616
Oracle Applications Database Structure:
Schema: Schema is a place in database which contains the database objects like tables,
indexes, sequences, views and synonyms.
In oracle applications database we have individual schemas for each module
application. These schemas contain the database objects of only that particular module.
When we connect any database schema we can access only that schema database
objects. We can’t access other database objects. For data integrity purpose the oracle
has deigned one more schema called Apps schema which contains only synonyms and
this schema have the rights to access any other module database objects.
Note: Apps Schema will not contain the tables it contain only synonyms.
Projects in Oracle Applications:
Implementation Projects: Implementation means we will develop the forms,
reports from the scratch. In this project we will be work in the areas of the forms,
reports, interface, customizations and interfaces.
Customization Projects: In this we customize some standard reports.
Migration / Up gradation Projects: This will be moving from the Old version to the
New version.
Support / Maintenance Projects: Solving the issues which are raised by the end
user while entering the data.
Post Implementation Projects: This will be done at free of cost. It’s a real time
testing.
Oracle Application 11.5.9 Bias Technologies
17171717
Types of Docs in Oracle Apps:
MD 050 -- Module design by the functional consultant.
MD 070 -- Technical Document designed by the technical consultant.
MD 020 -- Technical document designed by the functional document.
MD 0120 -- Migration and user training document by the technical consultant.
CV 040 -- Conversion of the functional document by the functional consultant.
CV 060 -- Conversion of the technical document by the technical consultant.
Note: Conversion means moving the data from the legacy system to the apps system.
Oracle Apps File Architecture:
We will have Linux/Unix server for oracle apps we will be connecting to the server
by using the FTP/TOAD/FILEZILLA/WINSEP3
File Architecture:
The Server first top will be application top “Appl-top” we can change the name
according to the client wish. Under that we have the product top. Each module has go it
individual top.
Oracle Application 11.5.9 Bias Technologies
18181818
Note: We will move the (download/upload) forms and reports from the local machine to the server
always in binary mode. We save any information only on the server not in the local machine.
Entering the Oracle Applications: First it will prompt for the username and password
and then click on the connect button then it will give us responsibilities form. Select to
which responsibility you want to login then you will enter to the oracle applications.
We get the screen as given below when we enter into the system administrator
responsibility.
Oracle Application 11.5.9 Bias Technologies
19191919
User Creation: Connect to the oracle applications 11i as we shown above and enter into
the system administrator responsibility. The navigation to create the user is
Security User Define. The window is given below. Enter the username, password
and assign responsibilities what ever you want and save the user will be created.
Note: when ever we login next time we can enter the user name and password that what we
created now.
Steps to Register a Report:
1. Develop the report in 6i according to the client requirements.
2. Transfer the object from the local system to the server and placing that in the
appropriate directory.
3. Creating the executable and set the execution method as oracle reports as we are
registering the report. Set the executable file name as the object name which we
modified or developed.
4. Create the concurrent program and set the executable to the concurrent program.
If your program has any parameters then go with the parameters button and
submit the parameter tokens.
5. Set the concurrent program to the request group and the request group to the
responsibilities.
6. User having that responsibility will only can run that request or submit the
request of the report.
Note: Every form contains 3 types of fields those are
1. Yellow Colored fields --- Mandatory. With out entering these mandatory fields we
can’t save the form.
2. Green Colored fields --- Read only.
3. White Colored fields --- Optional.
4. Blue colored indicates the form in the query mode. We enter into the query mode by
pressing F11 and enter data which was already saved to retrieve the record press
CTRL+F11.
Oracle Application 11.5.9 Bias Technologies
20202020
Creating the Concurrent Program Executable: Before we start the registration
process we have to create a report according to the client requirements and place the
report in the appropriate directory (Custom top). The navigation for this form is
Concurrent Program Executable. The given below is the executable window.
Window help:
Executable: Set the executable name as we like here we entered the name as per the
program.
Short Name: Set the short name of the executable as related to the executable because
we have to remember them.
Application: Select the Appropriate Application from the list of applications here we
selected the Oracle Receivables because we saved our report (valueset.RDF) in the AR
(Receivables) folder only.
Oracle Application 11.5.9 Bias Technologies
21212121
Description: This field is not a mandatory field if we want to describe the concurrent
program executable we use this field.
Execution Method: There are eleven execution methods we can choose what ever we
want as per the requirements. Those are stated below.
Host: The execution file is a host script. When ever we have an UNIX scripting
programs then we use this execution method.
Immediate: The execution file is a program written to run as a subroutine of the
concurrent manager. We recommend against defining new immediate concurrent
programs, and suggest you use either a PL/SQL Stored Procedure or a Spawned C
Program instead.
Java Stored Procedure: The execution file is a Java stored procedure.
Java Concurrent Program: The execution file is a program written in Java.
Multi Language Function: The execution file is a function (MLS function) that supports
running concurrent programs in multiple languages.
Oracle Reports: The execution file is an Oracle Reports file. To register a report which
we done in report6i we use this method.
PL/SQL Stored Procedure: The execution file is a PL/SQL stored procedure.
Spawned: The execution file is a C or Pro*C program.
SQL * Loader: The execution file is a SQL script.
SQL * Plus: The execution file is a SQL*Plus script.
Note:
1. According to the requirement of the user and the type of the report we created
the execution method will depend.
Execution File Name: We have to set the executable filename as our report name. Here
we create the report name as valueset so; we set the name as valueset.
Subroutine Name: Only immediate programs or spawned programs using the Unified C
API use the subroutine field.
Staging function Parameters (Button): The Stage Function Parameters button opens a
window that allows you to enter parameters for the Request Set Stage Function. This
button is only enabled when you select Request Set Stage Function as your Execution
Method.
After entering all the fields save the form and go to the Concurrent Programs Form. The
Navigation for this is Concurrent Program Define.
Oracle Application 11.5.9 Bias Technologies
22222222
Window Help:
Program: Enter the Program name as we like it is not standard we gave here as
cs_value_prg as per our program.
Enabled (Check Box): Disabled programs do not show up in users' lists, and do not
appear in any concurrent manager queues. You cannot delete a concurrent program
because its information helps to provide an audit trail.
Short Name: The short name is also like the short name in the executable form. We
have to give the name as per the program name.
Application Name: Select the application name as Oracle Receivables. We have to select
the application as what we select in the Executable form.
Description: This field is not a mandatory field if we want to describe the concurrent
program we use this field.
Executable:
Name: Set the executable name as the short name of the executable which we give in
the previous Executable form.
Method: when we enter the executable name there in the name field it was automatically
set which we saved in the executable form.
Priority: you can assign this program it own priority. The concurrent managers process
requests for this program at the priority you assign here.
Oracle Application 11.5.9 Bias Technologies
23232323
Request:
Type: If you want to associate your program with a predefined request type, enter the
name of the request type here.
Incrementor: For use by Oracle Applications internal developers only. The Incrementor
function is shown here.
MLS Function: The Multilingual Concurrent Request feature allows a user to submit a
request once to be run multiple times, each time in a different language. If this program
utilizes this feature the MLS function determines which installed languages are needed
for the request
Use in SRS (Check Box): Check this box to indicate that users can submit a request to
run this program from a Standard Request Submission window.
Run Alone (Check Box): If you check the Use in SRS box, you can also check this box to
allow a user to enter disabled or outdated values as parameter values.
Enable Trace (Check Box): Turns on SQL tracing when program runs.
Allow Disabled Values (Check Box): If you check the Use in SRS box, you can also check
this box to allow a user to enter disabled or outdated values as parameter values.
Restart on system failure Run Alone (Check Box): Use this option to indicate that this
concurrent program should automatically be restarted when the concurrent manager is
restored after a system failure.
NLS Complaint (Check Box): This box is checked if the program allows for a user to
submit a request of this program that will reflect a language and territory that are
different from the language and territory that the users are operating in.
Output:
Format: There are several formats as per the requirements in the report we use this
format here we use the TEXT format.
Save (Check Box): Indicate whether to automatically save the output from this program
to an operating system file when it is run. This value becomes the default for all requests
submitted for this program.
Print (Check Box): If you enter No, your concurrent program's output is never sent to
the printer.
Columns/Rows: Enter the minimum column and row length for this program's report
output. Oracle Applications uses this information to determine which print styles can
accommodate your report.
Style: There are several styles which we can use A4, Landscape, BACS and other styles.
Style Required (Check Box): If your program requires a specific print style (for example,
a check writing report), use this check box to enforce that print style.
Printer: If you want to restrict your program's output to a single printer, enter the name
of the printer to which you want to send your output.
Oracle Application 11.5.9 Bias Technologies
24242424
Buttons:
Copy to (Button): Create another concurrent program using the same executable,
request and report information as the current program. You can optionally copy the
incompatibility and parameter details information as well.
Session Control (Button): Use this window to specify options for the database session of
the concurrent program when it is executed.
Incompatibilities (Button): Identify programs that should not run simultaneously with
your concurrent program because they might interfere with its execution. You can
specify your program as being incompatible with itself.
Parameters (Button): If there are any parameters for our report then we go with the
parameters button. We get the window called parameters when we go with the button.
Note: The window help of the Parameter window will be given in the next steps.
Setting the Concurrent Program to the Request Group: To set the concurrent
program to the request group we have to go to the responsibilities screen. The
navigation is Security Responsibility Define. Then we get the window as shown
below.
Note: Here if we want we can create new responsibility or we can use the existing one. Here we
use the existing one retrieved the existing responsibility name using query mode (F11) as we
discussed earlier.
Now copy the request group name and go to the navigation
Security Responsibility Request. Then Request Groups window will be opened
as shown below. By entering the query mode we have to paste the Request Group name
at the Group field and press CTRL+F11. This form is case sensitive. After that click on
new button and enter the concurrent program name at the name column and go with
save button.
Oracle Application 11.5.9 Bias Technologies
25252525
Submitting the Request: Now switch to the appropriate responsibility then only we
can run the request. Here as per our example we have to enter into the
Receivable Vision Operations. After enter into the responsibility go with the navigation.
Menu View Requests then we get the window find request go with
Submit a New Request button. It will prompt for the Single Request or Request Set. As
our program is the single we go with the Single option. After that we get another
window.
Oracle Application 11.5.9 Bias Technologies
26262626
Enter the concurrent program name at the name field and go with the submit button.
Then we get another window as shown below.
To view the outputs of your program then go with the output button. To view any error
messages you go with the View log button.
Oracle Application 11.5.9 Bias Technologies
27272727
Process to Register a PL/SQL Stored Procedure: This is the PL/SQL Stored
Procedure using the Table Valuesets.
Creating the Procedure:
EX:
SQL> create or replace procedure chaitu_proc(errbuf out varchar2,
retcode out varchar2, p_dno in number, p_dname in varchar2)
as
cursor test_cursor is select e.ename, d.deptno, d.dname from scott.emp e,
scott.dept d where e.deptno=p_dno and d.dname=p_dname;
begin
for i in test_cursor
loop
dbms_output.put_line(i.ename || ' ' || i.deptno ||' '|| i.dname);
end loop;
end chaitu_proc;
Procedure Created.
Note: Here we have to use fnd_file.put_line to view the output in Oracle apps, because
dbms_output.put_line will not work in Oracle Apps
Here in the Procedure there are two mandatory out parameters those are errbuf and retcode.
Errbuf: Used to write the error message to log or request file.
Retcode: if the RETCODE is set to 0 - Then concurrent program will Completed NORMAL.
1 - Then concurrent program will Completed WARNINGS.
2 - Then concurrent program will Completed ERROR.
Creating the Concurrent Program Executable: Before we start the registration
process we have to create a package or Procedure according to the client requirements.
The navigation for this form is Concurrent Program Executable. The given below
is the Navigator window.
Oracle Application 11.5.9 Bias Technologies
28282828
When we go with the above navigation the Executable form will be open then we have
to enter the mandatory fields.
Executable: Set the executable name as we like here we entered the name as per the
program.
Short Name: Set the short name of the executable as related to the executable because
we have to remember them.
Application: Select the application name from the list of applications here we selected
the Oracle Receivables as per our requirements.
Description: This field is not a mandatory field if we want to describe the program we
use this field.
Execution Method: We have to select the PL/SQL Stored Procedure as execution method
to register the myproc1 procedure.
Execution File Name: We have to set the executable filename as procedure name. Here
we our procedure name is mrproc1 so; we set the name as myproc1.
After entering all the fields save the form and go to the Concurrent Programs Form.
The Navigation for this is Concurrent Program Define.
Oracle Application 11.5.9 Bias Technologies
29292929
Enter all the mandatory fields and save the form.
Program: Enter the Program name as we like it is not standard we gave here as
cs_value_prg as per our program.
Short Name: The short name is also like the short name in the executable form. We
have to give the name as per the program name.
Application Name: Select the application name as Oracle Receivables. We have to select
the application as what we select in the Executable form.
Executable Name: Set the executable name as the short name of the executable which
we give in the previous Executable form.
Format: There are several formats as per the requirements in the report we use this
format here we use the TEXT format.
Style: There are several styles which we can use A4, Landscape, BACS and other styles.
Here we are having the two parameters go with Parameters button in the Screen. The
Concurrent Program Parameters window will show below.
Oracle Application 11.5.9 Bias Technologies
30303030
Note: There is no token required where we are working with the PL/SQL STORED PROCEDURE and
observe that the token field in the above window is grayed it won’t allow any values into that field.
Window Help:
Seq: Choose the sequence numbers that specify the order in which your program
receives parameter values from the concurrent manager.
Parameter: We enter the parameter name that we are passing. Same was passed to the
prompt when we press tab.
Description: This is the optional field to describe the input parameter.
Enabled (Check Box): Disabled parameters do not display at request submission time
and are not passed to your execution file.
Validation:
Valueset: Enter the name of the value set you want your parameter to use for validation.
You can only select from independent, table, and non-validated value sets. As per our
example we defined two valuesets for two parameters and set the two valuesets
respectively.
Default Type: If you want to set a default value for this parameter, identify the type of
value you need.
Required (Check Box): If the program executable file requires an argument, you should
require it for your concurrent program.
Enable Security (Check Box): If the value set for this parameter does not allow security
rules, then this field is display only. Otherwise you can elect to apply any security rules
defined for this value set to affect your parameter list.
Display:
Display Size: Enter the field length in characters for this parameter. The user sees and
fills in the field in the Parameters window of the Submit Requests window.
Concatenated Description Size: Enter the display length in characters for the parameter
value description. The user sees the parameter value in the Parameter Description field
Oracle Application 11.5.9 Bias Technologies
31313131
of the Submit Requests and View Requests forms. The Parameter Description field
concatenates all the parameter values for the concurrent program.
Note: We recommend that you set the Concatenated Description Size for each of your
parameters so that the total Concatenated Description Size for your program is 80 or
less, since most video screens are 80 characters wide.
Prompt: Enter the message that will prompt for the input at the submit request form.
Token: For a parameter in an Oracle Reports program, the keyword or parameter
appears here. The value is case insensitive. For other types of programs, you can skip
this field.
After modifying the parameter form, save the program. Now go the
Request Group form and the set the concurrent program to the appropriate request
group. The navigation for this is Security Responsibility Request. Then Request
Groups form will open as shown below. Enter into Query mode by pressing F11 then
enter the Request Group Name and press CTRL+F11. This form is case sensitive. After
that click on new button and enter the concurrent program name at the name column
and go with save button.
Ex:-- Some Request Group Names
For Receivables : Receivables All
For Inventory : All Inclusive GUI
For Order Management : OM Concurrent Programs
For Purchase Order : All Reports
If we don’t know the Request group name then we have to go for the navigation
Security Responsibility Define we already explained in the above example.
Oracle Application 11.5.9 Bias Technologies
32323232
Switch to the appropriate responsibility and run the request. When we enter the
name of the program in the run request window then parameter window will be open.
Then you will get the parameter screen enter the required parameters and go with ok
button.
After entering both the parameters then press ok and then submit the request.
After that submit the request to and go with find button to view the status of the
request. After it completed normal we can view the output from the output button. If the
Status of the program completed error then go with View Log button.
Oracle Application 11.5.9 Bias Technologies
33333333
Out Put:
Oracle Application 11.5.9 Bias Technologies
34343434
XML Publisher Registration Steps:
Purpose: For CFD(Customer Facing Document)
1. Develop a report according to the client requirements and register the concurrent
program.
Ex: The Concurrent program name is CS_XML_REP
Note: The only difference is we have to set the format type as XML in the
concurrent program window while registering
2. Create a Template with specified formats like rtf, pdf… using the appropriate
tools.
3. Then go with the XML Publisher Administrator Responsibility and click on the Data
definition.
Oracle Application 11.5.9 Bias Technologies
35353535
4. Then you will get the screen now go with the Create Data definition button in the
screen.
5. The Create Data Definition screen will appear enter all the fields and click on
apply button.
Window Help
Name: This name is your data definition name, which you are going to create now.
Application: We have to select the appropriate application, which our concurrent
program has been registered
Code: The code must match the concurrent program short name, which we registered
earlier.
Oracle Application 11.5.9 Bias Technologies
36363636
Start Date: It specifies the start date of your application.
Description: To describe your Data Definition enter the data.
6. Now go with Template tab in the same screen.
7. Click on the Create template button then the following screen will appear.
Window Help:
Name: This is the Template Name, which we are going to create.
Application: We have to select the appropriate application, which our concurrent
program has been registered
Type: Select the format type of your template, which you created earlier.
Code: Enter the code for the template that is short name.
Data Definition: Enter the data definition name, which was created earlier.
Start Date: It specifies the start date of your application.
Description: To describe your Template enter the data.
File: Click on Browse and select the template file, which you have created.
Language: Choose a specific language according to the Customer Specifications
Territory: Territory specifies the language belongs to which nation.
Then go with Apply button.
Oracle Application 11.5.9 Bias Technologies
37373737
8. Now Switch to the appropriate responsibility and run the CS_XML_REP concurrent
program, which we created earlier.
9. Then copy the Request_id in the Requests window.
10. Switch the responsibility to the XML Publisher Responsibility and run the XML
Publisher Report. You will get the following Input Screen.
Oracle Application 11.5.9 Bias Technologies
38383838
Output: After completion of the request go with view output window Button.
Report Code: -- This code will appear on the After parameter form in our report
function AfterReport return boolean is
l_request number;
l_appl NUMBER;
begin
SELECT FCP.APPLICATION_ID
INTO l_appl
FROM FND_CONCURRENT_PROGRAMS FCP,FND_CONCURRENT_REQUESTS R
WHERE FCP.CONCURRENT_PROGRAM_ID = R.CONCURRENT_PROGRAM_ID
AND R.REQUEST_ID = :P_CONC_REQUEST_ID;
l_request := fnd_request.submit_request( 'XDO', 'XDOREPPB', null, null, FALSE,
:P_CONC_REQUEST_ID,'xmlreporttemp',l_appl,'US','N',NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL);
srw.message(100, ' Request submitted ' || l_request);
SRW.USER_EXIT('FND SRWEXIT');
return (TRUE);
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
end;
Oracle Application 11.5.9 Bias Technologies
39393939
Table Registration in APPS:
1. Create a table .
Ex: Sql> Crete table wip_item(ITEM VARCHAR2(15),
ITEMDESCRIPTION VARCHAR2(100),
ITEMCOST NUMBER(8),
CATEGORYK VARCHAR2(100),
CREATION_DATE DATE,
CREATED_BY NUMBER(7),
LAST_UPDATE_DATE DATE,
LAST_UPDATED_BY NUMBER(7),
ATTRIBUTE_CAT VARCHAR2(100),
ATTRIBUTE1 VARCHAR2(100),
ATTRIBUTE2 VARCHAR2(100),
ATTRIBUTE3 VARCHAR2(100),
ATTRIBUTE4 VARCHAR2(100),
ATTRIBUTE5 VARCHAR2(100));
2. If you are in different user for Ex: scott/tiger then you have to grant permission to
APPS.
Ex: Grant all on wip_item to apps;
3. Connect apps/apps@PROD.
4. Create synonym for the table which we are going to register in APPS.
Ex: Create public synonym wip_item for wip.wip_item.
5. Registering the table by using AD_DD Package
Syntax: Exec AD_DD.REGISTER_TABLE
(p_appl_short_name,
p_tab_name, --table name
p_tab_type,
p_next_extent, -- Enter the initial and next extent sizes in kilobytes for your
table. You must enter values greater than 0.
p_pct_free,--free storage.
p_pct_used);-- used storage.
EXEC AD_DD.REGISTER_TABLE('WIP','WIP_ITEM','T',8,10,90);
Registering the Columns:
Syntax: EXEC AD_DD.REGISTER_COLUMN p_appl_short_name,
p_tab_name,
p_col_name,
p_col_seq,
p_col_type,
p_col_width,
p_nullable,
p_translate,
p_precision default null,
p_scale default null);
Oracle Application 11.5.9 Bias Technologies
40404040
Ex:
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ITEM',1,'VARCHAR2',15,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ITEMDESCRIPTION',2,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ITEMCOST',3,'NUMBER',8,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','CATEGORYK',4,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','CREATION_DATE',5,'DATE',11,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','CREATED_BY',6,'NUMBER',7,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','LAST_UPDATE_DATE',7,'DATE',11,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','LAST_UPDATED_BY',8,'NUMBER',7,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE_CAT',9,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE1',10,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE2',11,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE3',12,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE4',13,'VARCHAR2',100,'N','Y');
EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE5',14,'VARCHAR2',100,'N','Y');
6. Check in APPS go to Application Developer Responsibility
Application Database Table
Then we will get Tables Screen as Shown below and press F11 then enter the
table_name and press CTRL+F11 then we will get the data as shown below.
Oracle Application 11.5.9 Bias Technologies
41414141
Valuesets: Valueset is nothing but the list of values with validation. We will be using the
valuesets whenever the concurrent programs have parameters and while defining the
flex fields we attach this flex fields. The given below are the types of valuesets.
None
Independent
Dependent
Table
Translatable Dependent
Translatable Independent
Special and
Pair.
None: It is used whenever we want to apply some format condition like max.length,
numbers, and capital letters so on. There wont be any list of values in none valueset.
Independent: This valueset is used whenever we want to show some hard coded values
to the end user that time we will create. Navigation to get the Valueset screen in
Application Validation Set
After that go with the Navigation Application Validation Values then we will get
the screen given below. Enter the valueset name, which we created earlier.
Oracle Application 11.5.9 Bias Technologies
42424242
Dependent: It is a list of values, which are depending on the Independent valueset. To
create dependent valueset go with same process we mentioned above and set the
validation type as Dependent and click on the Edit Information button then we will get
the Dependent valueset information screen enter the mandatory fields like independent
valueset name which we created earlier.
Table: It will be used whenever we want to show the list of values from the table
column name. When we select this option then the Edit Information in this window will
become active. When we go with that Edit Information button we get the Validation
information window. That is shown below.
To define the valueset the Navigation is Application Validation Set. The
Valueset form is shown below.
Oracle Application 11.5.9 Bias Technologies
43434343
Window Help:
Value Set Name: Define your own value set name.
Format Type: Select the appropriate datatype that what we are passing as parameter
through this valueset. This field is mandatory.
Maximum Size: Enter the maximum size of the parameter that what we are passing to
the report. This field is mandatory.
Validation Type: Select validation type as Table and go with the edit information button.
then the Validation table information window will be open. Enter the mandatory fields as
required.
Now go with the edit information button then we get the Validation Table Information
window will appear as shown below.
Table Name: Here we can enter the table name or we can write a query. Query must be
written in braces only.
Ex: (select distinct (empno) from scott.emp)
Value: Enter the column name which we want to display in the parameter window.
Meaning: Meaning is to provide the additional information along with the list of values.
ID: To column is used to pass a value to the parameter. The scenario of using this id will
be if we want to pass a value to the parameter, which is associated with, the list of
values select by the user.
Where/Order By: To incorporate any filters in the list of values we can do that in where
clause and order by is used to sort the list of values in ascending or descending order.
Additional Columns: when we want to display any other Additional columns in the
output form we use this. We use these two as per the requirements.
Syntax: Column name “Alias Name” (Width)
Oracle Application 11.5.9 Bias Technologies
44444444
Note: When we are working with table valueset only the edit information button is active. For
other valuesets it is not active.
Using $FLEX$: $FLEX$ is used to hold the data which was selected by the previous
valueset for that we have to define another table valueset with different name as per the
above process. In the new valuset we used the $FLEX$ as given below screen.
Note:
Whenever you assign the valueset to any concurrent program then you are not allowed to
modify the valueset. We have to remove from the valueset from the concurrent program
to modify the valueset, which was already created.
For more information you go to the example given below with detailed explanation of table
valueset.
When ever we select the validation type as table then the edit information button in the
valuesets window will be enabled. It will be disabled for the other valuesets only for the
table valueset.
Translatable Dependent & Translatable Independent: These two valuesets are
used whenever you are working with multi-lingual implementation.
Special: Special valueset is used for display flexfields data as parameter values.
Pair: This valueset is used to display parameters in pairs.
EX: Date from & Date To…etc. (To specify a range in pair we use such type of valuesets).
Oracle Application 11.5.9 Bias Technologies
45454545
Working with User Exits in Reports 6i: User Exits are 3GL programs used to transfer
the control from the report builder to Oracle Applications or any and it will perform some
actions and return to the report builder. There are five types of user exits those are
given below.
FND SRWINIT
FND SRWEXIT
FND FORMAT_CURRENCY
FND FLEXSQL
FND FLEXIDVAL
FND SRWINIT: Used to write in before report trigger. It is used to fetch the concurrent
request information and also used to set the profile options.
FND SRWEXIT: We will write this in after report trigger. Used to free the memory which
has been allocated by the other user exits
FND FORMAT_CURRENCY: This is used to convert amounts or currency from one
currency to other currency values and also used to display currency amounts in formats.
EX: SRW.USER_EXIT(‘FND FORMAT_CURRENCY’,
Code = ‘currency_code’,
Display_width=’15’,
Amount = ‘:cf_feb’,
Display = ‘:cd_feb’);
Return (:cd_feb);
FND FLEXSQL: This is used to get the data from flex fields. We will use in formula
columns.
FND FLEXIDVAL: This is used to get the data from flex fields. We will use them in
formula columns.
Note:
1. We use the User Exits in the Report triggers like before report, after report, before
parameter form, after parameter form.
2. We have to create a mandatory parameter called P_CONC_REQUEST_ID when we work
with FND SRWINIT, FND SRWEXIT.
3. The user exits are case sensitive we have to write them in capital letters only otherwise
they will raise an error.
Oracle Application 11.5.9 Bias Technologies
46464646
Designing the Report: Create a new report manually. Go to data model and click on
the SQL Query then a dialog box SQL Query Statement will open write your query in
that.
Data Model:
Ex:
SELECT E.EMPNO,E.ENAME,E.SAL,D.DNAME FROM
SCOTT.EMP E,SCOTT.DEPT D
WHERE
D.DEPTNO=E.DEPTNO order by e.deptno
Layout Model: Now go to the layout model and design your report view as per the
requirements. See here in the below diagram we created P_CONC_REQUEST_ID in the
user parameters.
Oracle Application 11.5.9 Bias Technologies
47474747
Report Triggers: Report triggers execute PL/SQL functions at specific times during the
execution and formatting of your report. The types of report triggers are given below.
Before Parameter Form: If we want to pass any initial values to the parameter we use
this trigger.
After Parameter Form: This trigger will fire after the entering the parameter values. To
validate the parameters and use to populate the lexical parameters, we use this trigger.
Before Report: In oracle 11i we use this trigger to initialize profile values.
Between Pages: This trigger is used to format the output and fires once per each page
except for the first page.
After Report: This trigger is used to free the memory or drop the temporary objects that
are created in the begining of the report or to send the output as mail.
Note:
1. In the report triggers we cant use any SQL statements directly there is package called
srw(Standard Report Writer) using this we can write any SQL statements.
Syntax: srw.do_sql(‘create sequence myseq
Increment by 1
Start with 1’);
2. To display any message box in the triggers or at any stage in reports6i we use another
procedure in srw package.
Syntax: srw.message(1001,’Hai this is a Simple Message from CHAITU’);
Go to the before report trigger and use the FND SRWINIT which is used to fetch the
concurrent request information and also to set the profile options.
Oracle Application 11.5.9 Bias Technologies
48484848
Ex: Code in the before report trigger
function BeforeReport return boolean is
begin
SRW.USER_EXIT('FND SRWINIT');
return (TRUE);
end;
After writing the code then click on the compile button if there is no error then we will
get the successfully compiled message at the down right corner.
Now go after report trigger and write the code as given below and compile it after
successfully completion then close the window.
EX:
function AfterReport return boolean is
begin
SRW.USER_EXIT('FND SRWEXIT');
SRW.message(100,'P_CONC_ID: '||:P_CONC_REQUEST_ID);
return (TRUE);
end;
Note: Now our report is ready, save it and register the report in the oracle applications. Then
we will get the output as given below.
Output Window:
Oracle Application 11.5.9 Bias Technologies
49494949
Profiles: Profiles are the changeable options which affect the way application runs. To
get these profiles we use three API’s those are given below.
1. FND_PROFILE.GET(‘Name of the Profile’, variable name);
2. variable name := FND_PROFILE.VALUE(‘Name of the profile’);
3. FND_PROFILE.SET(‘Name of the profile’, value of the profile);
The 1st
and 2nd
are same but, the only difference is FND_PROFILE.GET is the
procedure and FND_PROFILE.VALUE is the function so, it return a value. The Profile
values will be set in different levels those are given below.
Site
Application
Responsibility
User
Server
Organization
Site: This field displays the current value, if set, for all users at the installation site.
Application: This field displays the current value, if set, for all users working under
responsibilities owned by the application identified in the Find Profile Values block.
Responsibility: This field displays the current value, if set, for all users working under the
responsibility identified in the Find Profile Values block.
User: This field displays the current value, if set, for the application user identified in the
Find Profile Values block.
Profile: Enter the name of the profile option whose values you wish to display. You may
search for profile options using character strings and the wildcard symbol (%). For
example, to find all the profile options prefixed by "Concurrent:” you could enter
"Conc%" and press the Find button.
The navigation to get the system profile values information is Profile System.
Oracle Application 11.5.9 Bias Technologies
50505050
The profiles are of two types those are given below.
1. System Profile and
2. User Profile.
The above given window is the System Profile window and the user profile window is
given below and the navigation is Profile Personal.
Note: To view personal profiles enter into the query mode and enter the profile name which we
have already then we get profile value details.
Some important Profiles:
ORG_ID
MFG_ORGANIZATION_ID
GL_SET_OF_BKS_ID
USER_ID
RESP_ID
RESP_APPL_ID
Note: To get the RESP_ID or RESP_APPL_ID…. Go with the following navigation.
Menu Help Diagnostics Examine. Then it will prompt for the oracle password,
enter that then we get the Examine and Variable Values window as shown below.
In the same way we can get the ORG_ID, RESP_APPL_ID, USER_ID…., by entering
what ever we want at the Field column in the above Examine window.
Oracle Application 11.5.9 Bias Technologies
51515151
API’s To Register Concurrent Program:
FND_PROGRAM.EXECUTABLE: To Create executable and set the appropriate execution
method
Syntax:
FND_PROGRAM.EXECUTABLE(EXECUTABLE, APPLICATION, DESCRIPTION,
EXECUTION_METHOD, EXECUTION_FILE_NAME);
FND_PROGRAM.REGISTER: To create concurrent program
Syntax:
FND_PROGRAM.REGISTER(PROGRAM, APPLICATION, ENABLED, SHORT_NAME,
DESCRIPTION,….);
FND_PROGRAM.PARAMETERS: To set the parameter and to pass appropriate tokens
through the concurrent program
Syntax:
FND_PROGRAM.PARAMETER(PARAMETERNAME, VAlUESET, TOKEN, PROMPT,
SIZE);
FND_PROGRAM.REQUEST_GROUP: To set the parameter and to pass appropriate
tokens through the concurrent program
Syntax:
FND_PROGRAM.REQUEST_GROUP(REQUEST_GROUP_NAME, APPLICATION,
CODE, DESCRIPTION,..);
FND_GLOBAL_APPS_INITIALIZE: When ever we are working with profiles in PL/SQL
and submitting through the SQL we need to use this API the syntax for this API is given
below.
Syntax: FND_GLOBAL_APPS_INITIALIZE(user_id, resp_id, resp_appl_id,
[Security_group_id, server_id]);
Note: In this FND_GLOBAL_APPS_INITIALIZE the parameters user_id… and others we have to get
them manually from apps the process we discussed above see. The navigation is
Menu Help Diagnostics Examine.
EX: Declare
i number;
begin
FND_GLOBAL_APPS_INITIALIZE(1007899,20420,1);
i:=FND_PROFILE.VALUE(‘ORG_ID’);
dbms_output.put_line(‘Operation ID: ‘|| i);
end;
O/p: Operation ID: 204
FND_CLIENT_INFO.SET_ORG_CONTEXT: This is the API used to set the ORG_ID
value from the backend, so that system will retrieve the data from the database which is
related to mention the organization.
Syntax: Begin
FND_CLIENT_INFO.SET_ORG_CONTEXT(ORG_ID);
end;
EX: Begin
FND_CLIENT_INFO.SET_ORG_CONTEXT(204);
end;
Oracle Application 11.5.9 Bias Technologies
52525252
FND_REQUEST.SUBMIT_REQUEST: When ever we want to submit the request to the
apps through the SQL we use this API. The syntax and a simple example were given
below.
Syntax: FND_REQUEST.SUBMIT_REQUEST(
Application, we have to pass the short name of the application concurrent
Program in which we registered (Ex: Oracle Receivables = AR).
Program, Pass the short name of the concurrent program
Description, description of the concurrent program
Start-time, start time of the concurrent program
Sub-request, if there any other request, pass true other wise false.
Arg-1,
- - These arg1 to arg100 are used to pass the parameters to the
concurrent program.
Arg100); Totally FND_REQUEST.SUBMIT_REQUEST API is having the 105 parameters.
EX: Declare
id number;
begin
FND_GLOBAL_APPS_INITIALIZE(1007899,20420,1);
Id:=FND_REQUEST.SUBMIT_REQUEST(‘AR’,CSPROC,NULL, NULL, FALSE, 20, RESEARCH);
dbms_output.put_line(‘Request ID:’ || id);
commit;
end;
O/P: Request ID: 2725363
FND_FILE.PUT_LINE: This API is used to send messages to output file or log file while
we are working with PL/SQL Stored procedures
For sending messages to output file we use this syntax
Syntax: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,’OUTPUT MESSAGE’);
For sending messages to log file we use this syntax
Syntax: FND_FILE.PUT_LINE(FND_FILE.LOG,’LOG MESSAGE’);
Difference between ORG_ID & ORGANIZATION_ID: ORG_ID will come under
operating unit in Multiorg. ORGANIZATION_ID will come under inventory organization.
ORG_ID is used to distinguish the data of different business organizations.
ORGANIZATION_ID is used to identify the items belongs to which inventory organization
it has assigned.
Oracle Application 11.5.9 Bias Technologies
53535353
MULTI ORGANIZATION (MULTIORG): Multiorg is nothing but under single oracle
application implementation maintaining multiple organizations and multiple set of books.
We will have Multiorg tables (table which is ending with _ALL). When ever we enter the
data, which will be stored in the Multiorg tables only.
Ex: OE_ORDER_HEADERS_ALL
OE_ORDER_LINES_ALL
OE_ORDER_HOLDS_ALL
PO_HEADER_ALL
PO_LINES_ALL
Multiorg Structure:
Business Groups: The business groups represent the highest level in the organization
structure like major divisions etc. business group secures human resources information
for example when we request a list of employees we can see the employees assign to
the business groups.
Set of books: It is a financial reporting entity uses a particular chart of accounts
functional currency and accounting calendar. Oracle GL secures transaction information
like general entries balances by set of books. When we assign to the oracle GL
responsibilities there will be a set of books assignment. We can see the information for
that set of book only. The navigation in that responsibility is
Setup Financials Books Define.
Oracle Application 11.5.9 Bias Technologies
54545454
Legal Entities: It is a legal company for which we prepare physical or tax reports. We
will assign tax identifiers and other legal information.
Operating Units: It is one of the organizations where exactly company is being sales,
purchasing payments and receiving and so on. It may be sales office or a division or a
department. At operating unit level PO, AP, AR, OM modules will be implemented.
Inventory Organization: It is an organization where we are going to maintain
manufacturing information and items information. It captures inventory transactions,
balances. Oracle inventory, WIP, BOM will be implemented at inventory organization
level.
Sub Inventory: Sub inventory is nothing but stocks or goudons or warehouses, which
will be define under inventory organization.
Locators: Stock Locators is nothing but the specific location inside the sub inventory
where we will place the item.
Note:
• When ever we write a statement like SELECT * FROM OE_ORDER_HEADERS then
it shows “NO ROWS RETURN” as an output.
• When ever we are working with the Multiorg views if we want to get the data
from those views we have to set the ORG_ID of which Operating unit it is belongs
by using the API (FND_CLIENT_INFO.SET_ORG_CONTEXT(ORG_ID)). Then we
get the required information from the view.
• We found the list of ORG_ID’s in the HR_OPERATING_UNITS.
• To find the system is in Multiorg or not the query is
EX: SELECT MULTI_ORG_FLAG FROM FND_PRODUCT_GROUPS;
O/p: Y If it is a Multiorg system otherwise it is N.
Oracle Application 11.5.9 Bias Technologies
55555555
Flex Fields: A flex field is a flexible data field that your organization can customize to
your business needs without programming. Oracle Applications uses two types of
flexfields, those are given below.
1. Key flexfields(KFF) and
2. Descriptive flexfields(DFF).
Key Flexfields: Key Flexfeilds are used to store the key information of data in
segments. We can call these segments as intelligent keys. For KFF we define flexfeild
qualifiers and segment qualifiers. The data of this key flexfeilds will store in segment cols
in a table.
EX:
1. Accounting Flexfeild (GL)
2. System Item(INV)
3. Item Catalog(INV)
4. Item Category(INV)
5. - -
Descriptive Flexfields: The descriptive flexfeilds are used to add the additional
information to the existing data. These DFF values will store in attributes column in
table. There is no need to define Flexfeild qualifiers and Segment qualifiers in DFF.
• The table FND_FLEX_VALUES will help us to retrieve the flexfields data in our
programs.
Existing DFF Customization:
Go with the Application developer responsibility and in that go through the
navigation Flexfeilds Descriptive Registers. Query the records as per the
table name and retrieve.
Copy the Title and go to the Segments form the navigation is
Flexfeilds Descriptive Segments. Query the records as per the title.
Uncheck the Check box Freeze Flexfeild Definition.
Now go with the Segments button and attach new column and we can attach
valueset.
Click the open button and make that as field as required (or) optional by
checking / unchecking Required box.
Even we can select default value type. We can also change the size and save it.
Now check the Freeze Field Definition.
Click compile button. Save it and close.
Note: When ever we click compile button system will submit Flexfield View Generator
concurrent program internally to create descriptive flexfeild view.
Oracle Application 11.5.9 Bias Technologies
56565656
INTERFACES:
It is nothing but a program; it will be used to transfer the data from flat file to data
base table or from data base table to flat file. Two types of interfaces given below.
1. Outbound Interface
2. Inbound Interface
Outbound Interface: it will be used to transfer the data from oracle apps base table to
legacy system flat file. We will develop a concurrent program, which is pl/sql procedure.
Inside of that we will use UTL_FILE package to generate the flat file.
UTL_FILE: it is one of the pl/sql package, which will be used to transfer the data from
oracle data base table to flat files or from flat files to oracle data base tables. But we will
use sql loader to transfer data from flat file to data base tables .
By using following 3 functions we will generate flat file
1. Declare the file pointer to find out file location.
UTL_FILE.FILE_TYPE;
2. To open or create file.
UTL_FILE.FOPEN(‘PATH’,’FILENAME’,’W’);
3. To transfer data into file
UTL_FILE.PUT_LINE(FILE POINTER, COLUMN NAME);
4. To close file
UTL_FILE.FCLOSE(FILE POINTER);
STEPS:
1. Develop the pl/sql program.
2. Define the cursor to get the data from the data base tables.
3. Open the cursor and open the file by using UTL_FILE package.
4. Transfer the data from cursor variable into flat files by using UTL_FILE.
5. Close the file by using UTL_FILE package.
6. Register the program as concurrent program.
7. This program is scheduled at SRS window.
Ex: Create or replace procedure inventoryout (errbuf out varchar2,
Retcode out varchar2) as
Cursor cur_inv is select inventory_item_id,organization_id,segment1,
description from mtl_system_items_b;
Outpointer utl_file.file_type;
Begin
Outpointer:=utl_file.fopen('c:temp','inventoryflat.txt','w');
-- To get the path:
-- Select value from V$parameter where name like ‘utl_file_dir’;
For c in cur_inv
Oracle Application 11.5.9 Bias Technologies
57575757
loop
Utl_file.put_line(outpointer,c.inventory_item_id||'-'||c.organization_id||'-'||
c.segment1 ||'-'||c.description);
end loop;
utl_file.fclose(Outpointer);
exception
when others then
fnd_file.put_line(fnd_file.log,'error while generating flat file');
end inventoryout;
UTL_FILE EXCEPTIONS:
1. UTL_FILE.INVALID_OPERATION
2. UTL_FILE.INVALID_PATH
3. UTL_FILE.INVALID_MODE
4. UTL_FILE.INVALID_FILEHANDLE
5. UTL_FILE.READ_ERROR
6. UTL_FILE.INTERNAL_ERROR
INIT.ORA: This file contains the accessible directories list.
Inbound Interface or Conversion: it will be used to upload the data from legacy
system flat file to oracle apps base table. For this we will use SQL LOADER program and
pl/sql program.
Ex: -- To load data from flat file to Tables using SQLLDR
-- Writing the Control File CS_CTL.CTL
LOAD DATA
INFILE ‘C:CHAITU_CS.CSV’
BADFILE ‘CS_BAD.DAT’ -- Naming the BAD FILE
DISFILE ‘CS_DISC.DAT’ -- Naming the DISCARD FILE
INSERT INTO TABLE CS_0016
FIELDS TERMINATED BY ‘,’
TRAILING NULCOLS
(
COL1,
COL2,
COL3
)
-- SQLLDR SYNTAX
CMD> SQLLDR APPS/APPS@PROD CONTROL = CS_CTL
Oracle Application 11.5.9 Bias Technologies
58585858
SQL Loader: This is a CUI (Character User Interface) Tool, which is used to load data
from flat files to tables. We have to feed control file to the SQL Loader this control file
contains information about the flat file and into which table needs to be loaded.
Syntax:
LOAD DATA
INFILE <FILENAME>
[INSERT / REPLACE / TRUNCATE / APPEND]
INTO TABLE <TABLENAME>
FIELDS TERMINATED BY ‘ , ’
OPTIONALLY ENCLOSED ‘ “ ‘
TRIALING NULLCOLLS
WHERE ---[CONDITION]
Filler Clause: The filler clause is used to skip one column data in the flat file.
Ex: -- Example using all functions in the control file
-- Create a Table ABC with 4 cols
Create table ABC(Col1 number,
Col2 varchar2(10)
Col3 number,
Col4 varchar2(10),
Col5 varchar2(10),
Col6 date);
-- Table Created
-- Create the Control File with the name mycontrol.ctl
LOAD DATA
INFILE ‘C:NEW.CSV’
INSERT
INTO TABLE ABC
(COL1, Sequencename.nextval, getting the sequence number
COL2, “upper(:col2)”
COL3, constant ‘ABC’ it fills the each row with the constant value
COL4, NULLIF COL4= ‘EX’ if there is no value then it is filled with the
COL5, FILLER, to skip the column
COL6, “to-date(:col4, ‘dd-mm-yyyy’)); to print the date.
After completion of the control file save it as .ctl extension and to execute the control file
go to the command prompt in UNIX or WINDOWS use the following syntax.
Oracle Application 11.5.9 Bias Technologies
59595959
Syntax:
Prompt> SQLLDR USERNAME/PASSWORD@HOSTNAME
CONTROL = CONTROL FILE NAME
[DIRECT = TRUE / FALSE [DEFAULT]
SKIP = NUMBER
ROWS = NUMBER
ERRORS = NUMBER]
Ex: -- Executing the control file mycontrol.ctl
--Prompt> SQLLDR USERNAME/PASSWORD@HOSTNAME
CONTROL = mycontrol.ctl
In the execution there are more options, which are stated below. And those options
we give after the CONTROL in the SQLLDR are optional according to our requirement we
will use them.
Conventional Path: It is the default path which will create insert statements and it will
insert data into table method is very slow. Here the auto commit will be carried for every
64 records.
Direct Path: This will be used when ever the volume of data is high. It will make the
entire data into set of blocks and it will create one insert statement for each block and
insert data into tables. This method is very fast also parallel loading will be working while
working with direct path. By default it will be false.
Skip: Used to skip the rows from flat file while loading the data into tables.
Rows: In conventional path the commit will happen for every 64 records by default if we
want to make it to 1000 EX: ROWS = 1000
Errors: This indicates that how many no of errors can be tolerated while loading data
into tables. The default value is 50.
As a part of the execution the SQLLDR creates three files according to the output type
those are given below.
1. Bad File: Which will be created whenever there are records, which are rejected
while inserting into the table from the flat file?
2. Discard File: It will be created whenever there are records which are not
satisfying the filtering criteria specified in the where clause of the control file.
3. Log File: This file contains the complete information of data it will be created at
all times when ever we fire SQLLDR.
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp
Erp

More Related Content

What's hot

Oracle apps integration_cookbook
Oracle apps integration_cookbookOracle apps integration_cookbook
Oracle apps integration_cookbookchaitanyanaredla
 
Fujcci crp oracle payroll
Fujcci crp oracle payrollFujcci crp oracle payroll
Fujcci crp oracle payrollFeras Ahmad
 
R12 india localization guide
R12 india localization guideR12 india localization guide
R12 india localization guidekingshuk_goswami
 
Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11
Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11
Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11Feras Ahmad
 
Oracl apps api usages
Oracl apps api usagesOracl apps api usages
Oracl apps api usagesrakhe_r
 
Excel Training Manual
Excel Training ManualExcel Training Manual
Excel Training ManualSusan Mei
 
Sap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdarySap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdaryANILKUMARPULIPATI1
 
Instructor utilities guide
Instructor utilities guideInstructor utilities guide
Instructor utilities guideapaezgonzal
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroductionOfun Emma
 
7358948 questionnaire-mm
7358948 questionnaire-mm7358948 questionnaire-mm
7358948 questionnaire-mmsravankumaran
 
Ms excel for Accountants
Ms excel for AccountantsMs excel for Accountants
Ms excel for Accountantszia256
 
Data migration blueprint legacy to sap
Data migration blueprint  legacy to sapData migration blueprint  legacy to sap
Data migration blueprint legacy to sapAjay Kumar Uppal
 
Lync server2010licensingguide en-us
Lync server2010licensingguide en-usLync server2010licensingguide en-us
Lync server2010licensingguide en-usallegra601
 
Admm crp oracle payroll
Admm crp oracle payrollAdmm crp oracle payroll
Admm crp oracle payrollFeras Ahmad
 

What's hot (19)

Oracle apps integration_cookbook
Oracle apps integration_cookbookOracle apps integration_cookbook
Oracle apps integration_cookbook
 
TE040 Oracle AP Testscript
TE040 Oracle AP TestscriptTE040 Oracle AP Testscript
TE040 Oracle AP Testscript
 
Fujcci crp oracle payroll
Fujcci crp oracle payrollFujcci crp oracle payroll
Fujcci crp oracle payroll
 
R12 india localization guide
R12 india localization guideR12 india localization guide
R12 india localization guide
 
R12 gop
R12 gopR12 gop
R12 gop
 
Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11
Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11
Oracle fusion hrms_for_uae_hr_setup_white_paper_rel11
 
115payug
115payug115payug
115payug
 
Oracl apps api usages
Oracl apps api usagesOracl apps api usages
Oracl apps api usages
 
Excel Training Manual
Excel Training ManualExcel Training Manual
Excel Training Manual
 
Sap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdarySap fico blueprint 2017 final Anilkumar chowdary
Sap fico blueprint 2017 final Anilkumar chowdary
 
Instructor utilities guide
Instructor utilities guideInstructor utilities guide
Instructor utilities guide
 
Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroduction
 
7358948 questionnaire-mm
7358948 questionnaire-mm7358948 questionnaire-mm
7358948 questionnaire-mm
 
Ms excel for Accountants
Ms excel for AccountantsMs excel for Accountants
Ms excel for Accountants
 
Data migration blueprint legacy to sap
Data migration blueprint  legacy to sapData migration blueprint  legacy to sap
Data migration blueprint legacy to sap
 
Lync server2010licensingguide en-us
Lync server2010licensingguide en-usLync server2010licensingguide en-us
Lync server2010licensingguide en-us
 
Easywpseo 1.5-user-guide
Easywpseo 1.5-user-guideEasywpseo 1.5-user-guide
Easywpseo 1.5-user-guide
 
2015R2_CPQ_WN-Rev1
2015R2_CPQ_WN-Rev12015R2_CPQ_WN-Rev1
2015R2_CPQ_WN-Rev1
 
Admm crp oracle payroll
Admm crp oracle payrollAdmm crp oracle payroll
Admm crp oracle payroll
 

Viewers also liked

Empire Collective Photography
Empire Collective PhotographyEmpire Collective Photography
Empire Collective PhotographyCharleston Gibbs
 
Journal citations reports
Journal citations reportsJournal citations reports
Journal citations reportsrcm1990
 
Mayor Farm Manager Brochure Full
Mayor Farm Manager Brochure FullMayor Farm Manager Brochure Full
Mayor Farm Manager Brochure FullPatrick Ogbuitepu
 
Rola przemysłu motoryzacyjnego w gospodarce Polski
Rola przemysłu motoryzacyjnego w gospodarce PolskiRola przemysłu motoryzacyjnego w gospodarce Polski
Rola przemysłu motoryzacyjnego w gospodarce PolskiPwC Polska
 
Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...
Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...
Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...helmut simamora
 
Jednolity plik kontrolny - wersja ENG
Jednolity plik kontrolny - wersja ENGJednolity plik kontrolny - wersja ENG
Jednolity plik kontrolny - wersja ENGPwC Polska
 
Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017
Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017
Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017PwC Polska
 
Pencemaran air dan sifat air tercemar 41615110007
Pencemaran air dan sifat air tercemar 41615110007Pencemaran air dan sifat air tercemar 41615110007
Pencemaran air dan sifat air tercemar 41615110007Arif_hermawan669
 
Modul 9 Praktik Kebid III
Modul 9 Praktik Kebid IIIModul 9 Praktik Kebid III
Modul 9 Praktik Kebid IIIpjj_kemenkes
 

Viewers also liked (17)

Empire Collective Photography
Empire Collective PhotographyEmpire Collective Photography
Empire Collective Photography
 
Vvvv
VvvvVvvv
Vvvv
 
Journal citations reports
Journal citations reportsJournal citations reports
Journal citations reports
 
Mayor Farm Manager Brochure Full
Mayor Farm Manager Brochure FullMayor Farm Manager Brochure Full
Mayor Farm Manager Brochure Full
 
Childhood forecasting
Childhood forecastingChildhood forecasting
Childhood forecasting
 
Rola przemysłu motoryzacyjnego w gospodarce Polski
Rola przemysłu motoryzacyjnego w gospodarce PolskiRola przemysłu motoryzacyjnego w gospodarce Polski
Rola przemysłu motoryzacyjnego w gospodarce Polski
 
GLOBAL WARMING
GLOBAL WARMINGGLOBAL WARMING
GLOBAL WARMING
 
Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...
Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...
Belajar tentang danau yang telah mengalami masalah kesuburan perairan atau eu...
 
Err
ErrErr
Err
 
Tarea seminario 6
Tarea seminario 6Tarea seminario 6
Tarea seminario 6
 
Jednolity plik kontrolny - wersja ENG
Jednolity plik kontrolny - wersja ENGJednolity plik kontrolny - wersja ENG
Jednolity plik kontrolny - wersja ENG
 
Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017
Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017
Jednolity Plik Kontrolny - comiesięczny JPK_VAT dla MŚP już od 2017
 
Pencemaran air dan sifat air tercemar 41615110007
Pencemaran air dan sifat air tercemar 41615110007Pencemaran air dan sifat air tercemar 41615110007
Pencemaran air dan sifat air tercemar 41615110007
 
Pemanasan Global
Pemanasan GlobalPemanasan Global
Pemanasan Global
 
Sepang dan jepun
Sepang dan jepunSepang dan jepun
Sepang dan jepun
 
Modul 10 kb 1
Modul 10   kb 1Modul 10   kb 1
Modul 10 kb 1
 
Modul 9 Praktik Kebid III
Modul 9 Praktik Kebid IIIModul 9 Praktik Kebid III
Modul 9 Praktik Kebid III
 

Similar to Erp

Osb developer's guide
Osb developer's guideOsb developer's guide
Osb developer's guideHarish B
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Sal Marcus
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Sal Marcus
 
Informatica installation guide
Informatica installation guideInformatica installation guide
Informatica installation guidecbosepandian
 
Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...
Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...
Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...Apps Associates
 
Sybase SQL AnyWhere12
Sybase SQL AnyWhere12Sybase SQL AnyWhere12
Sybase SQL AnyWhere12Sunny U Okoro
 
Dw guide 11 g r2
Dw guide 11 g r2Dw guide 11 g r2
Dw guide 11 g r2sgyazuddin
 
Soa best practices_1013x_drop3
Soa best practices_1013x_drop3Soa best practices_1013x_drop3
Soa best practices_1013x_drop3Meng He
 
B28654oas10g best pracitice
B28654oas10g best praciticeB28654oas10g best pracitice
B28654oas10g best praciticeCaipei Chen
 
xCP2 0 Performance Best Practices and Guidelines
xCP2 0 Performance Best Practices and GuidelinesxCP2 0 Performance Best Practices and Guidelines
xCP2 0 Performance Best Practices and GuidelinesHaytham Ghandour
 
Coherence developer's guide
Coherence developer's guideCoherence developer's guide
Coherence developer's guidewangdun119
 
Getting started with odi
Getting started with odiGetting started with odi
Getting started with odichecksekhar
 
70 533 implementing microsoft azure infrastructure solutions Preparation Guide
70 533 implementing microsoft azure infrastructure solutions Preparation Guide70 533 implementing microsoft azure infrastructure solutions Preparation Guide
70 533 implementing microsoft azure infrastructure solutions Preparation GuideMahesh Dahal
 
Oracle pl-sql user's guide & reference
Oracle   pl-sql user's guide & referenceOracle   pl-sql user's guide & reference
Oracle pl-sql user's guide & referencedesitaria
 
bi-foundation-suite-wp-215243
bi-foundation-suite-wp-215243bi-foundation-suite-wp-215243
bi-foundation-suite-wp-215243David Crotty
 

Similar to Erp (20)

ERP.pdf
ERP.pdfERP.pdf
ERP.pdf
 
Osb developer's guide
Osb developer's guideOsb developer's guide
Osb developer's guide
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
 
Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2Maa wp sun_apps11i_db10g_r2-2
Maa wp sun_apps11i_db10g_r2-2
 
Informatica installation guide
Informatica installation guideInformatica installation guide
Informatica installation guide
 
Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...
Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...
Oracle Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-B...
 
Sybase SQL AnyWhere12
Sybase SQL AnyWhere12Sybase SQL AnyWhere12
Sybase SQL AnyWhere12
 
Dw guide 11 g r2
Dw guide 11 g r2Dw guide 11 g r2
Dw guide 11 g r2
 
Soa best practices_1013x_drop3
Soa best practices_1013x_drop3Soa best practices_1013x_drop3
Soa best practices_1013x_drop3
 
B28654oas10g best pracitice
B28654oas10g best praciticeB28654oas10g best pracitice
B28654oas10g best pracitice
 
xCP2 0 Performance Best Practices and Guidelines
xCP2 0 Performance Best Practices and GuidelinesxCP2 0 Performance Best Practices and Guidelines
xCP2 0 Performance Best Practices and Guidelines
 
Plsql
PlsqlPlsql
Plsql
 
Coherence developer's guide
Coherence developer's guideCoherence developer's guide
Coherence developer's guide
 
Proc
ProcProc
Proc
 
Oracle_9i_Database_Getting_started
Oracle_9i_Database_Getting_startedOracle_9i_Database_Getting_started
Oracle_9i_Database_Getting_started
 
Punchout
PunchoutPunchout
Punchout
 
Getting started with odi
Getting started with odiGetting started with odi
Getting started with odi
 
70 533 implementing microsoft azure infrastructure solutions Preparation Guide
70 533 implementing microsoft azure infrastructure solutions Preparation Guide70 533 implementing microsoft azure infrastructure solutions Preparation Guide
70 533 implementing microsoft azure infrastructure solutions Preparation Guide
 
Oracle pl-sql user's guide & reference
Oracle   pl-sql user's guide & referenceOracle   pl-sql user's guide & reference
Oracle pl-sql user's guide & reference
 
bi-foundation-suite-wp-215243
bi-foundation-suite-wp-215243bi-foundation-suite-wp-215243
bi-foundation-suite-wp-215243
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Erp

  • 1.
  • 4. SSSSELECTELECTELECTELECT **** FROMFROMFROMFROM CCCCONTENTSONTENTSONTENTSONTENTS;;;; SQL CONCEPTSSQL CONCEPTSSQL CONCEPTSSQL CONCEPTS .................................................................................................................................................................................................................................................................................................................................................................................................................................... CLASSIFICATION OF SQCLASSIFICATION OF SQCLASSIFICATION OF SQCLASSIFICATION OF SQL COMMANDSL COMMANDSL COMMANDSL COMMANDS.................................................................................................................................................................................................................................................... 1111 TABLESTABLESTABLESTABLES ........................................................................................................................................................................................................................................................................................................................................................................................................................................................2222 VIVIVIVIEWSEWSEWSEWS....................................................................................................................................................................................................................................................................................................................................................................................................................................................................3333 SEQUENCESSEQUENCESSEQUENCESSEQUENCES............................................................................................................................................................................................................................................................................................................................................................................................................................3333 EXPLAIN PLANEXPLAIN PLANEXPLAIN PLANEXPLAIN PLAN ............................................................................................................................................................................................................................................................................................................................................................................................................4444 SQLTRACESQLTRACESQLTRACESQLTRACE ....................................................................................................................................................................................................................................................................................................................................................................................................................................5555 TKPROFTKPROFTKPROFTKPROF ........................................................................................................................................................................................................................................................................................................................................................................................................................................................5555 PL SQL CONCEPTSPL SQL CONCEPTSPL SQL CONCEPTSPL SQL CONCEPTS ................................................................................................................................................................................................................................................................................................................................................................................................................ BLOCK STRUCTUREBLOCK STRUCTUREBLOCK STRUCTUREBLOCK STRUCTURE ........................................................................................................................................................................................................................................................................................................................................................................6666 CURSORSCURSORSCURSORSCURSORS............................................................................................................................................................................................................................................................................................................................................................................................................................................7777 CURSOR ATTRIBUTESCURSOR ATTRIBUTESCURSOR ATTRIBUTESCURSOR ATTRIBUTES ........................................................................................................................................................................................................................................................................................................................................................ 8888 EXCEPTIONSEXCEPTIONSEXCEPTIONSEXCEPTIONS............................................................................................................................................................................................................................................................................................................................................................................................................................ 9999 PROCEDURESPROCEDURESPROCEDURESPROCEDURES............................................................................................................................................................................................................................................................................................................................................................................................................ 10101010 FUNCTIONSFUNCTIONSFUNCTIONSFUNCTIONS........................................................................................................................................................................................................................................................................................................................................................................................................................ 11111111 PACKAGESPACKAGESPACKAGESPACKAGES ............................................................................................................................................................................................................................................................................................................................................................................................................................ 12121212 TRIGGERSTRIGGERSTRIGGERSTRIGGERS................................................................................................................................................................................................................................................................................................................................................................................................................................ 13131313 ORACLE APPLICATIONSORACLE APPLICATIONSORACLE APPLICATIONSORACLE APPLICATIONS................................................................................................................................................................................................................................................................................................................................................................................ ERP & AIM METHODOLOGERP & AIM METHODOLOGERP & AIM METHODOLOGERP & AIM METHODOLOGYYYY........................................................................................................................................................................................................................................................................................................................ 14141414 INTRODUCTIONINTRODUCTIONINTRODUCTIONINTRODUCTION ................................................................................................................................................................................................................................................................................................................................................................................................ 15151515 DATABASE STRDATABASE STRDATABASE STRDATABASE STRUCTUREUCTUREUCTUREUCTURE .................................................................................................................................................................................................................................................................................................................................... 16161616 FILE ARCHITECTUREFILE ARCHITECTUREFILE ARCHITECTUREFILE ARCHITECTURE ............................................................................................................................................................................................................................................................................................................................................................17171717 ENTERING ORACLE APPLENTERING ORACLE APPLENTERING ORACLE APPLENTERING ORACLE APPLICATIONS 11.5.9ICATIONS 11.5.9ICATIONS 11.5.9ICATIONS 11.5.9........................................................................................................................................................................................................................ 18181818 USER CREATIONUSER CREATIONUSER CREATIONUSER CREATION........................................................................................................................................................................................................................................................................................................................................................................................ 19191919 STEPS TO REGISTER ASTEPS TO REGISTER ASTEPS TO REGISTER ASTEPS TO REGISTER A REPORTREPORTREPORTREPORT.................................................................................................................................................................................................................................................................................... 20202020
  • 5. PL/SQL PROCEDURE REGPL/SQL PROCEDURE REGPL/SQL PROCEDURE REGPL/SQL PROCEDURE REGISTRATION STEPSISTRATION STEPSISTRATION STEPSISTRATION STEPS ................................................................................................................................................................................................27272727 XML PUBLISHER REPORTXML PUBLISHER REPORTXML PUBLISHER REPORTXML PUBLISHER REPORT REGISTRATION STEPSREGISTRATION STEPSREGISTRATION STEPSREGISTRATION STEPS ................................................................................................................................................................34343434 TABLE REGISTRATION STABLE REGISTRATION STABLE REGISTRATION STABLE REGISTRATION STEPS IN APPSTEPS IN APPSTEPS IN APPSTEPS IN APPS .................................................................................................................................................................................................................................... 39393939 VALUSETS EXPLANATIONVALUSETS EXPLANATIONVALUSETS EXPLANATIONVALUSETS EXPLANATION ........................................................................................................................................................................................................................................................................................................................ 41414141 WORKING WITH USER EXWORKING WITH USER EXWORKING WITH USER EXWORKING WITH USER EXITSITSITSITS ....................................................................................................................................................................................................................................................................................................45454545 PROFILESPROFILESPROFILESPROFILES ....................................................................................................................................................................................................................................................................................................................................................................................................................................49494949 DIFFERENT API'S WITHDIFFERENT API'S WITHDIFFERENT API'S WITHDIFFERENT API'S WITH SYNTAXSYNTAXSYNTAXSYNTAX.................................................................................................................................................................................................................................................................................... 51515151 MULTI ORGMULTI ORGMULTI ORGMULTI ORG............................................................................................................................................................................................................................................................................................................................................................................................................................53535353 FLEX FEILDSFLEX FEILDSFLEX FEILDSFLEX FEILDS....................................................................................................................................................................................................................................................................................................................................................................................................................55555555 INTERFACESINTERFACESINTERFACESINTERFACES ................................................................................................................................................................................................................................................................................................................................................................................................................56565656 SQL LOADERSQL LOADERSQL LOADERSQL LOADER................................................................................................................................................................................................................................................................................................................................................................................................................ 58585858 CONVERSIONSCONVERSIONSCONVERSIONSCONVERSIONS....................................................................................................................................................................................................................................................................................................................................................................................................60606060 ITEM CONVERSION CONVITEM CONVERSION CONVITEM CONVERSION CONVITEM CONVERSION CONVERSION SCRIPTERSION SCRIPTERSION SCRIPTERSION SCRIPT ....................................................................................................................................................................................................................62626262 ITEM CATEGORIES CONVITEM CATEGORIES CONVITEM CATEGORIES CONVITEM CATEGORIES CONVERSION SCRIPTERSION SCRIPTERSION SCRIPTERSION SCRIPT........................................................................................................................................................................................................................70707070 ITEM ATTACHMENTS CONITEM ATTACHMENTS CONITEM ATTACHMENTS CONITEM ATTACHMENTS CONVERSION SCRIPTVERSION SCRIPTVERSION SCRIPTVERSION SCRIPT.................................................................................................................................................................................................... 77777777 JOINS OF THE TABLESJOINS OF THE TABLESJOINS OF THE TABLESJOINS OF THE TABLES MODULE WISEMODULE WISEMODULE WISEMODULE WISE............................................................................................................................................................................................................................................ 82828282 PURCHASE ORDER WORKFPURCHASE ORDER WORKFPURCHASE ORDER WORKFPURCHASE ORDER WORKFLOWLOWLOWLOW ................................................................................................................................................................................................................................................................................ 88888888 ORDER MANAGEMENT WORORDER MANAGEMENT WORORDER MANAGEMENT WORORDER MANAGEMENT WORKFLOWKFLOWKFLOWKFLOW........................................................................................................................................................................................................................................................................ BOOKING ORDERBOOKING ORDERBOOKING ORDERBOOKING ORDER .................................................................................................................................................................................................................................................................................................................................................... 115115115115 CREATING INVOICECREATING INVOICECREATING INVOICECREATING INVOICE ............................................................................................................................................................................................................................................................................................................................................119119119119 MAKING THE RECEIPTMAKING THE RECEIPTMAKING THE RECEIPTMAKING THE RECEIPT .................................................................................................................................................................................................................................................................................................................... 121121121121 TRANSFERING TO GLTRANSFERING TO GLTRANSFERING TO GLTRANSFERING TO GL........................................................................................................................................................................................................................................................................................................................ 122122122122 RETURNING THE ORDERRETURNING THE ORDERRETURNING THE ORDERRETURNING THE ORDER.................................................................................................................................................................................................................................................................................................... 123123123123 OM FLOWDIAGRAMOM FLOWDIAGRAMOM FLOWDIAGRAMOM FLOWDIAGRAM........................................................................................................................................................................................................................................................................................................................................ 126126126126 OM TABLE RELATION DIOM TABLE RELATION DIOM TABLE RELATION DIOM TABLE RELATION DIAGRAMAGRAMAGRAMAGRAM .................................................................................................................................................................................................................................................... 128128128128 FLOW HOWFLOW HOWFLOW HOWFLOW HOW TABLE EFFECTED WHILETABLE EFFECTED WHILETABLE EFFECTED WHILETABLE EFFECTED WHILE BOOKING ORDERBOOKING ORDERBOOKING ORDERBOOKING ORDER ............................................................................................ 129129129129 TRADING COMMUNITY ARTRADING COMMUNITY ARTRADING COMMUNITY ARTRADING COMMUNITY ARCHITECTURE(TCA)CHITECTURE(TCA)CHITECTURE(TCA)CHITECTURE(TCA)................................................................................................................................................................ 131131131131 CREATION OF ITEMCREATION OF ITEMCREATION OF ITEMCREATION OF ITEM ................................................................................................................................................................................................................................................................................................................................................................ 135135135135 FREQUENTLY ASKED QUEFREQUENTLY ASKED QUEFREQUENTLY ASKED QUEFREQUENTLY ASKED QUERIESRIESRIESRIES................................................................................................................................................................................................................................................................................ 140140140140
  • 6. Oracle Application 11.5.9 Bias Technologies 0000
  • 7. Oracle Application 11.5.9 Bias Technologies 1111 SQL CONCEPTS Structured Query Language(SQL) is the standard language designed to access relational databases. SQL is pronounced either as the word Sequel or as the letters SQL. SQL uses simple syntax that is easy to learn and use there are five types of SQL statements given below. Query Statements: Allow you to retrieve the rows stored in the database tables. You write a query using the SQL SELECT statement. Data Manipulation Language (DML) Statements: Allows you to modify the contents of the tables. There are three DML statements. INSERT - Allows you to Insert row(s) into the Table. UPDATE - Allows you to change a Row. DELETE - Allows you delete the rows from the Table. Data Definition Language (DDL): Allows you to define the Data structures, such as tables that make up a database. There are five basic types of DDL statements. CREATE – Allows you to Create Database structure. Ex: Create Table – Used to create a Table in the Database. Create User – Used to create the database user. ALTER – Allows you to modify a database structure. DROP – Allows you to remove a database structure. RENAME – Allows you to change the name of the table. TRUNCATE – Allows you to delete the entire contents of the table. Transaction Control (TC) Statements: Allows you to permanently record the changes made to rows stored in a table or undo the changes. There are three TC Statements. COMMIT – Allows you to permanently record the changes made to the rows. ROLLBACK – Allows you to undo the changes made to the rows. SAVEPOINT – Allows you to set a SAVEPOINT to which you can rollback changes you made. Data Control Language (DCL): Allows you to change the permissions on the database structures. There are two DCL statements. GRANT – Allows you to give another user access to your database structures, such as tables. REVOKE – Allows you to prevent another user from accessing to your database structures, such as tables.
  • 8. Oracle Application 11.5.9 Bias Technologies 2222 Tables: Table is a database object which holds the data and contains one or more columns associated with its datatypes Creating a Table: we use the create table statement to create a table. The simple syntax for the creation of table. Syntax: CREATE Table table_name (column_name type [CONSTRAINT constraint_def DEFAULT default_exp], column_name type [CONSTRAINT constraint_def DEFAULT default_exp], column_name type [CONSTRAINT constraint_def DEFAULT default_exp]… ) [ON COMMIT {DELETE | PRESERVE} ROWS] TABLESPACE tab_space; Ex: SQL> Create table hariha_0016(ename varchar2(10), Eno number unique); Table Created. Altering a Table: we can alter the table using the alter statement. The alter table statement perform such tasks given below. Add, modify, or drop a column. Add or drop a constraint. Enable or Disable a constraint. Ex: SQL> Alter table hariha_0016 Add address varchar2(10); Modifying a Column: Ex: SQL> Alter table hariha_0016 Modify address varchar2(20); Dropping a Column: Ex: SQL> Alter table hariha_0016 Drop address; Renaming a Table: If we want to change the name of the table then we use this RENAME statement. Ex: SQL> Rename table hariha_0016 To Hariha_0015; Truncating a Table: If we want to delete all the rows existing in the table then we use the TRUNCATE Statement. Ex: SQL> Truncate table hariha_0015; Dropping a Table: If we want to drop the total structure along with the records existing in the table we use this DROP statement. Ex: SQL> Drop table hariha_0015;
  • 9. Oracle Application 11.5.9 Bias Technologies 3333 Views: A view is basically a predefined query on one or more tables. Retrieving information from the view is done in the same manner as retrieving from the table. Creating a View: by using the create view statement we can create a view. Syntax: Create [Or Replace] View view_name [(allias_name[,allias_name….])] AS subquery [WITH {CHECK OPTION | READ ONLY} CONSTRAINT Constraint_name]; Ex: SQL> Create view medha_0016_view AS Select ename, eno, address from Hariha_0016; View Created. Performing an Insert using a View: we can also perform DML operations using the views. Given below is the example for that. Ex: SQL> Insert into medha_0016_view( Ename, eno, address) Values (HARIHA, 0016, HYD); 1 Row Created. Modifying a View: we can modify the view using the REPLACE. If there any view existing with that name then it was modified with the current one. Ex: SQL> Create or Replace view medha_0016_view AS Select a.ename, a.eno, a.address, b.city from Hariha_0016 a, hariha_0011 b Where a.eno = b.eno; Dropping a View: when want to drop the view we use this statement. Only the view will be dropped from the database the table was not effected. Ex: SQL> Drop view hariha_0016_view; Sequence: A sequence is a database item that generates a sequence of integers. We create the sequence using the CREATE SEQUENCE statement. Syntax: Create Sequence Sequence_name [Start with Start_num] [Increment by increment_num] [ {MAXVALUE max_num | NOMAXVALUE} ] [ {MINVALUE min_num | NOMINVALUE} ] [ {CYCLE | NOCYCLE} ] [ {ORDER | NOORDER} ];
  • 10. Oracle Application 11.5.9 Bias Technologies 4444 Ex: SQL> Create Sequence medha_seq_0016 Start with 100 Increment by 1; Sequence Created. Using the Sequence: Ex: SQL> Select medha_seq_0016.currval ”Currval”, medha_seq_0016.nextval “Nextval” From Dual; Output: Currval Nextval --------- ---------- 101 101 Modifying the Sequence: If we want to modify the sequence by using the ALTER SEQUENCE we can do that. Ex: SQL> Alter Sequence medha_seq_0016 Start with 1000 Increment by 2; Sequence Altered. Dropping a Sequence: If we want to drop the sequence then we use this DROP STATEMENT. Ex: SQL> Drop Sequence medha_seq_0016; Sequence Dropped. Explain Plan: Explain plan gives the execution plan of the statement. PLAN_TABLE is necessary for explain plan. If there is no PLAN_TABLE in your system then go with UTLXPLAN.SQL from the SQL Prompt. Syntax: SQL> Explain plan Set statement_id = ‘hariha_0016’ [into PLAN_TABLE ] for select * from scott.emp where empno = 7369; Plan Explained. In TOAD(Tools for Oracle Application Design) write the SQL statement and press CTRL+E then it automatically shows the explain plan. It is the simple way to get the explain plan instead of writing the explain plan in SQL.
  • 11. Oracle Application 11.5.9 Bias Technologies 5555 SQL Trace: SQL Trace gives a wide range of information & statistics that used to tune a group of SQL operations. We do the Sequel Trace at three levels. 1. SQL 2. Reports 3. Forms Trace the Sequel Statements. How much time it was taking, how many rows it was fetching, all the information was given from SQL Trace. Steps for generating Trace file: Enable the Trace. Run the DML statements. Disable the Trace. Get the Trace file. Convert the Trace File to Readable Format. The Trace file was generated with he extension .TRC. Oracle has give specified directory for trace files. To get the path use the query below. EX: SQL> Select value from V$PARAMETER Where name = ‘USER_DUMP_DEST’; To get the name of the Trace file also we have to use the Query. SQL> Select c.value || ‘ORA’ || TO_CHAR(a.spid, ‘FM00000’) || ‘.TRC’ From V$PROCESS a, V$SESSION b, V$PARAMETER c Where a.addr = b.paddr and b.ausid = userenv(‘sessionid’) and c.name = ‘USER_DUMP_DEST’; TKPROF: Copy the trace file, which was generated earlier, and paste it in your custom directory. Syntax: CMD> TKPROF d:siri_0016.trc siri_0016.txt The Hariha_0016.txt was created in the same drive where the Trace file was located. Ex: --Query to Print the Cumulative Salary of the Employee table order by DEPTNO SQL> Select deptno, ename, sal, sum(sal) over(partition by deptno order by deptno, ename) “CUM_SAL” from scott.emp;
  • 12. Oracle Application 11.5.9 Bias Technologies 6666 PL/SQL CONCEPTS Oracle added a procedural programming language known, as PL/SQL (Procedural Language/SQL). PL/SQL is a third generation language and contains the standard programming constructs. Anonymous Block: An Unnamed block which will not store any where in the database is know as Anonymous block. Block Structure: PL/SQL programs are divided up into structures known as blocks, with each block containing the PL/SQL and SQL statements. The syntax for the structure is given below. Syntax: [DECLARE Variable declaration Begin Executable_statements [Exception Exception_handling_statements] End; Ex: SQL> SET SERVEROUT ON; SQL> Declare v_1 number; v_2 number; v_3 number; Begin v_1:=&v_1; v_2:=&v_2; v_3:=&v_3; if v_1 < v_2 and v_1 < v_3 then dbms_output.put_line('1st is small'); elsif v_2 < v_3 then dbms_output.put_line('2nd is small'); else dbms_output.put_line('3rd is small'); end if; Exception When zero_divide then DBMS_OUTPUT.PUT_LINE(‘Division by ZERO’); End; O/p: It will ask for the three input values and will display the smallest number in that. Difference between PL/SQL and SQL: In PL/SQL there is no buffer to hold the values so we pass into variables. Here in SQL there is buffer to hold the data temporarily. Ex: SQL> Select ename from emp where is empno = 7788; SQL> Declare V_name varchar2(10); Begin Select ename into v_name from emp where empno = 7788; End;
  • 13. Oracle Application 11.5.9 Bias Technologies 7777 Cursors: Cursor is a private SQL area provided by the oracle engine. It is mainly used to retrieve the data from more than one column. There are two types of cursors they are given below. Implicit Cursors Explicit Cursors Implicit Cursors: Implicit cursor raises implicitly when we use INSERT, UPDATE, DELETE and SELECT..INTO statements. Because the Implicit cursor is opened and closed by the PL/SQL engine. Ex: SQL> declare v_edata emp%ROWTYPE; begin select * into v_edata from emp where empno=7788; if sql%notfound then dbms_output.put_line('Record Not Found'); else dbms_output.put_line('Record Found'); end if; end; Processing Explicit Cursors: The four PL/SQL steps necessary for explicit cursor processing are as follows. Declare the cursor. Open the cursor for a Query. Fetch the results into PL/SQL variables. Close the Cursor. Declaration of Cursor: The declaration of the cursor is associated with the select statement. The syntax for the cursor is given below. Syntax: CURSOR cursor_name IS select_statement; Ex: -- To print the Cumulative SAL of the Employee table order by empno SQL>declare v_sal number; v_dno number; l_count number; cursor test_cursor is select * from scott.emp order by empno; begin v_sal:=0; v_dno:=0; for i in test_cursor loop if(i.deptno!=v_dno) then v_sal:= 0; end if; v_sal:=v_sal+i.sal; dbms_output.put_line('Ename: ' || i.ename||' Sal: '|| i.sal || '_ Cum_sal: '|| v_sal || 'Deptno: ' || i.deptno); l_count:=test_cursor%rowcount; end loop; dbms_output.put_line(l_count||' Row(s) Fetched by the Cursor'); end test_cursor;
  • 14. Oracle Application 11.5.9 Bias Technologies 8888 Cursor Attributes: There are four cursors available in PL/SQL that can be applied to cursors. Those are given below. %FOUND %NOTFOUND %ISOPEN %ROWCOUNT %FOUND: %FOUND is a Boolean attribute. It returns TRUE if the previous FETCH returned a row and FALSE if it didn’t. %NOTFOUND: %NOTFOUND is also a Boolean attribute. It returns FALSE if the previous FETCH returned a row and TRUE if it didn’t. It behaves opposite to the %FOUND. %ISOPEN: %ISOPEN is a Boolean attribute. It returns TRUE if the associated cursor is open other wise it will return FALSE. %ROWCOUNT: %ROWCOUNT is a Numeric attribute. It returns number of rows returned by the cursor so far. Declaring, Opening Fetching and Closing the Cursor: Ex: SQL> declare v_eno number; v_ename varchar2(20); l_count number; cursor razia_cursor is select empno,ename from scott.emp; begin open razia_cursor; loop fetch razia_cursor into v_eno, v_ename; exit when razia_cursor%notfound; l_count:=razia_cursor%rowcount; dbms_output.put_line('Ename: ' || v_ename||' ENUM: '|| v_eno); end loop; close razia_cursor; dbms_output.put_line(l_count||' Row(s) Fetched by the Cursor'); end; Ex: SQL> -- Example to print the odd rows in the Table EMP declare n number; l_count number; cursor razia_cursor is select empno,ename,rownum from scott.emp; begin for i in razia_cursor loop n:=mod(i.rownum,2); if (n>0) then dbms_output.put_line('Empno: ' || i.empno||' NAME: '|| i.ename||' ROWNUM: '|| i.Rownum); end if; l_count:=razia_cursor%rowcount; end loop; dbms_output.put_line(l_count||' Number of Row(s) Fetched by the Cursor'); end razia_cursor;
  • 15. Oracle Application 11.5.9 Bias Technologies 9999 Exceptions: An Exception is a error handling statement. It is used when ever our program terminates abnormally by using the exception we can execute the program from abnormal termination to normal termination. There are mainly two types of exceptions they are given below. Predefined Exceptions. User defined Exceptions. Predefined Exceptions: Oracle has predefined several exceptions that correspond to the most common oracle errors. Some predefined exceptions are given below. LOGIN_DENIED NO_DATA_FOUND ZERO_DIVIDE TOO_MANY_ROWS STORAGE_ERROR ROWTYPE_MISMATCH INVALID_CURSOR CURSOR_ALREADY_OPEN Ex: SQL> declare cursor test_cursor is select e.ename, d.deptno, d. dname from scott.emp e, scott.dept d where e.deptno=20 and d.dname='RESEARCH'; begin for i in test_cursor loop dbms_output.put_line(i.ename || ' ' || i.deptno ||' '|| i.dname); end loop; exception when no_data_found then dbms_output.put_line('NO DATA FOUND EXCEPTION RAISED'); when others then dbms_output.put_line(' An Error Raised ' || sqlerrm); end test_cursor; User Defined Exceptions: A user defined exception is an error defined by the programmer. User defined exceptions are declared in the declarative section of the PL/SQL block just like variables. Syntax: DECLARE E_myexception EXCEPTION; Ex: SQL> create or replace procedure razia_proc(v_sal in number) as v_sl number; razia_excep exception; begin if(v_sal >= 5000) then raise razia_excep; else select sal into v_sl from emp order by deptno; end if; exception when razia_excep then dbms_output.put_line( 'YOU HAVE PERFORMED AN ILLEGAL OPERATION'); end razia_proc;
  • 16. Oracle Application 11.5.9 Bias Technologies 10101010 Procedures: Procedures are also known as subprograms. Given below is the syntax for the creation of the procedure. Syntax: CREATE [OR REPLACE] PROCEDURE procedure_name [(argument [{IN | OUT | IN OUT}] type, … [(argument [{IN | OUT | IN OUT}] type) ] {IS | AS} BEGIN procedure_body END procedure_name; Ex: SQL> create or replace procedure razia_proc as v_sal number; cursor razia_cursor is select * from emp order by deptno; begin v_sal := &v_s; for i in razia_cursor loop if(i.sal > v_sal) then dbms_output.put_line( 'Employee Name: ' || i.ename); end if; end loop; exception when others then dbms_output.put_line( 'YOU HAVE PERFORMED AN ILLEGAL OPERATION'); dbms_output.put_line( 'THE PROGRAM MAY TERMINATE NOW'); end razia_proc; Execution: exec razia_proc; Passing IN Parameter to the Procedures: Ex: SQL> create or replace procedure kanthi_proc(p_inpar in number) as v_name varchar2(30); begin select ename into v_name from emp where empno=p_inpar; dbms_output.put_line( 'Employee Name: ' || v_name); exception when others then dbms_output.put_line( 'YOU HAVE PERFORMED ILLEGAL OPERATION'); end kanthi_proc; Using IN and OUT parameters to Procedures: Ex: SQL> create or replace procedure shabbir_proc(p_outpar out varchar2,p_inpar in number) as begin select ename into p_outpar from emp where empno=p_inpar; end; --To Catch the Output variable out side the procedure in the SQL declare v_name varchar2(20); v_num number; begin mypro(v_name,&v_num); dbms_output.put_line( 'Employee Name: ' || v_name); end shabbir_proc;
  • 17. Oracle Application 11.5.9 Bias Technologies 11111111 Functions: Function is similar to a procedure except that a function must return a value to the statement from which it is called. The syntax for creating a function is given below. Syntax: SQL> CREATE [OR REPLACE] FUNCTION function_name [(parameter_name[IN | OUT | IN OUT] type [,….])] RETURN type; {IS | AS} BEGIN Function_body END function_name; Ex: create or replace function haritha_func(p_empno number) return varchar2 is v_ename varchar2(20); v_sal number; begin select ename,sal into v_ename, v_sal from emp where empno=p_empno; if v_sal>=6000 then return 'TRUE'; else return 'FALSE'; end if; end haritha_func; Execution: SQL> select haritha_func(7788) from dual; Ex: SQL> create or replace function haritha_fun(p_radius number) return number as v_pi number := 3.141; v_area number; begin v_area := v_pi * POWER(p_radius,2); return v_area; end haritha_fun; Execution: SQL> select haritha_fun(7) from dual; Dropping Function and Procedure: When we want to drop the function or procedure then we use this DROP statement the syntax for the DROP is given below. Syntax for Dropping Function: DROP FUNCTION function_name; Syntax for Dropping Procedure: DROP PROCEDURE procedure_name;
  • 18. Oracle Application 11.5.9 Bias Technologies 12121212 Packages: Package is declarative part of the functions and procedures which are stored in that package. There are two blocks in defining a package. Package Specification Package body Package Specification: The package specification contains information about the contents of the package. It does not contain code for any subprograms. Syntax: CREATE [OR REPLACE] PACKAGE package_name {IS | AS} Type_definition | Procedure_specification | Function_specification | Variable_declaration | Exception_declaration | Cursor_declaration | Pragma_declaration END [package_name]; Package Body: The package body is separate data dictionary object from the package header. It cannot be successfully compiled unless the package header is already been successfully compiled. Syntax: CREATE [OR REPLACE] PACKAGE BODY package_name {IS | AS} …. BEGIN Initialization_code; END package_name; Ex: SQL> create or replace package vamsi_pack as procedure razia_proc(mynum in number); end vamsi_pack; -- Declaration of Package Body and passing value to the procedure create or replace package body vamsi_pack as procedure razia_proc(mynum in number) as cursor mycursor is select ename,empno,sal from emp where empno=mynum; begin dbms_output.put_line(' NAME ' || ' NUMBER ' || ' SALARY '); for i in mycursor loop dbms_output.put_line(' '||i.ename||' '|| i.empno ||' '|| i.sal); end loop; exception when others then dbms_output.put_line('YOU HAVE DONE AN ILLEGAL OPERATION '); end myproc; end vamsi_pack; Execution: SQL> exec vamsi_pack.razia_proc(7788);
  • 19. Oracle Application 11.5.9 Bias Technologies 13131313 Triggers: A Trigger is a procedure that will fire automatically by the database. When a specified DML statement is run against the specified table. Triggers are useful for doing things like advanced auditing of changes made to a column values in a table. The syntax for creating the trigger is given below. Syntax: CREATE [OR REPLACE] TRIGGER trigger_name {BEFORE | AFTER | INSTEAD OF} trigger_event ON table_name [FOR EACH ROW [WHEN trigger_condition]] BEGIN Trigger_body; END; Ex: This example is when we insert into a table t1 then the same data has to be inserted into the table t2. For that we require two tables of one same column. SQL> CREATE TABLE t1( Eno number); SQL> CREATE TABLE t2( Eno number, Ins_date date); SQL> CREATE OR REPLACE TRIGGER razia_trigger BEFORE INSERT ON TABLE t1 FOR EACH ROW BEGIN INSERT INTO TABLE t2 VALUES(:new.eno,sysdate); END; Note: For every insert operation on t1 it will insert the eno col values to t2 along with the current sysdate in the other column. Disabling and Enabling Trigger: We can stop the trigger from firing by disabling the trigger by using the ALTER TRIGGER statement. The syntax for enabling the trigger and disabling the trigger is given below. Syntax: ALTER TRIGGER trigger_name DISABLE; ALTER TRIGGER trigger_name ENABLE; Dropping a Trigger: If we want to drop the trigger from the database then we have to use DROP TRIGGER statement. The syntax for dropping the trigger is given below. Syntax: DROP TRIGGER trigger_name;
  • 20. Oracle Application 11.5.9 Bias Technologies 14141414 ERP: Enterprise Resource Planning Here Resource means 5 m’s 1. Money 2. Man power 3. Machinery 4. Material and 5. Management ERP Purpose: Planning for proper utilization of resources for a business organization . ERP as a Product : all objects(i.e. forms, reports )and all other programs are developed and throwly tested and those will be provided with these ERP. Methodology : the process used to implement ERP Product for a business Organization. AIM (APPLICATION IMPLEMENTATION METHODOLOGY): Methodology for Oracle Apps is AIM(Applications Implementation Methodology) Phases in Aim Methodology: 1. Definition Phase 2. Operational Analysis Phase 3. Solution Design Phase 4. Build Phase 5. Transition Phase 6. Production Phase 1. Definition Phase: Here the functional consultants prepare the sample structure (Blue Print) for the real business by gathering the information. 2. Operational Analysis phase: In this the functional consultant prepare BR100 (Business Requirement). 3. Solution Design Phase: here the functional consultant will prepare MD50 by using BR100. MD50 is the functional document. 4. Build Phase: here the technical consultant converts MD50 to MD70. MD70 is the technical document. Then the technical consultant prepare the final object and go with testing, i.e. Unit Testing. 5. Transition Phase: here SIT(System Integration Testing) and UAT(User Acceptance Testing) is done. Functional consultant does SIT. After this the functional consultant will train the user in oracle apps product and user does UAT. If it is satisfied by the user, it is sign off and product will be given to the user. 6. Production phase: loading the project in the client place. Where the server of oracle apps in the client place.
  • 21. Oracle Application 11.5.9 Bias Technologies 15151515 Introduction: The Oracle Applications is an ERP, which was developed by the Oracle Corp and was used by the several companies to utilize several resources contained with them. Business Flow of Oracle Applications: Oracle Applications is designed for the Financial and Manufacturing clients. The categories in the modules are given below. Financial Modules: Account Payables, Account Receivables, General Ledger and Fixed Assets. Manufacturing Modules: Purchasing, Inventory, Bill Of Materials, Work in Progress and Order Management. In HRMS we maintain all the details of the employee as well as the organization details. Module: It is a collection of forms and reports which are related to particular business process. Purchase order module has the forms and reports which are related to the purchasing business process. It contains nearly 50,000 tables they are accessed by only purchase order module.
  • 22. Oracle Application 11.5.9 Bias Technologies 16161616 Oracle Applications Database Structure: Schema: Schema is a place in database which contains the database objects like tables, indexes, sequences, views and synonyms. In oracle applications database we have individual schemas for each module application. These schemas contain the database objects of only that particular module. When we connect any database schema we can access only that schema database objects. We can’t access other database objects. For data integrity purpose the oracle has deigned one more schema called Apps schema which contains only synonyms and this schema have the rights to access any other module database objects. Note: Apps Schema will not contain the tables it contain only synonyms. Projects in Oracle Applications: Implementation Projects: Implementation means we will develop the forms, reports from the scratch. In this project we will be work in the areas of the forms, reports, interface, customizations and interfaces. Customization Projects: In this we customize some standard reports. Migration / Up gradation Projects: This will be moving from the Old version to the New version. Support / Maintenance Projects: Solving the issues which are raised by the end user while entering the data. Post Implementation Projects: This will be done at free of cost. It’s a real time testing.
  • 23. Oracle Application 11.5.9 Bias Technologies 17171717 Types of Docs in Oracle Apps: MD 050 -- Module design by the functional consultant. MD 070 -- Technical Document designed by the technical consultant. MD 020 -- Technical document designed by the functional document. MD 0120 -- Migration and user training document by the technical consultant. CV 040 -- Conversion of the functional document by the functional consultant. CV 060 -- Conversion of the technical document by the technical consultant. Note: Conversion means moving the data from the legacy system to the apps system. Oracle Apps File Architecture: We will have Linux/Unix server for oracle apps we will be connecting to the server by using the FTP/TOAD/FILEZILLA/WINSEP3 File Architecture: The Server first top will be application top “Appl-top” we can change the name according to the client wish. Under that we have the product top. Each module has go it individual top.
  • 24. Oracle Application 11.5.9 Bias Technologies 18181818 Note: We will move the (download/upload) forms and reports from the local machine to the server always in binary mode. We save any information only on the server not in the local machine. Entering the Oracle Applications: First it will prompt for the username and password and then click on the connect button then it will give us responsibilities form. Select to which responsibility you want to login then you will enter to the oracle applications. We get the screen as given below when we enter into the system administrator responsibility.
  • 25. Oracle Application 11.5.9 Bias Technologies 19191919 User Creation: Connect to the oracle applications 11i as we shown above and enter into the system administrator responsibility. The navigation to create the user is Security User Define. The window is given below. Enter the username, password and assign responsibilities what ever you want and save the user will be created. Note: when ever we login next time we can enter the user name and password that what we created now. Steps to Register a Report: 1. Develop the report in 6i according to the client requirements. 2. Transfer the object from the local system to the server and placing that in the appropriate directory. 3. Creating the executable and set the execution method as oracle reports as we are registering the report. Set the executable file name as the object name which we modified or developed. 4. Create the concurrent program and set the executable to the concurrent program. If your program has any parameters then go with the parameters button and submit the parameter tokens. 5. Set the concurrent program to the request group and the request group to the responsibilities. 6. User having that responsibility will only can run that request or submit the request of the report. Note: Every form contains 3 types of fields those are 1. Yellow Colored fields --- Mandatory. With out entering these mandatory fields we can’t save the form. 2. Green Colored fields --- Read only. 3. White Colored fields --- Optional. 4. Blue colored indicates the form in the query mode. We enter into the query mode by pressing F11 and enter data which was already saved to retrieve the record press CTRL+F11.
  • 26. Oracle Application 11.5.9 Bias Technologies 20202020 Creating the Concurrent Program Executable: Before we start the registration process we have to create a report according to the client requirements and place the report in the appropriate directory (Custom top). The navigation for this form is Concurrent Program Executable. The given below is the executable window. Window help: Executable: Set the executable name as we like here we entered the name as per the program. Short Name: Set the short name of the executable as related to the executable because we have to remember them. Application: Select the Appropriate Application from the list of applications here we selected the Oracle Receivables because we saved our report (valueset.RDF) in the AR (Receivables) folder only.
  • 27. Oracle Application 11.5.9 Bias Technologies 21212121 Description: This field is not a mandatory field if we want to describe the concurrent program executable we use this field. Execution Method: There are eleven execution methods we can choose what ever we want as per the requirements. Those are stated below. Host: The execution file is a host script. When ever we have an UNIX scripting programs then we use this execution method. Immediate: The execution file is a program written to run as a subroutine of the concurrent manager. We recommend against defining new immediate concurrent programs, and suggest you use either a PL/SQL Stored Procedure or a Spawned C Program instead. Java Stored Procedure: The execution file is a Java stored procedure. Java Concurrent Program: The execution file is a program written in Java. Multi Language Function: The execution file is a function (MLS function) that supports running concurrent programs in multiple languages. Oracle Reports: The execution file is an Oracle Reports file. To register a report which we done in report6i we use this method. PL/SQL Stored Procedure: The execution file is a PL/SQL stored procedure. Spawned: The execution file is a C or Pro*C program. SQL * Loader: The execution file is a SQL script. SQL * Plus: The execution file is a SQL*Plus script. Note: 1. According to the requirement of the user and the type of the report we created the execution method will depend. Execution File Name: We have to set the executable filename as our report name. Here we create the report name as valueset so; we set the name as valueset. Subroutine Name: Only immediate programs or spawned programs using the Unified C API use the subroutine field. Staging function Parameters (Button): The Stage Function Parameters button opens a window that allows you to enter parameters for the Request Set Stage Function. This button is only enabled when you select Request Set Stage Function as your Execution Method. After entering all the fields save the form and go to the Concurrent Programs Form. The Navigation for this is Concurrent Program Define.
  • 28. Oracle Application 11.5.9 Bias Technologies 22222222 Window Help: Program: Enter the Program name as we like it is not standard we gave here as cs_value_prg as per our program. Enabled (Check Box): Disabled programs do not show up in users' lists, and do not appear in any concurrent manager queues. You cannot delete a concurrent program because its information helps to provide an audit trail. Short Name: The short name is also like the short name in the executable form. We have to give the name as per the program name. Application Name: Select the application name as Oracle Receivables. We have to select the application as what we select in the Executable form. Description: This field is not a mandatory field if we want to describe the concurrent program we use this field. Executable: Name: Set the executable name as the short name of the executable which we give in the previous Executable form. Method: when we enter the executable name there in the name field it was automatically set which we saved in the executable form. Priority: you can assign this program it own priority. The concurrent managers process requests for this program at the priority you assign here.
  • 29. Oracle Application 11.5.9 Bias Technologies 23232323 Request: Type: If you want to associate your program with a predefined request type, enter the name of the request type here. Incrementor: For use by Oracle Applications internal developers only. The Incrementor function is shown here. MLS Function: The Multilingual Concurrent Request feature allows a user to submit a request once to be run multiple times, each time in a different language. If this program utilizes this feature the MLS function determines which installed languages are needed for the request Use in SRS (Check Box): Check this box to indicate that users can submit a request to run this program from a Standard Request Submission window. Run Alone (Check Box): If you check the Use in SRS box, you can also check this box to allow a user to enter disabled or outdated values as parameter values. Enable Trace (Check Box): Turns on SQL tracing when program runs. Allow Disabled Values (Check Box): If you check the Use in SRS box, you can also check this box to allow a user to enter disabled or outdated values as parameter values. Restart on system failure Run Alone (Check Box): Use this option to indicate that this concurrent program should automatically be restarted when the concurrent manager is restored after a system failure. NLS Complaint (Check Box): This box is checked if the program allows for a user to submit a request of this program that will reflect a language and territory that are different from the language and territory that the users are operating in. Output: Format: There are several formats as per the requirements in the report we use this format here we use the TEXT format. Save (Check Box): Indicate whether to automatically save the output from this program to an operating system file when it is run. This value becomes the default for all requests submitted for this program. Print (Check Box): If you enter No, your concurrent program's output is never sent to the printer. Columns/Rows: Enter the minimum column and row length for this program's report output. Oracle Applications uses this information to determine which print styles can accommodate your report. Style: There are several styles which we can use A4, Landscape, BACS and other styles. Style Required (Check Box): If your program requires a specific print style (for example, a check writing report), use this check box to enforce that print style. Printer: If you want to restrict your program's output to a single printer, enter the name of the printer to which you want to send your output.
  • 30. Oracle Application 11.5.9 Bias Technologies 24242424 Buttons: Copy to (Button): Create another concurrent program using the same executable, request and report information as the current program. You can optionally copy the incompatibility and parameter details information as well. Session Control (Button): Use this window to specify options for the database session of the concurrent program when it is executed. Incompatibilities (Button): Identify programs that should not run simultaneously with your concurrent program because they might interfere with its execution. You can specify your program as being incompatible with itself. Parameters (Button): If there are any parameters for our report then we go with the parameters button. We get the window called parameters when we go with the button. Note: The window help of the Parameter window will be given in the next steps. Setting the Concurrent Program to the Request Group: To set the concurrent program to the request group we have to go to the responsibilities screen. The navigation is Security Responsibility Define. Then we get the window as shown below. Note: Here if we want we can create new responsibility or we can use the existing one. Here we use the existing one retrieved the existing responsibility name using query mode (F11) as we discussed earlier. Now copy the request group name and go to the navigation Security Responsibility Request. Then Request Groups window will be opened as shown below. By entering the query mode we have to paste the Request Group name at the Group field and press CTRL+F11. This form is case sensitive. After that click on new button and enter the concurrent program name at the name column and go with save button.
  • 31. Oracle Application 11.5.9 Bias Technologies 25252525 Submitting the Request: Now switch to the appropriate responsibility then only we can run the request. Here as per our example we have to enter into the Receivable Vision Operations. After enter into the responsibility go with the navigation. Menu View Requests then we get the window find request go with Submit a New Request button. It will prompt for the Single Request or Request Set. As our program is the single we go with the Single option. After that we get another window.
  • 32. Oracle Application 11.5.9 Bias Technologies 26262626 Enter the concurrent program name at the name field and go with the submit button. Then we get another window as shown below. To view the outputs of your program then go with the output button. To view any error messages you go with the View log button.
  • 33. Oracle Application 11.5.9 Bias Technologies 27272727 Process to Register a PL/SQL Stored Procedure: This is the PL/SQL Stored Procedure using the Table Valuesets. Creating the Procedure: EX: SQL> create or replace procedure chaitu_proc(errbuf out varchar2, retcode out varchar2, p_dno in number, p_dname in varchar2) as cursor test_cursor is select e.ename, d.deptno, d.dname from scott.emp e, scott.dept d where e.deptno=p_dno and d.dname=p_dname; begin for i in test_cursor loop dbms_output.put_line(i.ename || ' ' || i.deptno ||' '|| i.dname); end loop; end chaitu_proc; Procedure Created. Note: Here we have to use fnd_file.put_line to view the output in Oracle apps, because dbms_output.put_line will not work in Oracle Apps Here in the Procedure there are two mandatory out parameters those are errbuf and retcode. Errbuf: Used to write the error message to log or request file. Retcode: if the RETCODE is set to 0 - Then concurrent program will Completed NORMAL. 1 - Then concurrent program will Completed WARNINGS. 2 - Then concurrent program will Completed ERROR. Creating the Concurrent Program Executable: Before we start the registration process we have to create a package or Procedure according to the client requirements. The navigation for this form is Concurrent Program Executable. The given below is the Navigator window.
  • 34. Oracle Application 11.5.9 Bias Technologies 28282828 When we go with the above navigation the Executable form will be open then we have to enter the mandatory fields. Executable: Set the executable name as we like here we entered the name as per the program. Short Name: Set the short name of the executable as related to the executable because we have to remember them. Application: Select the application name from the list of applications here we selected the Oracle Receivables as per our requirements. Description: This field is not a mandatory field if we want to describe the program we use this field. Execution Method: We have to select the PL/SQL Stored Procedure as execution method to register the myproc1 procedure. Execution File Name: We have to set the executable filename as procedure name. Here we our procedure name is mrproc1 so; we set the name as myproc1. After entering all the fields save the form and go to the Concurrent Programs Form. The Navigation for this is Concurrent Program Define.
  • 35. Oracle Application 11.5.9 Bias Technologies 29292929 Enter all the mandatory fields and save the form. Program: Enter the Program name as we like it is not standard we gave here as cs_value_prg as per our program. Short Name: The short name is also like the short name in the executable form. We have to give the name as per the program name. Application Name: Select the application name as Oracle Receivables. We have to select the application as what we select in the Executable form. Executable Name: Set the executable name as the short name of the executable which we give in the previous Executable form. Format: There are several formats as per the requirements in the report we use this format here we use the TEXT format. Style: There are several styles which we can use A4, Landscape, BACS and other styles. Here we are having the two parameters go with Parameters button in the Screen. The Concurrent Program Parameters window will show below.
  • 36. Oracle Application 11.5.9 Bias Technologies 30303030 Note: There is no token required where we are working with the PL/SQL STORED PROCEDURE and observe that the token field in the above window is grayed it won’t allow any values into that field. Window Help: Seq: Choose the sequence numbers that specify the order in which your program receives parameter values from the concurrent manager. Parameter: We enter the parameter name that we are passing. Same was passed to the prompt when we press tab. Description: This is the optional field to describe the input parameter. Enabled (Check Box): Disabled parameters do not display at request submission time and are not passed to your execution file. Validation: Valueset: Enter the name of the value set you want your parameter to use for validation. You can only select from independent, table, and non-validated value sets. As per our example we defined two valuesets for two parameters and set the two valuesets respectively. Default Type: If you want to set a default value for this parameter, identify the type of value you need. Required (Check Box): If the program executable file requires an argument, you should require it for your concurrent program. Enable Security (Check Box): If the value set for this parameter does not allow security rules, then this field is display only. Otherwise you can elect to apply any security rules defined for this value set to affect your parameter list. Display: Display Size: Enter the field length in characters for this parameter. The user sees and fills in the field in the Parameters window of the Submit Requests window. Concatenated Description Size: Enter the display length in characters for the parameter value description. The user sees the parameter value in the Parameter Description field
  • 37. Oracle Application 11.5.9 Bias Technologies 31313131 of the Submit Requests and View Requests forms. The Parameter Description field concatenates all the parameter values for the concurrent program. Note: We recommend that you set the Concatenated Description Size for each of your parameters so that the total Concatenated Description Size for your program is 80 or less, since most video screens are 80 characters wide. Prompt: Enter the message that will prompt for the input at the submit request form. Token: For a parameter in an Oracle Reports program, the keyword or parameter appears here. The value is case insensitive. For other types of programs, you can skip this field. After modifying the parameter form, save the program. Now go the Request Group form and the set the concurrent program to the appropriate request group. The navigation for this is Security Responsibility Request. Then Request Groups form will open as shown below. Enter into Query mode by pressing F11 then enter the Request Group Name and press CTRL+F11. This form is case sensitive. After that click on new button and enter the concurrent program name at the name column and go with save button. Ex:-- Some Request Group Names For Receivables : Receivables All For Inventory : All Inclusive GUI For Order Management : OM Concurrent Programs For Purchase Order : All Reports If we don’t know the Request group name then we have to go for the navigation Security Responsibility Define we already explained in the above example.
  • 38. Oracle Application 11.5.9 Bias Technologies 32323232 Switch to the appropriate responsibility and run the request. When we enter the name of the program in the run request window then parameter window will be open. Then you will get the parameter screen enter the required parameters and go with ok button. After entering both the parameters then press ok and then submit the request. After that submit the request to and go with find button to view the status of the request. After it completed normal we can view the output from the output button. If the Status of the program completed error then go with View Log button.
  • 39. Oracle Application 11.5.9 Bias Technologies 33333333 Out Put:
  • 40. Oracle Application 11.5.9 Bias Technologies 34343434 XML Publisher Registration Steps: Purpose: For CFD(Customer Facing Document) 1. Develop a report according to the client requirements and register the concurrent program. Ex: The Concurrent program name is CS_XML_REP Note: The only difference is we have to set the format type as XML in the concurrent program window while registering 2. Create a Template with specified formats like rtf, pdf… using the appropriate tools. 3. Then go with the XML Publisher Administrator Responsibility and click on the Data definition.
  • 41. Oracle Application 11.5.9 Bias Technologies 35353535 4. Then you will get the screen now go with the Create Data definition button in the screen. 5. The Create Data Definition screen will appear enter all the fields and click on apply button. Window Help Name: This name is your data definition name, which you are going to create now. Application: We have to select the appropriate application, which our concurrent program has been registered Code: The code must match the concurrent program short name, which we registered earlier.
  • 42. Oracle Application 11.5.9 Bias Technologies 36363636 Start Date: It specifies the start date of your application. Description: To describe your Data Definition enter the data. 6. Now go with Template tab in the same screen. 7. Click on the Create template button then the following screen will appear. Window Help: Name: This is the Template Name, which we are going to create. Application: We have to select the appropriate application, which our concurrent program has been registered Type: Select the format type of your template, which you created earlier. Code: Enter the code for the template that is short name. Data Definition: Enter the data definition name, which was created earlier. Start Date: It specifies the start date of your application. Description: To describe your Template enter the data. File: Click on Browse and select the template file, which you have created. Language: Choose a specific language according to the Customer Specifications Territory: Territory specifies the language belongs to which nation. Then go with Apply button.
  • 43. Oracle Application 11.5.9 Bias Technologies 37373737 8. Now Switch to the appropriate responsibility and run the CS_XML_REP concurrent program, which we created earlier. 9. Then copy the Request_id in the Requests window. 10. Switch the responsibility to the XML Publisher Responsibility and run the XML Publisher Report. You will get the following Input Screen.
  • 44. Oracle Application 11.5.9 Bias Technologies 38383838 Output: After completion of the request go with view output window Button. Report Code: -- This code will appear on the After parameter form in our report function AfterReport return boolean is l_request number; l_appl NUMBER; begin SELECT FCP.APPLICATION_ID INTO l_appl FROM FND_CONCURRENT_PROGRAMS FCP,FND_CONCURRENT_REQUESTS R WHERE FCP.CONCURRENT_PROGRAM_ID = R.CONCURRENT_PROGRAM_ID AND R.REQUEST_ID = :P_CONC_REQUEST_ID; l_request := fnd_request.submit_request( 'XDO', 'XDOREPPB', null, null, FALSE, :P_CONC_REQUEST_ID,'xmlreporttemp',l_appl,'US','N',NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL); srw.message(100, ' Request submitted ' || l_request); SRW.USER_EXIT('FND SRWEXIT'); return (TRUE); EXCEPTION WHEN OTHERS THEN RETURN NULL; end;
  • 45. Oracle Application 11.5.9 Bias Technologies 39393939 Table Registration in APPS: 1. Create a table . Ex: Sql> Crete table wip_item(ITEM VARCHAR2(15), ITEMDESCRIPTION VARCHAR2(100), ITEMCOST NUMBER(8), CATEGORYK VARCHAR2(100), CREATION_DATE DATE, CREATED_BY NUMBER(7), LAST_UPDATE_DATE DATE, LAST_UPDATED_BY NUMBER(7), ATTRIBUTE_CAT VARCHAR2(100), ATTRIBUTE1 VARCHAR2(100), ATTRIBUTE2 VARCHAR2(100), ATTRIBUTE3 VARCHAR2(100), ATTRIBUTE4 VARCHAR2(100), ATTRIBUTE5 VARCHAR2(100)); 2. If you are in different user for Ex: scott/tiger then you have to grant permission to APPS. Ex: Grant all on wip_item to apps; 3. Connect apps/apps@PROD. 4. Create synonym for the table which we are going to register in APPS. Ex: Create public synonym wip_item for wip.wip_item. 5. Registering the table by using AD_DD Package Syntax: Exec AD_DD.REGISTER_TABLE (p_appl_short_name, p_tab_name, --table name p_tab_type, p_next_extent, -- Enter the initial and next extent sizes in kilobytes for your table. You must enter values greater than 0. p_pct_free,--free storage. p_pct_used);-- used storage. EXEC AD_DD.REGISTER_TABLE('WIP','WIP_ITEM','T',8,10,90); Registering the Columns: Syntax: EXEC AD_DD.REGISTER_COLUMN p_appl_short_name, p_tab_name, p_col_name, p_col_seq, p_col_type, p_col_width, p_nullable, p_translate, p_precision default null, p_scale default null);
  • 46. Oracle Application 11.5.9 Bias Technologies 40404040 Ex: EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ITEM',1,'VARCHAR2',15,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ITEMDESCRIPTION',2,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ITEMCOST',3,'NUMBER',8,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','CATEGORYK',4,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','CREATION_DATE',5,'DATE',11,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','CREATED_BY',6,'NUMBER',7,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','LAST_UPDATE_DATE',7,'DATE',11,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','LAST_UPDATED_BY',8,'NUMBER',7,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE_CAT',9,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE1',10,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE2',11,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE3',12,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE4',13,'VARCHAR2',100,'N','Y'); EXEC AD_DD.REGISTER_COLUMN('WIP','WIP_ITEM','ATTRIBUTE5',14,'VARCHAR2',100,'N','Y'); 6. Check in APPS go to Application Developer Responsibility Application Database Table Then we will get Tables Screen as Shown below and press F11 then enter the table_name and press CTRL+F11 then we will get the data as shown below.
  • 47. Oracle Application 11.5.9 Bias Technologies 41414141 Valuesets: Valueset is nothing but the list of values with validation. We will be using the valuesets whenever the concurrent programs have parameters and while defining the flex fields we attach this flex fields. The given below are the types of valuesets. None Independent Dependent Table Translatable Dependent Translatable Independent Special and Pair. None: It is used whenever we want to apply some format condition like max.length, numbers, and capital letters so on. There wont be any list of values in none valueset. Independent: This valueset is used whenever we want to show some hard coded values to the end user that time we will create. Navigation to get the Valueset screen in Application Validation Set After that go with the Navigation Application Validation Values then we will get the screen given below. Enter the valueset name, which we created earlier.
  • 48. Oracle Application 11.5.9 Bias Technologies 42424242 Dependent: It is a list of values, which are depending on the Independent valueset. To create dependent valueset go with same process we mentioned above and set the validation type as Dependent and click on the Edit Information button then we will get the Dependent valueset information screen enter the mandatory fields like independent valueset name which we created earlier. Table: It will be used whenever we want to show the list of values from the table column name. When we select this option then the Edit Information in this window will become active. When we go with that Edit Information button we get the Validation information window. That is shown below. To define the valueset the Navigation is Application Validation Set. The Valueset form is shown below.
  • 49. Oracle Application 11.5.9 Bias Technologies 43434343 Window Help: Value Set Name: Define your own value set name. Format Type: Select the appropriate datatype that what we are passing as parameter through this valueset. This field is mandatory. Maximum Size: Enter the maximum size of the parameter that what we are passing to the report. This field is mandatory. Validation Type: Select validation type as Table and go with the edit information button. then the Validation table information window will be open. Enter the mandatory fields as required. Now go with the edit information button then we get the Validation Table Information window will appear as shown below. Table Name: Here we can enter the table name or we can write a query. Query must be written in braces only. Ex: (select distinct (empno) from scott.emp) Value: Enter the column name which we want to display in the parameter window. Meaning: Meaning is to provide the additional information along with the list of values. ID: To column is used to pass a value to the parameter. The scenario of using this id will be if we want to pass a value to the parameter, which is associated with, the list of values select by the user. Where/Order By: To incorporate any filters in the list of values we can do that in where clause and order by is used to sort the list of values in ascending or descending order. Additional Columns: when we want to display any other Additional columns in the output form we use this. We use these two as per the requirements. Syntax: Column name “Alias Name” (Width)
  • 50. Oracle Application 11.5.9 Bias Technologies 44444444 Note: When we are working with table valueset only the edit information button is active. For other valuesets it is not active. Using $FLEX$: $FLEX$ is used to hold the data which was selected by the previous valueset for that we have to define another table valueset with different name as per the above process. In the new valuset we used the $FLEX$ as given below screen. Note: Whenever you assign the valueset to any concurrent program then you are not allowed to modify the valueset. We have to remove from the valueset from the concurrent program to modify the valueset, which was already created. For more information you go to the example given below with detailed explanation of table valueset. When ever we select the validation type as table then the edit information button in the valuesets window will be enabled. It will be disabled for the other valuesets only for the table valueset. Translatable Dependent & Translatable Independent: These two valuesets are used whenever you are working with multi-lingual implementation. Special: Special valueset is used for display flexfields data as parameter values. Pair: This valueset is used to display parameters in pairs. EX: Date from & Date To…etc. (To specify a range in pair we use such type of valuesets).
  • 51. Oracle Application 11.5.9 Bias Technologies 45454545 Working with User Exits in Reports 6i: User Exits are 3GL programs used to transfer the control from the report builder to Oracle Applications or any and it will perform some actions and return to the report builder. There are five types of user exits those are given below. FND SRWINIT FND SRWEXIT FND FORMAT_CURRENCY FND FLEXSQL FND FLEXIDVAL FND SRWINIT: Used to write in before report trigger. It is used to fetch the concurrent request information and also used to set the profile options. FND SRWEXIT: We will write this in after report trigger. Used to free the memory which has been allocated by the other user exits FND FORMAT_CURRENCY: This is used to convert amounts or currency from one currency to other currency values and also used to display currency amounts in formats. EX: SRW.USER_EXIT(‘FND FORMAT_CURRENCY’, Code = ‘currency_code’, Display_width=’15’, Amount = ‘:cf_feb’, Display = ‘:cd_feb’); Return (:cd_feb); FND FLEXSQL: This is used to get the data from flex fields. We will use in formula columns. FND FLEXIDVAL: This is used to get the data from flex fields. We will use them in formula columns. Note: 1. We use the User Exits in the Report triggers like before report, after report, before parameter form, after parameter form. 2. We have to create a mandatory parameter called P_CONC_REQUEST_ID when we work with FND SRWINIT, FND SRWEXIT. 3. The user exits are case sensitive we have to write them in capital letters only otherwise they will raise an error.
  • 52. Oracle Application 11.5.9 Bias Technologies 46464646 Designing the Report: Create a new report manually. Go to data model and click on the SQL Query then a dialog box SQL Query Statement will open write your query in that. Data Model: Ex: SELECT E.EMPNO,E.ENAME,E.SAL,D.DNAME FROM SCOTT.EMP E,SCOTT.DEPT D WHERE D.DEPTNO=E.DEPTNO order by e.deptno Layout Model: Now go to the layout model and design your report view as per the requirements. See here in the below diagram we created P_CONC_REQUEST_ID in the user parameters.
  • 53. Oracle Application 11.5.9 Bias Technologies 47474747 Report Triggers: Report triggers execute PL/SQL functions at specific times during the execution and formatting of your report. The types of report triggers are given below. Before Parameter Form: If we want to pass any initial values to the parameter we use this trigger. After Parameter Form: This trigger will fire after the entering the parameter values. To validate the parameters and use to populate the lexical parameters, we use this trigger. Before Report: In oracle 11i we use this trigger to initialize profile values. Between Pages: This trigger is used to format the output and fires once per each page except for the first page. After Report: This trigger is used to free the memory or drop the temporary objects that are created in the begining of the report or to send the output as mail. Note: 1. In the report triggers we cant use any SQL statements directly there is package called srw(Standard Report Writer) using this we can write any SQL statements. Syntax: srw.do_sql(‘create sequence myseq Increment by 1 Start with 1’); 2. To display any message box in the triggers or at any stage in reports6i we use another procedure in srw package. Syntax: srw.message(1001,’Hai this is a Simple Message from CHAITU’); Go to the before report trigger and use the FND SRWINIT which is used to fetch the concurrent request information and also to set the profile options.
  • 54. Oracle Application 11.5.9 Bias Technologies 48484848 Ex: Code in the before report trigger function BeforeReport return boolean is begin SRW.USER_EXIT('FND SRWINIT'); return (TRUE); end; After writing the code then click on the compile button if there is no error then we will get the successfully compiled message at the down right corner. Now go after report trigger and write the code as given below and compile it after successfully completion then close the window. EX: function AfterReport return boolean is begin SRW.USER_EXIT('FND SRWEXIT'); SRW.message(100,'P_CONC_ID: '||:P_CONC_REQUEST_ID); return (TRUE); end; Note: Now our report is ready, save it and register the report in the oracle applications. Then we will get the output as given below. Output Window:
  • 55. Oracle Application 11.5.9 Bias Technologies 49494949 Profiles: Profiles are the changeable options which affect the way application runs. To get these profiles we use three API’s those are given below. 1. FND_PROFILE.GET(‘Name of the Profile’, variable name); 2. variable name := FND_PROFILE.VALUE(‘Name of the profile’); 3. FND_PROFILE.SET(‘Name of the profile’, value of the profile); The 1st and 2nd are same but, the only difference is FND_PROFILE.GET is the procedure and FND_PROFILE.VALUE is the function so, it return a value. The Profile values will be set in different levels those are given below. Site Application Responsibility User Server Organization Site: This field displays the current value, if set, for all users at the installation site. Application: This field displays the current value, if set, for all users working under responsibilities owned by the application identified in the Find Profile Values block. Responsibility: This field displays the current value, if set, for all users working under the responsibility identified in the Find Profile Values block. User: This field displays the current value, if set, for the application user identified in the Find Profile Values block. Profile: Enter the name of the profile option whose values you wish to display. You may search for profile options using character strings and the wildcard symbol (%). For example, to find all the profile options prefixed by "Concurrent:” you could enter "Conc%" and press the Find button. The navigation to get the system profile values information is Profile System.
  • 56. Oracle Application 11.5.9 Bias Technologies 50505050 The profiles are of two types those are given below. 1. System Profile and 2. User Profile. The above given window is the System Profile window and the user profile window is given below and the navigation is Profile Personal. Note: To view personal profiles enter into the query mode and enter the profile name which we have already then we get profile value details. Some important Profiles: ORG_ID MFG_ORGANIZATION_ID GL_SET_OF_BKS_ID USER_ID RESP_ID RESP_APPL_ID Note: To get the RESP_ID or RESP_APPL_ID…. Go with the following navigation. Menu Help Diagnostics Examine. Then it will prompt for the oracle password, enter that then we get the Examine and Variable Values window as shown below. In the same way we can get the ORG_ID, RESP_APPL_ID, USER_ID…., by entering what ever we want at the Field column in the above Examine window.
  • 57. Oracle Application 11.5.9 Bias Technologies 51515151 API’s To Register Concurrent Program: FND_PROGRAM.EXECUTABLE: To Create executable and set the appropriate execution method Syntax: FND_PROGRAM.EXECUTABLE(EXECUTABLE, APPLICATION, DESCRIPTION, EXECUTION_METHOD, EXECUTION_FILE_NAME); FND_PROGRAM.REGISTER: To create concurrent program Syntax: FND_PROGRAM.REGISTER(PROGRAM, APPLICATION, ENABLED, SHORT_NAME, DESCRIPTION,….); FND_PROGRAM.PARAMETERS: To set the parameter and to pass appropriate tokens through the concurrent program Syntax: FND_PROGRAM.PARAMETER(PARAMETERNAME, VAlUESET, TOKEN, PROMPT, SIZE); FND_PROGRAM.REQUEST_GROUP: To set the parameter and to pass appropriate tokens through the concurrent program Syntax: FND_PROGRAM.REQUEST_GROUP(REQUEST_GROUP_NAME, APPLICATION, CODE, DESCRIPTION,..); FND_GLOBAL_APPS_INITIALIZE: When ever we are working with profiles in PL/SQL and submitting through the SQL we need to use this API the syntax for this API is given below. Syntax: FND_GLOBAL_APPS_INITIALIZE(user_id, resp_id, resp_appl_id, [Security_group_id, server_id]); Note: In this FND_GLOBAL_APPS_INITIALIZE the parameters user_id… and others we have to get them manually from apps the process we discussed above see. The navigation is Menu Help Diagnostics Examine. EX: Declare i number; begin FND_GLOBAL_APPS_INITIALIZE(1007899,20420,1); i:=FND_PROFILE.VALUE(‘ORG_ID’); dbms_output.put_line(‘Operation ID: ‘|| i); end; O/p: Operation ID: 204 FND_CLIENT_INFO.SET_ORG_CONTEXT: This is the API used to set the ORG_ID value from the backend, so that system will retrieve the data from the database which is related to mention the organization. Syntax: Begin FND_CLIENT_INFO.SET_ORG_CONTEXT(ORG_ID); end; EX: Begin FND_CLIENT_INFO.SET_ORG_CONTEXT(204); end;
  • 58. Oracle Application 11.5.9 Bias Technologies 52525252 FND_REQUEST.SUBMIT_REQUEST: When ever we want to submit the request to the apps through the SQL we use this API. The syntax and a simple example were given below. Syntax: FND_REQUEST.SUBMIT_REQUEST( Application, we have to pass the short name of the application concurrent Program in which we registered (Ex: Oracle Receivables = AR). Program, Pass the short name of the concurrent program Description, description of the concurrent program Start-time, start time of the concurrent program Sub-request, if there any other request, pass true other wise false. Arg-1, - - These arg1 to arg100 are used to pass the parameters to the concurrent program. Arg100); Totally FND_REQUEST.SUBMIT_REQUEST API is having the 105 parameters. EX: Declare id number; begin FND_GLOBAL_APPS_INITIALIZE(1007899,20420,1); Id:=FND_REQUEST.SUBMIT_REQUEST(‘AR’,CSPROC,NULL, NULL, FALSE, 20, RESEARCH); dbms_output.put_line(‘Request ID:’ || id); commit; end; O/P: Request ID: 2725363 FND_FILE.PUT_LINE: This API is used to send messages to output file or log file while we are working with PL/SQL Stored procedures For sending messages to output file we use this syntax Syntax: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,’OUTPUT MESSAGE’); For sending messages to log file we use this syntax Syntax: FND_FILE.PUT_LINE(FND_FILE.LOG,’LOG MESSAGE’); Difference between ORG_ID & ORGANIZATION_ID: ORG_ID will come under operating unit in Multiorg. ORGANIZATION_ID will come under inventory organization. ORG_ID is used to distinguish the data of different business organizations. ORGANIZATION_ID is used to identify the items belongs to which inventory organization it has assigned.
  • 59. Oracle Application 11.5.9 Bias Technologies 53535353 MULTI ORGANIZATION (MULTIORG): Multiorg is nothing but under single oracle application implementation maintaining multiple organizations and multiple set of books. We will have Multiorg tables (table which is ending with _ALL). When ever we enter the data, which will be stored in the Multiorg tables only. Ex: OE_ORDER_HEADERS_ALL OE_ORDER_LINES_ALL OE_ORDER_HOLDS_ALL PO_HEADER_ALL PO_LINES_ALL Multiorg Structure: Business Groups: The business groups represent the highest level in the organization structure like major divisions etc. business group secures human resources information for example when we request a list of employees we can see the employees assign to the business groups. Set of books: It is a financial reporting entity uses a particular chart of accounts functional currency and accounting calendar. Oracle GL secures transaction information like general entries balances by set of books. When we assign to the oracle GL responsibilities there will be a set of books assignment. We can see the information for that set of book only. The navigation in that responsibility is Setup Financials Books Define.
  • 60. Oracle Application 11.5.9 Bias Technologies 54545454 Legal Entities: It is a legal company for which we prepare physical or tax reports. We will assign tax identifiers and other legal information. Operating Units: It is one of the organizations where exactly company is being sales, purchasing payments and receiving and so on. It may be sales office or a division or a department. At operating unit level PO, AP, AR, OM modules will be implemented. Inventory Organization: It is an organization where we are going to maintain manufacturing information and items information. It captures inventory transactions, balances. Oracle inventory, WIP, BOM will be implemented at inventory organization level. Sub Inventory: Sub inventory is nothing but stocks or goudons or warehouses, which will be define under inventory organization. Locators: Stock Locators is nothing but the specific location inside the sub inventory where we will place the item. Note: • When ever we write a statement like SELECT * FROM OE_ORDER_HEADERS then it shows “NO ROWS RETURN” as an output. • When ever we are working with the Multiorg views if we want to get the data from those views we have to set the ORG_ID of which Operating unit it is belongs by using the API (FND_CLIENT_INFO.SET_ORG_CONTEXT(ORG_ID)). Then we get the required information from the view. • We found the list of ORG_ID’s in the HR_OPERATING_UNITS. • To find the system is in Multiorg or not the query is EX: SELECT MULTI_ORG_FLAG FROM FND_PRODUCT_GROUPS; O/p: Y If it is a Multiorg system otherwise it is N.
  • 61. Oracle Application 11.5.9 Bias Technologies 55555555 Flex Fields: A flex field is a flexible data field that your organization can customize to your business needs without programming. Oracle Applications uses two types of flexfields, those are given below. 1. Key flexfields(KFF) and 2. Descriptive flexfields(DFF). Key Flexfields: Key Flexfeilds are used to store the key information of data in segments. We can call these segments as intelligent keys. For KFF we define flexfeild qualifiers and segment qualifiers. The data of this key flexfeilds will store in segment cols in a table. EX: 1. Accounting Flexfeild (GL) 2. System Item(INV) 3. Item Catalog(INV) 4. Item Category(INV) 5. - - Descriptive Flexfields: The descriptive flexfeilds are used to add the additional information to the existing data. These DFF values will store in attributes column in table. There is no need to define Flexfeild qualifiers and Segment qualifiers in DFF. • The table FND_FLEX_VALUES will help us to retrieve the flexfields data in our programs. Existing DFF Customization: Go with the Application developer responsibility and in that go through the navigation Flexfeilds Descriptive Registers. Query the records as per the table name and retrieve. Copy the Title and go to the Segments form the navigation is Flexfeilds Descriptive Segments. Query the records as per the title. Uncheck the Check box Freeze Flexfeild Definition. Now go with the Segments button and attach new column and we can attach valueset. Click the open button and make that as field as required (or) optional by checking / unchecking Required box. Even we can select default value type. We can also change the size and save it. Now check the Freeze Field Definition. Click compile button. Save it and close. Note: When ever we click compile button system will submit Flexfield View Generator concurrent program internally to create descriptive flexfeild view.
  • 62. Oracle Application 11.5.9 Bias Technologies 56565656 INTERFACES: It is nothing but a program; it will be used to transfer the data from flat file to data base table or from data base table to flat file. Two types of interfaces given below. 1. Outbound Interface 2. Inbound Interface Outbound Interface: it will be used to transfer the data from oracle apps base table to legacy system flat file. We will develop a concurrent program, which is pl/sql procedure. Inside of that we will use UTL_FILE package to generate the flat file. UTL_FILE: it is one of the pl/sql package, which will be used to transfer the data from oracle data base table to flat files or from flat files to oracle data base tables. But we will use sql loader to transfer data from flat file to data base tables . By using following 3 functions we will generate flat file 1. Declare the file pointer to find out file location. UTL_FILE.FILE_TYPE; 2. To open or create file. UTL_FILE.FOPEN(‘PATH’,’FILENAME’,’W’); 3. To transfer data into file UTL_FILE.PUT_LINE(FILE POINTER, COLUMN NAME); 4. To close file UTL_FILE.FCLOSE(FILE POINTER); STEPS: 1. Develop the pl/sql program. 2. Define the cursor to get the data from the data base tables. 3. Open the cursor and open the file by using UTL_FILE package. 4. Transfer the data from cursor variable into flat files by using UTL_FILE. 5. Close the file by using UTL_FILE package. 6. Register the program as concurrent program. 7. This program is scheduled at SRS window. Ex: Create or replace procedure inventoryout (errbuf out varchar2, Retcode out varchar2) as Cursor cur_inv is select inventory_item_id,organization_id,segment1, description from mtl_system_items_b; Outpointer utl_file.file_type; Begin Outpointer:=utl_file.fopen('c:temp','inventoryflat.txt','w'); -- To get the path: -- Select value from V$parameter where name like ‘utl_file_dir’; For c in cur_inv
  • 63. Oracle Application 11.5.9 Bias Technologies 57575757 loop Utl_file.put_line(outpointer,c.inventory_item_id||'-'||c.organization_id||'-'|| c.segment1 ||'-'||c.description); end loop; utl_file.fclose(Outpointer); exception when others then fnd_file.put_line(fnd_file.log,'error while generating flat file'); end inventoryout; UTL_FILE EXCEPTIONS: 1. UTL_FILE.INVALID_OPERATION 2. UTL_FILE.INVALID_PATH 3. UTL_FILE.INVALID_MODE 4. UTL_FILE.INVALID_FILEHANDLE 5. UTL_FILE.READ_ERROR 6. UTL_FILE.INTERNAL_ERROR INIT.ORA: This file contains the accessible directories list. Inbound Interface or Conversion: it will be used to upload the data from legacy system flat file to oracle apps base table. For this we will use SQL LOADER program and pl/sql program. Ex: -- To load data from flat file to Tables using SQLLDR -- Writing the Control File CS_CTL.CTL LOAD DATA INFILE ‘C:CHAITU_CS.CSV’ BADFILE ‘CS_BAD.DAT’ -- Naming the BAD FILE DISFILE ‘CS_DISC.DAT’ -- Naming the DISCARD FILE INSERT INTO TABLE CS_0016 FIELDS TERMINATED BY ‘,’ TRAILING NULCOLS ( COL1, COL2, COL3 ) -- SQLLDR SYNTAX CMD> SQLLDR APPS/APPS@PROD CONTROL = CS_CTL
  • 64. Oracle Application 11.5.9 Bias Technologies 58585858 SQL Loader: This is a CUI (Character User Interface) Tool, which is used to load data from flat files to tables. We have to feed control file to the SQL Loader this control file contains information about the flat file and into which table needs to be loaded. Syntax: LOAD DATA INFILE <FILENAME> [INSERT / REPLACE / TRUNCATE / APPEND] INTO TABLE <TABLENAME> FIELDS TERMINATED BY ‘ , ’ OPTIONALLY ENCLOSED ‘ “ ‘ TRIALING NULLCOLLS WHERE ---[CONDITION] Filler Clause: The filler clause is used to skip one column data in the flat file. Ex: -- Example using all functions in the control file -- Create a Table ABC with 4 cols Create table ABC(Col1 number, Col2 varchar2(10) Col3 number, Col4 varchar2(10), Col5 varchar2(10), Col6 date); -- Table Created -- Create the Control File with the name mycontrol.ctl LOAD DATA INFILE ‘C:NEW.CSV’ INSERT INTO TABLE ABC (COL1, Sequencename.nextval, getting the sequence number COL2, “upper(:col2)” COL3, constant ‘ABC’ it fills the each row with the constant value COL4, NULLIF COL4= ‘EX’ if there is no value then it is filled with the COL5, FILLER, to skip the column COL6, “to-date(:col4, ‘dd-mm-yyyy’)); to print the date. After completion of the control file save it as .ctl extension and to execute the control file go to the command prompt in UNIX or WINDOWS use the following syntax.
  • 65. Oracle Application 11.5.9 Bias Technologies 59595959 Syntax: Prompt> SQLLDR USERNAME/PASSWORD@HOSTNAME CONTROL = CONTROL FILE NAME [DIRECT = TRUE / FALSE [DEFAULT] SKIP = NUMBER ROWS = NUMBER ERRORS = NUMBER] Ex: -- Executing the control file mycontrol.ctl --Prompt> SQLLDR USERNAME/PASSWORD@HOSTNAME CONTROL = mycontrol.ctl In the execution there are more options, which are stated below. And those options we give after the CONTROL in the SQLLDR are optional according to our requirement we will use them. Conventional Path: It is the default path which will create insert statements and it will insert data into table method is very slow. Here the auto commit will be carried for every 64 records. Direct Path: This will be used when ever the volume of data is high. It will make the entire data into set of blocks and it will create one insert statement for each block and insert data into tables. This method is very fast also parallel loading will be working while working with direct path. By default it will be false. Skip: Used to skip the rows from flat file while loading the data into tables. Rows: In conventional path the commit will happen for every 64 records by default if we want to make it to 1000 EX: ROWS = 1000 Errors: This indicates that how many no of errors can be tolerated while loading data into tables. The default value is 50. As a part of the execution the SQLLDR creates three files according to the output type those are given below. 1. Bad File: Which will be created whenever there are records, which are rejected while inserting into the table from the flat file? 2. Discard File: It will be created whenever there are records which are not satisfying the filtering criteria specified in the where clause of the control file. 3. Log File: This file contains the complete information of data it will be created at all times when ever we fire SQLLDR.