Query to find the Responsibilities to which the Concurrent Program is attached

SELECT DISTINCT
FCPL.USER_CONCURRENT_PROGRAM_NAME
, FCP.CONCURRENT_PROGRAM_NAME
, FAPP.APPLICATION_NAME
, FRG.REQUEST_GROUP_NAME
, FNRTL.RESPONSIBILITY_NAME
FROM
APPS.FND_REQUEST_GROUPS FRG
, APPS.FND_APPLICATION_TL FAPP
, APPS.FND_REQUEST_GROUP_UNITS FRGU
, APPS.FND_CONCURRENT_PROGRAMS FCP
, APPS.FND_CONCURRENT_PROGRAMS_TL FCPL
, APPS.FND_RESPONSIBILITY FNR
, APPS.FND_RESPONSIBILITY_TL FNRTL
WHERE
FRG.APPLICATION_ID =FAPP.APPLICATION_ID
AND FRG.APPLICATION_ID = FRGU.APPLICATION_ID
AND FRG.REQUEST_GROUP_ID = FRGU.REQUEST_GROUP_ID
AND FRG.REQUEST_GROUP_ID = FNR.REQUEST_GROUP_ID
AND FRG.APPLICATION_ID = FNR.APPLICATION_ID
AND FNR.RESPONSIBILITY_ID = FNRTL.RESPONSIBILITY_ID
AND FRGU.REQUEST_UNIT_ID = FCP.CONCURRENT_PROGRAM_ID
AND FRGU.UNIT_APPLICATION_ID = FCP.APPLICATION_ID
AND FCP.CONCURRENT_PROGRAM_ID = FCPL.CONCURRENT_PROGRAM_ID
AND FCPL.USER_CONCURRENT_PROGRAM_NAME LIKE 'XXXX%'
AND FNRTL.LANGUAGE = 'US'
AND FAPP.LANGUAGE = 'US'

Retrieve IP Address and Host Name using PL/SQL

Using the UTL_INADDR package, a PL/SQL subprogram can determine the host name of the local system or the IP address of a given host name.

E.g. Retrieve the local host name and IP address.

BEGIN
    DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_NAME);  -- get local host name

    DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_ADDRESS);  -- get local IP addr
    DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_ADDRESS('www.oracle.com')); 
    DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_NAME('141.146.9.91'));
END
;

Oracle Order to Cash Queries

 

Query to Join OM and requisition Interface table for Back 2 back Order

select l.line_id, l.flow_status_code , l.open_flag,pr.interface_source_code,pr.interface_source_line_id,pr.note_to_buyer,
pr.note_to_receiver
from
oe_order_lines_all l,
po_requisitions_interface_all pr
where l.line_id = pr.interface_source_line_id
and pr.interface_source_code='CTO'

Query to Join OM and Purchase Order tables for Back 2 Back Order
select ph.segment1,a. supply_source_line_id, a.supply_source_header_id
from
mtl_reservations a,
oe_order_lines_all l,
po_headers_all ph
where demand_source_line_id = &Enter_Order_lineID
and l.line_id = a.demand_source_line_id
and a.supply_source_header_id = ph.po_header_id

Query to Join OM and PO Requisition table for Back 2 Back Order
select ph.segment1,a. supply_source_line_id, a.supply_source_header_id
from
mtl_reservations a,
oe_order_lines_all l,
po_requisition_headers_all pqh
where demand_source_line_id = &Enter_Order_lineID
and l.line_id = a.demand_source_line_id
and a.supply_source_header_id = pqh.requisition_header_id

Query to Join OM , WSH and AR table
SELECT h.order_number,l.line_id,l.ordered_quantity,l.shipped_quantity,l.invoiced_quantity,
wdd.delivery_detail_id,wnd.delivery_id,wdd.shipped_quantity,a.org_id,
a.creation_date ,a.trx_number,b.quantity_ordered , b.quantity_invoiced ,b.interface_line_attribute1,b.interface_line_attribute3,
b.interface_line_attribute6,interface_line_attribute12
from
ra_customer_trx_all a,
ra_customer_trx_lines_all b,
oe_order_headers_all h,
oe_order_lines_all l,
wsh_delivery_details wdd,
wsh_delivery_assignments wda,
wsh_new_deliveries wnd
where a.customer_trx_id = b.customer_trx_id
and a.interface_header_context = 'ORDER ENTRY'
and b.interface_line_attribute1 = to_char(h.order_number)
and h.header_id = l.header_id
and to_char(l.line_id) = b.interface_line_attribute6
and l.line_id = wdd.source_line_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id
and to_char(wnd.delivery_id) = b.interface_line_attribute3

Mapping Between AR and OM (Transaction Flex field)
(RAL) - RA_CUSTOMER_TRX_LINES_ALL

RAL.INTERFACE_LINE_ATTRIBUTE1 Order_Num
RAL.INTERFACE_LINE_ATTRIBUTE2 Order_Type
RAL.INTERFACE_LINE_ATTRIBUTE3 Delivery ID
RAL.INTERFACE_LINE_ATTRIBUTE4 WayBill
RAL.INTERFACE_LINE_ATTRIBUTE6 Line_ID
RAL.INTERFACE_LINE_ATTRIBUTE8 Bill_Lading
RAL.INTERFACE_LINE_ATTRIBUTE10 WH_ID RAL.INTERFACE_LINE_ATTRIBUTE11 PA_ID

Releasing Order Holds

This is an example of removing order holds using OM API
CREATE OR REPLACE PROCEDURE skm_releaseHolds
( p_user_name          VARCHAR2
, p_order_num_low      NUMBER
, p_order_num_high     NUMBER
) IS
  l_order_tbl            OE_HOLDS_PVT.order_tbl_type;
  l_return_status        VARCHAR2(5);
  l_msg_count            NUMBER;
  l_msg_data             VARCHAR2(2000);
  i                      NUMBER;
  l_hold_source_rec      OE_HOLDS_PVT.hold_source_rec_type;
  l_hold_release_rec     OE_HOLDS_PVT.Hold_Release_Rec_Type;

  CURSOR c_orders_held IS
   select /*+ index(hld OE_ORDER_HOLDS_ALL_N1) index(hsrc OE_HOLD_SOURCES_U1)*/
          hdr.header_id
        , hsrc.hold_source_id
        , hsrc.hold_id
     from oe_order_headers_all hdr
        , oe_order_holds_all   hld
        , oe_hold_sources_all  hsrc
        , oe_hold_definitions  hdef
    where hdr.order_number between p_order_num_low and p_order_num_high
      and hdr.header_id      = hld.header_id
      and hld.hold_source_id = hsrc.hold_source_id
      and hsrc.hold_id       = hdef.hold_id
    ;
PROCEDURE get_user_id ( p_user_name VARCHAR2
                      , p_user_id   IN OUT NUMBER
                      , p_err_msg   IN OUT VARCHAR2
                      ) IS
BEGIN
  p_err_msg := null;
  SELECT user_id
    INTO p_user_id
    FROM fnd_user
   WHERE user_name = p_user_name;
  --
  --
  EXCEPTION
    WHEN OTHERS THEN
      p_user_id := -1;
      p_err_msg := 'procedure Get_user_Id error:'||sqlerrm;
END;
PROCEDURE get_resp_id ( p_resp_key            VARCHAR2
                      , p_resp_id      IN OUT NUMBER
                      , p_resp_appl_id IN OUT NUMBER
                      , p_err_msg      IN OUT VARCHAR2
                      ) IS
BEGIN
  SELECT responsibility_id
       , application_id
    INTO p_resp_id
       , p_resp_appl_id
    FROM fnd_responsibility
   WHERE responsibility_key = p_resp_key;
  --
  --
  EXCEPTION
    WHEN OTHERS THEN
      p_resp_id      := -1;
      p_resp_appl_id := -1;
      p_err_msg      := 'procedure Get_resp_Id error:'||sqlerrm;
END;
PROCEDURE init
( p_user_name VARCHAR2
, p_resp_key  VARCHAR2
, px_err_msg  IN OUT VARCHAR2
) Is
  l_user_id NUMBER;
  l_resp_id NUMBER;
  l_appl_id NUMBER;
BEGIN
  px_err_msg := null;
  get_user_id(p_user_name, l_user_id, px_err_msg);
  IF px_err_msg IS NOT NULL
  THEN
    RETURN;
  END IF;
  --
  get_resp_id(p_resp_key, l_resp_id, l_appl_id, px_err_msg);
  IF px_err_msg IS NOT NULL
  THEN
    RETURN;
  END IF;
  --
  --
  FND_GLOBAL.apps_initialize(l_user_id, l_resp_id, l_appl_id);
  dbms_output.put_line(l_user_id || ','|| l_resp_id || ',' || l_appl_id);
END;
begin
  l_return_status  := 'S';
  OE_MSG_PUB.initialize;
  init(p_user_name, 'ORDER_MGMT_SUPER_USER', l_msg_data);
  --
  --
  IF l_msg_data IS NOT NULL
  THEN
    dbms_output.put_line('init call failed with the following message');
    dbms_output.put_line(l_msg_data);
    return;
  END IF;
  --
  -- Loop through each order and release hold
  --
  FOR l_orders_held in c_orders_held
  LOOP
     l_order_tbl(1).header_id := l_orders_held.header_id;
     oe_holds_pub.Release_Holds
     ( p_api_version          => 1.0
     , p_order_tbl            =>  l_order_tbl
     , p_hold_id              => l_orders_held.hold_id
     , p_release_reason_code  => 'EXPIRE'
     , p_release_comment      => 'Updated Through release hold API Call'
     , x_return_status        =>  l_return_status
     , x_msg_count            =>  l_msg_count
     , x_msg_data             =>  l_msg_data
     );
  END LOOP;
  dbms_output.put_line('Return Status = ' || l_return_status);
  dbms_output.put_line('Message Count = ' || l_msg_count);
  dbms_output.put_line('Message Data = :' || l_msg_data || ':');
  --
  -- Look for Any error messages
  --
  FOR j in 1..OE_MSG_PUB.count_msg
  LOOP
     OE_MSG_PUB.get
     ( p_msg_index     => j
     , p_encoded       => 'F'
     , p_data          => l_msg_data
     , p_msg_index_out => i
     );
     dbms_output.put_line('Error: ' || j || ':' || l_msg_data);
  END LOOP;
end skm_releaseHolds ;
 
===================================================================================
 
Below script will help you to Release Order level or Line Level hold in Oracle Order Management through API OE_HOLDS_PUB.RELEASE_HOLDS
This script was tested in R12.1.1 
SET serveroutput ON;
DECLARE
v_return_status    VARCHAR2(30);
v_msg_data         VARCHAR2(4000);
v_msg_count        NUMBER;
v_order_tbl        OE_HOLDS_PVT.order_tbl_type;
v_hold_id          NUMBER DEFAULT 50;
v_header_id        NUMBER DEFAULT 1705;

v_context          VARCHAR2 (2);

FUNCTION set_context( i_user_name    IN  VARCHAR2
                     ,i_resp_name    IN  VARCHAR2
                     ,i_org_id       IN  NUMBER)
RETURN VARCHAR2
IS
BEGIN
  NULL;
    -- In order to reduce the content of the post I moved the implementation part of this function to another post and it is   available here  
END set_context;
 
BEGIN

-- Setting the context ----

v_context := set_context ('&user', '&responsibility', 2038);
IF v_context = 'F'
   THEN
   DBMS_OUTPUT.put_line ('Error while setting the context');
END IF;

--- context done ------------

BEGIN

v_order_tbl(1).header_id           := v_header_id;
v_return_status                    := NULL;
v_msg_data                         := NULL;
v_msg_count                        := NULL;

dbms_output.put_line('Calling the API to Release hold' );

OE_HOLDS_PUB.RELEASE_HOLDS (
                         p_api_version         => 1.0,
                         p_order_tbl           => v_order_tbl,
                         p_hold_id             => v_hold_id,
                         p_release_reason_code => 'AR_AUTOMATIC',
                         p_release_comment     => 'TESTING',
                         x_return_status       => v_return_status,
                         x_msg_count           => v_msg_count,
                         x_msg_data            => v_msg_data
                           );


IF v_return_status = FND_API.G_RET_STS_SUCCESS THEN
dbms_output.put_line('success:');
COMMIT;
ELSIF v_return_status IS NULL THEN
dbms_output.put_line('Status is null');
ELSE
dbms_output.put_line('Failed: '|| v_msg_data );


FOR i IN 1 .. oe_msg_pub.count_msg
     LOOP
        v_msg_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');
        dbms_output.put_line( i|| ') '|| v_msg_data);
     END LOOP;
    
ROLLBACK;
END IF;

EXCEPTION
WHEN OTHERS THEN
 dbms_output.put_line('Error is '||SQLCODE||'---'||SQLERRM);
END; 
 

Oracle Apps Stuff in Net

http://wordpress.com/tag/oracle-order-management/
http://georgenet.net/oracle/
http://oracleebusinesssuite.wordpress.com/
http://www.sap-img.com/oracle-database/oracle-application-hints-and-tips.htm
http://garethroberts.blogspot.com/2007/09/standard-report-to-csv-file-via-bi.html
http://oracle-hrms-11i.blogspot.com/
http://www.w3schools.com
http://www.ebusinesslab.cn
http://www.trutek.com/index.php?id=53
http://feeds.feedburner.com/OracleAppsFAQ
http://onlineappsdba.com/index.php/category/identity_manager/
http://www.richardbyrom.com/download.htm
http://www.appsworkshop.com
http://onlineappsdba.blogspot.com/
http://www.admin.ox.ac.uk/financials/helpsheets/
http://oracleqa2.blogspot.com
http://peopleapps.com/
http://aspen.ithaca.edu:7778/portal/page_pageid=133,77462&_dad=portal&_schema=PORTAL
http://www.frp.qut.edu.au/frptoolkit/frptraining/finance/purchasing/enter_req.jsp
http://www.orafaq.com/forum/i/0/
http://www.chain-sys.com/demo_ground.shtml
http://www.ebusinesslab.cn
http://www.sqlmanager.net/en/news/sql/1133
http://blogs.oracle.com/xmlpublisher/2007/08/07
http://advait.wordpress.com/oracle-apps-11i-profiles/
http://www.infocaptor.com/articles/sql.html
http://oracle-applications-rama.blogspot.com/2007_10_01_archive.html
http://www.more4apps.com/?gclid=CKXglPqfhI8CFQh6gwod9zR91w
http://www.appssys.com/
http://oraclecrp.com/
http://www.oracleappsblog.com/index.php/forum
http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/ap/invoic13.htm
http://main.uab.edu/show.asp?durki=73096
http://main.uab.edu/show.asp?durki=66289
http://www.learndiscoverer.com/downloads/downloads.htm
https://internet-apps.com/iapps/ic/InvReports.html
https://app.smartturn.com/occam/help/help_en/inv_reports.html
http://www.oracleappshub.com/category/oracle-purchasing/
http://oracle-applications-rama.blogspot.com/
http://www.appsdba.com/
http://www.eas.gwu.edu/home/support/documentation/documentation.cfm
http://www.fin.gov.nl.ca/ComptrollerGeneral/oraclemanuals/purchasing
http://www.fin.gov.nl.ca/ComptrollerGeneral/oraclemanuals/accountspayable/default.htm
http://oraclea2z.blogspot.com
http://www.oraclefans.com/oraclefans/forum/erpfinan/
http://www.erpfans.com/
http://www.teachmeoracle.com/forum/
http://www.esnips.com/_t_/oracle+apps
http://docs.huihoo.com/oracle/docs/B25516_06/current/html/doclist.html
http://www.umec.com.tw/r11i/html/trmdoc.html
http://www.orafaq.com/forum/t/49413/0/
http://erpstuff.com/forum.asp?FORUM_ID=3
http://www.ysn.ru/docs/oracle/workflow.920/
http://www.praetoriate.com/shad_fin9.htm
http://www.praetoriate.com/oracle_tips.htm
http://www.tacticspartners.com
http://www.geocities.com/oracletricks/oraapps/
http://oracle-financials-11i.blogspot.com/
http://www.visualbuilder.com/showCode.php?id=81369&scd_id=2849
http://www.java2s.com/Code/Oracle/PL-SQL/CatalogPL-SQL.htm
http://www.idevelopment.info/data/Programming/plsql/PROGRAMMING_PLSQL_Home.cgi
http://oracleapplications-11i.blogspot.com
http://oracle-hrms-11i.blogspot.com
http://learn-oracle-apps.blogspot.com
http://oracle-aol-11i.blogspot.com
http://oraclehrmsapps.blogspot.com
http://computerebook.blogspot.com/
http://www.oracle.ask2ask.com
http://www.appsdbablog.com
http://blogs.oracle.com/schan/
http://www.filibeto.org/sun/lib/nonsun/oracle/10.2.0.1.0/B19306_01/workflow.102/b15853/T361836T361982.htm
http://www.workflowfaq.com/
http://www.miraclewisdom.com/oracle_applications.htm
http://oracleappstechnology.blogspot.com/2007/07/why-is-it-called-apps-and-not-oracle.html
http://appstechnical.blogspot.com/
http://garethroberts.blogspot.com/2007/08/audit-trail-must-do-bank-accounts.html
http://getappstraining.blogspot.com/2006/10/what-happens-when-you-login-to-apps.html
http://www.coaug.org/presentations.html
http://www.appworx.com/solutions/oracle.cfm
http://www.infocaptor.com/articles/2006/01/view-discoverer-reports-through-oracle.html
http://web.mit.edu/sapr3/windocs/bporb06a.htm
http://www.ctipc.com/Novaware/IC.htm
http://www.virginia.edu/integratedsystem/howdoi/HTML/NAV5537U.htm
http://www.bscaler.com/erm/next_generation_erp.htm
http://www.cougarmtn.com/accounting-software-reports/accounts-payable.asp
http://www.dbtips.com/
http://www.sucharitha.com/
http://www.fors.com/velpuri2/Applications/8.htm
http://bfa.sdsu.edu/~leap/appsupgrade.htm
http://bfa.sdsu.edu/~leap/documentation.htm
http://www.purchasing.upenn.edu/buyinfo/guide/
http://www.acsspr.com/po.html
http://www.frameware2000.com/reports.htm
http://www.virginia.edu/integratedsystem/howdoi/HTML/NAV5515U.htm#ZZZ_TUT_1
http://www.mainstreetasp.com/purchase.htm
http://scripts4oracle.blogspot.com/
http://orafact.com/index_files/Page1023.htm
http://www.erpstuff.com/topic.asp?TOPIC_ID=2353
http://www.eplanetlabs.com/oracle-1Z0-141-Certification.html
http://onlineappsdba.blogspot.com/

HZ Architecture

Entire - Oracle

http://www.esnips.com/doc/d327c757-49b3-47f7-bf7d-36d6a854c497/Entire-Oracle

Procure To Pay base tables

Requisition
po_requisition_headers_all
po_requisition_lines_all ( segment1 ========== requisition number)
po_req_distributions_all
Note: requisition_header_id is the link between po_requisition_headers_all and po_requisition_lines_all
requisition_line_id is the link between po_requisition_lines_all and po_req_distributions_all

Purchase order
po_headers_all
po_lines_all
po_distributions_all
po_line_locations_all
Note: po_header_id is the link between all these tables

Receipt
rcv_shipment_headers
rcv_shipment_lines
rcv_transactions
quality result stored in qa_results table
Note: shipment_header_id is the link between rcv_shipment_headers and rcv_shipment_lines
po_header_id is the link between rcv_shipment_headers and rcv_transaction

Invoices
ap_invoices_all
ap_invoice_distributions_all
Note: invoice_id is the link between ap_invoices_all and ap_invoice_distributions_all

Payments
ap_checks_all
ap_invoice_payments_all
ap_payment_schedules_all

Payment Reconcillation
ap_banks
ap_bank_branches

GL Transfer
gl_periods
gl_period_status
gl_set_of_books
glfv_charts_of_accounts

Useful Oracle Queries

1) Display the name of employees along with their annual salary (sal*12) the name of the employee earning highest annual salary should appear first?
Select ename, sal, sal*12 "Annual Salary" from EMP order by "Annual Salary" desc;

2) Display name, salary, Hra, pf, da, TotalSalary for each employee. The out put should be in the order of total salary, hra 15% of salary, DA 10% of salary .pf 5% salary Total Salary will be (salary+hra+da)-pf?
Select ename, sal SA, sal*0.15 HRA, sal*0.10 DA, sal*5/100 PF, sal+ (sal*0.15) + (sal*0.10) -(sal*.05) TOTALSALARY from emp ORDER BY TOTALSALARY DESC;
3) Display Department numbers and total number of employees working in each Department?
Select deptno, count (*) from emp group by deptno;
4) Display the various jobs and total number of employees working in each job group?
Select job, count (*) from emp group by job;
5) Display department numbers and Total Salary for each Department?
Select deptno, sum (sal) from emp group by deptno;
6) Display department numbers and Maximum Salary from each Department?
Select deptno, max (Sal) from emp group by deptno;
7) Display various jobs and Total Salary for each job?
Select job, sum (sal) from emp group by job;
8)Display each job along with min of salary being paid in each job group?
Select job, min (sal) from emp group by job;
9) Display the department Number with more than three employees in each department?
Select deptno, count (*) from emp group by deptno having count (*)>3;
10) Display various jobs along with total salary for each of the job where total salary is greater than 40000?
Select job, sum (sal) from emp group by job having sum (Sal)>40000;
11) Display the various jobs along with total number of employees in each job. The output should contain only those jobs with more than three employees?
Select job, count (*) from emp group by job having count (*)>3;
12) Display the name of employees who earn Highest Salary?
select ename, sal from emp where sal>=(select max(sal) from emp );
13) Display the employee Number and name for employee working as clerk and earning highest salary among the clerks?
select ename,empno from emp where sal=(select max(sal) from emp where job='CLERK') and job='CLERK' ;
14) Display the names of salesman who earns a salary more than the Highest Salary of the Clerk?
select ename,sal from emp where sal>(select max(sal) from emp where job='CLERK') AND job='SALESMAN';
15) Display the names of clerks who earn a salary more than the lowest Salary of any Salesman?
select ename,sal from emp where sal>(select min(sal) from emp where job='SALESMAN') and job='CLERK';
16) Display the names of employees who earn a salary more than that of jones or that of salary greater than that of scott?
select ename,sal from emp where sal>all(select sal from emp where ename='JONES' OR ename='SCOTT');
17) Display the names of employees who earn Highest salary in their respective departments?
select ename,sal,deptno from emp where sal in (select max(sal) from emp group by deptno);
18) Display the names of employees who earn Highest salaries in their respective job Groups?
select ename,job from emp where sal in (select max(sal) from emp group by job);
19)Display employee names who are working in Accounting department?
select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname = 'ACCOUNTING';
20) Display the employee names who are Working in Chicago?
select e.ename,d.loc from emp e,dept d where e.deptno=d.deptno and d.loc='CHICAGO';
21) Display the job groups having Total Salary greater than the maximum salary for Managers?
select job ,sum(sal) from emp group by job having sum(sal) >(select max(sal) from emp where job='MANAGER');
22) Display the names of employees from department number 10 with salary greater than that of ANY employee working in other departments?
select ename,deptno from emp where sal>any(select min(sal) from emp where deptno!=10 group by deptno) and deptno=10 ;
23) Display the names of employees from department number 10 with salary greater than that of ALL employee working in other departments?
select ename,deptno from emp where sal>all(select max(sal) from emp where deptno!=10 group by deptno) and deptno=10 ;
24) Display the names of Employees in Upper Case?
select upper(ename) from emp;
25) Display the names of employees in Lower Case?
select Lower(ename) from emp;
26) Display the names of employees in Proper case?
select InitCap(ename)from emp;
27) Find the length of your name using Appropriate Function?
select lentgh('RAMA') from dual;
28) Display the length of all the employee names?
select length(ename) from emp;
29) Display the name of employee Concatinate with Employee Number?
select ename' 'empno from emp;
30) Use appropriate function and extract 3 characters starting from 2 characters from the following string 'Oracle' i.e., the out put should be ac?
select substr('Oracle',3,2) from dual;
31) Find the first occurance of character a from the following string Computer Maintenance Corporation?
select lstr('Computer Maintenance Corporation','a' ) from dual;
32) Replace every occurance of alphabet A with B in the string .Alliens (Use Translate function)
select translate('Alliens','A','B') from Dual;
33) Display the information from the employee table . where ever job Manager is found it should be displayed as Boss?
select ename ,replace(job,'MANAGER','BOSS') from emp;
34) Display empno,ename,deptno from emp table. Instead of display department numbers display the related department name(Use decode function)?
select empno,ename,deptno,Decode(deptno,10,'ACCOUNTING',20, 'RESEARCH' ,30 , 'SALES','OPERATIONS')DName from emp;
35) Display your Age in Days?
select sysdate-to_date('30-jul-1977') from dual;
36) Display your Age in Months?
select months_between(sysdate,to_date('30-jul-1977')) from dual;
37) Display current date as 15th August Friday Nineteen Nienty Seven?
select To_char(sysdate,'ddth Month Day year') from dual;
39) Scott has joined the company on 13th August ninteen ninety?
select empno,ename,to_char(Hiredate,'Day ddth Month year') from emp;
40) Find the nearest Saturday after Current date?
select next_day(sysdate,'Saturday') from dual;
41) Display the current time?
select To_Char(sysdate,'HH:MI:SS') from dual;
42) Display the date three months before the Current date?
select Add_months(sysdate,-3) from dual
43) Display the common jobs from department number 10 and 20?
select job from emp where job in (select job from emp where deptno=20) and deptno=10;
44) Display the jobs found in department 10 and 20 Eliminate duplicate jobs?
select Distinct job from emp where deptno in(10,20);
45) Display the jobs which are unique to department 10?
select job from emp where deptno=10;
46) Display the details of those employees who do not have any person working under him?
select empno,ename,job from emp where empno not in (select mgr from emp where mgr is not null );
47) Display the details of those employees who are in sales department and grade is 3?
select e.ename,d.dname,grade from emp e,dept d ,salgrade where e.deptno=d.deptno and dname='SALES' and grade=3
48) Display thoes who are not managers?
select ename from emp where job!='MANAGER';
49) Display those employees whose name contains not less than 4 characters?
Select ename from emp where length (ename)>=4
50) Display those department whose name start with"S” while location name ends with "K"?
Select e.ename, d.loc from emp e, dept d where d.loc like ('%K') and enamelike ('S%')
51) Display those employees whose manager name is Jones?
Select e.ename Superior, e1.ename Subordinate from emp e, e1 where e.empno = e1.mgr and e.ename='JONES'
52) Display those employees whose salary is more than 3000 after giving 20% increment?
Select ename, sal, (sal+(sal*0.20)) from emp where (sal+(sal*0.20))>3000;
53) Display all employees with their department names?
Select e.ename, d.dname from emp e, dept d where e.deptno=d.deptno
54) Display ename who are working in sales department?
Select e.ename, d.dname from emp e, dept d where e.deptno=d.deptno and d.dname='SALES'
55) Display employee name, dept name, salary, and commission for those sal in between 2000 to 5000 while location is Chicago?
Select e.ename, d.dname, e.sal, e.comm from emp e, dept d where e.deptno=d.deptno and sal between 2000 and 5000
56) Display those employees whose salary is greater than his manager’s salary?
Select e.ename, e.sal, e1.ename, e1.sal from emp e, e1 where e.mgr=e1.empno and e.sal>e1.sal
57) Display those employees who are working in the same dept where his manager is work?
Select e.ename, e.deptno, e1.ename, e1.deptno from emp e, e1 where e.mgr=e1.empno and e.deptno=e1.deptno
58) Display those employees who are not working under any Manager?
Select ename from emp where mgr is null;
59) Display the grade and employees name for the deptno 10 or 30 but grade is not 4 while joined the company before 31-DEC-82?
Select ename, grade, deptno, sal from emp, salgrade where (grade, Sal) in (select grade, Sal from salgrade, emp where sal between losal and hisal) and grade! =4 and deptno in (10,30) and hiredate<'31-Dec-82'
60) Update the salary of each employee by 10% increment that are not eligible for commission?
Update emp set sal= (sal+(sal*0.10)) where comm is null
61) Delete those employees who joined the company before 31-Dec-82 while their department Location is New York or Chicago?
Select e.ename, e.hiredate, d.loc from emp e, dept d where e.deptno=d.deptno and hiredate<'31-Dec-82' and d.loc in('NEW YORK','CHICAGO')
62) Display employee name, job, deptname, and loc for all who are working as manager?
Select e.ename, e.job, d.dname, d.loc from emp e, dept d where e.deptno=d.deptno
and e.empno in (select mgr from emp where mgr is not null)
63) Display those employees whose manager name is Jones and also display their manager name?
Select e.ename sub, e1.ename from emp e, emp e1 where e.mgr=e1.empno and e1.ename='JONES'
64) Display name and salary of ford if his salary is equal to hisal of his grade?
Select ename, grade, hisal, sal from emp, salgrade where ename='FORD' and sal=hisal;
OR
Select grade, sal, hisal from emp, salgrade where ename='FORD' and sal between losal and hisal;
OR
Select ename, sal, hisal, grade from emp, salgrade where ename='FORD' and (grade, Sal) in (select grade, hisal from salgrade,emp where sal between losal and hisal);
65) Display employee name, job, deptname, his manager name, his grade and make an under department wise?
Select e.ename sub, e1.ename sup, e.job, d.dname, grade from emp e1, salgrade, dept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno group by d.deptno, e.ename, e1.ename, e.job, d.dname, grade
OR
Select e.ename sub, e1.ename sup, e.job, d.dname, grade from emp e, e1, salgrade, dept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno
66) List out all the employee names, job, salary, grade and deptname for every one in a company except ‘CLERK’. Sort on salary display the highest salary?
Select e.ename, e.job, e.sal, d.dname, grade from emp e, salgrade, dept d where (e.deptno=d.deptno and e.sal between losal and hisal) order by e.sal desc
67) Display employee name, job and his manager. Display also employees who are with out managers?
Select e.ename, e1.ename, e.job, e.sal, d.dname from emp e, emp e1, dept d where e.mgr=e1.empno (+) and e.deptno=d.deptno
68) Display Top 5 employee of a Company?

69) Display the names of those employees who are getting the highest salary?
Select ename, sal from emp where sal in (select max (sal) from emp)
70) Display those employees whose salary is equal to average of maximum and minimum?
Select * from emp where sal=(select (max (sal)+min (sal))/2 from emp)
71) Select count of employees in each department where count >3?
Select count (*) from emp group by deptno having count (*)>3
72) Display dname where atleast three are working and display only deptname?
select d.dname from dept d, emp e where e.deptno=d.deptno group by d.dname having count(*)>3
73) Display name of those managers name whose salary is more than average salary of Company?
Select distinct e1.ename, e1.sal from emp e, e1, dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal> (select avg (sal) from emp)

74) Display those managers name whose salary is more than average salary of his employees?
Select distinct e1.ename, e1.sal from emp e, e1, dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal>any (select avg (sal) from emp group by deptno)
75) Display employee name, sal, comm and net pay for those employees whose net pay is greater than or equal to any other employee salary of the company?
Select ename, sal, NVL (comm, 0), sal+NVL (comm, 0) from emp where sal+NVL (comm, 0) >any (select e.sal from emp e)
76) Display those employees whose salary is less than his manager but more than salary of other managers?
Select e.ename sub, e.sal from emp e, e1, dept d where e.deptno=d.deptno and e.mgr=e1.empno and e.salany (select e2.sal from emp e2, e, dept d1 where e.mgr=e2.empno and d1.deptno=e.deptno)
77) Display all employees’ names with total sal of company with each employee name?

78) Find the last 5(least) employees of company?

79) Find out the number of employees whose salary is greater than their managers salary?
Select e.ename, e.sal, e1.ename, e1.sal from emp e, e1, dept d where e.deptno=d.deptno and e.mgr=e1.empno and e.sal>e1.sal
80) Display the manager who are not working under president but they are working under any other manager?
Select e2.ename from emp e1, emp e2, emp e3 where e1.mgr=e2.empno and e2.mgr=e3.empno and e3.job! ='PRESIDENT';
81) Delete those department where no employee working?
Delete from emp where empno is null;
82) Delete those records from emp table whose deptno not available in dept table?
Delete from emp e where e.deptno not in (select deptno from dept)
83) Display those enames whose salary is out of grade available in salgrade table?
Select empno, sal from emp where sal<(select min (LOSAL) from salgrade) OR sal>(select max (hisal) from salgrade)
84) Display employee name, sal, comm and whose net pay is greater than any other in the company?
Select ename, sal, comm, sal+comm from emp where sal+comm>any (select sal+comm from emp)
85) Display name of those employees who are going to retire 31-Dec-99 if maximum job period is 30 years?
Select empno, hiredate, sysdate, to_char (sysdate,'yyyy') - to_char (hiredate,'yyyy') from emp where to_char (sysdate,'yyyy') - to_char (hiredate,'yyyy')=30
86) Display those employees whose salary is odd value?
Select ename, sal from emp where mod (sal, 2)! =0
87) Display those employees whose salary contains atleast 3 digits?
Select ename, sal from emp where length (sal)=3

88) Display those employees who joined in the company in the month of Dec?
Select empno, ename from emp where trim (to_char (hiredate,'Mon'))=trim ('DEC')
89) Display those employees whose name contains A?
Select ename from emp where ename like ('%A%')
90) Display those employees whose deptno is available in salary?
Select ename, sal from emp where deptno in (select distinct sal from emp);
91) Display those employees whose first 2 characters from hiredate - last 2 characters sal?
Select empno, hiredate, sal from emp where trim (substr (hiredate, 1,2))=trim (substr (sal, -2,2));
OR
Select hiredate, sal from emp where to_Char (hiredate,'dd')=trim (substr (sal, -2,2))
92) Display those employees whose 10% of salary is equal to the year joining?
Select ename, sal, 0.10*sal from emp where 0.10*sal=trim (to_char (hiredate,'yy'))
93) Display those employees who are working in sales or research?
Select e.ename from emp e, dept d where e.deptno=d.deptno and d.dname in ('SALES','RESEARCH');
94) Display the grade of Jones?
Select ename, grade from emp, salgrade where (grade, Sal) =(select grade, Sal from salgrade, emp where sal between losal and hisal and ename='JONES')
95) Display those employees who joined the company before 15th of the month?
select ename ,hiredate from emp where hiredate<'15-Jul-02' and hiredate >='01-jul-02';
96) Display those employees who has joined before 15th of the month?
select ename ,hiredate from emp where hiredate<'15-Jul-02'
97) Delete those records where no of employees in particular department is less than 3?
delete from emp where deptno in (select deptno from emp group by deptno having count(*) <3
98) Delete those employeewho joined the company 10 years back from today?
delete from emp where empno in (select empno from emp where to_char(sysdate,'yyyy')- to_char(hiredate,'yyyy')>=10)
99) Display the deptname the number of characters of which is equal to no of employee in any other department?

100) Display the deptname where no employee is working?
select deptno from emp where empno is null;
101) Display those employees who are working as manager?
select e2.ename from emp e1,e2 where e1.mgr=e2.empno and e2.empno is not null
102) Count th number of employees who are working as managers (Using set opetrator)?
select d.dname from dept d where length(d.dname) in (select count(*) from emp e where e.deptno!=d.deptno group by e.deptno)
103) Display the name of the dept those employees who joined the company on the same date?
select a.ename,b.ename from emp a,emp b where a.hiredate=b.hiredate and a.empno!=b.empno
104) Display those employees whose grade is equal to any number of sal but not equal to first number of sal?
select ename,sal,grade ,substr(sal,grade,1) from emp,salgrade where grade!= substr (sal,1,1) and grade = substr(sal,grade,1) and sal between losal and hisal
105) Count the no of employees working as manager using set operation?
Select count(empno) from emp where empno in (select a.empno from emp a intersect select b.mgr from emp b)
106) Display the name of employees who joined the company on the same date?
select a.ename,b.ename from emp a,emp b where a.hiredate=b.hiredate and a.empno!=b.empno;
107) Display the manager who is having maximum number of employees working under him?
select e2.ename,count(*) from emp e1,e2 where e1.mgr=e2.empno group by e2.ename Having count(*)=(select max(count(*)) from emp e1,e2 where e1.mgr=e2.empno group by e2.ename)
108) List out the employee name and salary increased by 15% and express as whole number of Dollars?
select ename,sal,lpad(translate(sal,sal,((sal +(sal*0.15))/50)),5,'$') from emp
147) Produce the output of the emptable "EMPLOYEE_AND JOB" for ename and job ?
Ans: select ename"EMPLOYEE_AND",job"JOB" FROM EMP;
148) List of employees with hiredate in the format of 'June 4 1988'?
Ans: select ename,to_char(hiredate,'Month dd yyyy') from emp;
149) print list of employees displaying 'Just salary' if more than 1500 if exactly 1500 display 'on taget' if less than 1500 display below 1500?
Ans: select ename,sal,
(
case when sal < 1500 then
'Below_Target'
when sal=1500 then
'On_Target'
when sal > 1500 then
'Above_Target'
else
'kkkkk'
end
)
from emp
150) Which query to calculate the length of time any employee has been with the company
Ans: select hiredate, to_char (hiredate,' HH:MI:SS') FROM emp
151) Given a string of the format 'nn/nn' . Verify that the first and last 2 characters are numbers. And that the middle character is '/' Print the expressions 'Yes' IF valid ‘NO’ of not valid. Use the following values to test your solution'12/54', 01/1a, '99/98'?
Ans:

152) Employes hire on OR Before 15th of any month are paid on the last friday of that month those hired after 15th are paid the last friday of th following month .print a list of employees .their hiredate and first pay date sort those who se salary contains first digit of their deptno?
Ans: select ename,hiredate, LAST_DAY ( next_day(hiredate,'Friday')),
(
case when to_char(hiredate,'dd') <=('15') then
LAST_DAY ( next_day(hiredate,'Friday'))
when to_char(hiredate,'dd')>('15') then
LAST_DAY( next_day(add_months(hiredate,1),'Friday'))
end
)
from emp

153) Display those managers who are getting less than his employees salary?
Ans: select a.empno, a.ename, a.sal, b.sal, b.empno, b.ename from emp a, emp b where a.mgr=b.empno and a.sal>b.sal

154) Print the details of employees who are subordinates to BLAKE?
Ans: select a.empno,a.ename ,b.ename from emp a, emp b where a.mgr=b.empno
and b.ename='BLAKE'

Oracle Manufacturing Inventory

Oracle Manufacturing Inventory
Oracle Manufacturing Inventory
Contents
MANUFACTURING CONCEPTS
Flow of any manufacturing compan
Manufacturing Strategies
Make-to-stock
Make-to-order
Assemble-to-order
Engineer-to-order
Materials Management
Activities
Modules
Relation with major modules
Inventory
Functions of inventory
Inventory Flexfields
Account Aliases
Item catalogs
Item categories
Sales order
Stock locators
System items (item flexfield
ITEM definition
Item attributes
Main attribute group
Inventory Attribute
Bill of Material attribute group
Asset management attribute group
Costing attribute group
Purchasing attribute group
Receiving attribute group
Physical attribute group
General planning attributes
Order Management attribute group
Invoicing attribute group
Item templates
Category set & category
Unit of Item setup
Item Inventory control
item catalog
Item Transaction
Sub-Inventory
Inter-organization
ABC Analysis & cycle Counting
Setup
Organization parameters
Default inventory parameters
Costing Information
Other accounts
Inter-Organization Transfer Accounts
Inventory Planning and replenishment
Performing Recorder-Point planning
Performing min-max planning
Subinventory replishment planning
Creating & executing Kanban cards
Major Tables
Additional terms in inventory
Interfaces
Open Item Interface
Customer Item and Customer Item Cross-Reference Open interface
Reports In inventory
Inactive items report
Item categories report
Item definition detail
Item definition summary report
Item template listing
Item statuses
ABC descending value report

Manufacturing concepts
As we are dealing with inventory and purchasing we will go through the basic manufacturing concepts.
Any manufacturing unit will have a basic flow of materials. That will include right from the raw material processing to finished goods.

Flow of any manufacturing company:
1) Raw material flow into manufacturing company. 2) Raw material gets processed according to requirement. 3) Finally finished goods are distributed to end consumers through
physical distribution system.
For this different companies use different manufacturing strategies, according to their business need and their requirement and they are,

Manufacturing Strategies
Make- to-stock
In this delivery time is equal to shipment time, generally you will maintain stock.
Make- to-order
In make-to-order delivery time is manufacturing + assembly time + shipment time.
Assemble- to- order
In this strategy assembly time and shipment time contributes to delivery time.
Engineer- to- order-
In this special category order processing starts from design, manufacturing, assembly and shipment.

Materials Management
Any strategy company implements, there comes material management, for following benefits
1) For planning and controlling materials flow 2) Maximize use of firm’s resources 3) Provide required level of customer service
For this material management we will control these activities

Activities
Production Planning: The company will plan production according requirement and according to that the status of inventory is checked. Implementation of planning & control: Production planning should be implemented and control through proper resources, mainly involved purchasing. Inventory management: As per planning inventory should be managed, that vary from raw material to finished goods.

Modules
Different modules which are interrelated with Inventory & Purchasing.
• MPC – Manufacturing Planning & Control • MPS – Master Production Schedule • MRP – Materials Required Planning • BOM – Bill Of Material Relation with major modules
Production Planning
Master production schedule
Engg.
BOM
MRP
Purchasing
Inventory
Production control
Production planning is done by keeping long term view, while on that basis master production schedule is created. MRP will take feedback BOM, Engg. & other modules. Purchasing will work according to MRP for which status will provide by Inventory. So now we can visualize the position of purchasing & inventory in whole manufacturing organization.
Other Manufacturing modules which are inter-related are,
• Oracle BOM ( bill of material)
• Oracle Engineering
• Oracle Product Configurator
• Oracle MRP
• WIP( Work In Process)
• Cost management
• Oracle quality Inventory
In Inventory all major functions are related with items, all functionality is provided by keeping item as center. Now we will discuss various aspects of inventory and flow of Inventory.
Inventory consists of, mainly
1. Raw material 2. Work In Process Inventory 3. Finished Goods Functions of inventory
1. Maintaining stock 2. Planning 3. Forecasting 4. Physical control of inventory 5. Receipt 6. Issues We will discuss these functions as regards with oracle applications.

Inventory Flexfields
The flexfields which are used in inventory are:
• Account aliases • Item catalogs • Item categories • Sales orders • Stock locators • System items Depending on your setup inventory can use other modules flexfields like Accounting (General Ledger) & Sales tax location & territory from Accounts Receivables

Account Aliases
Table name : MTL_GENERIC_DISPOSITIONS
An account alias is an easily recognized name or label representing a general ledger account number. You can view, report, and reserve against an account alias. During a transaction, you can use the account alias instead of an account number to refer to the account.

Item catalogs
Table name: MTL_ITEM_CATALOG_GROUPS Unique ID column: ITEM_CATALOG_GROUP_ID
If you make entries for your items in a standard industry catalog or want to group your items according to certain descriptive elements, you need to configure your Item Catalog Group Flexfield.
Even if you do not use item cataloging, you must enable at least one segment and compile this flexfields before you can define items.
These flexfields supports only one structure and dynamic inserts is not allowed.
Item categories
Table name: MTL_CATEGORIES Unique ID Column: CATEGORY_ID
You must define & configure your item categories flexfields before you can start defining items since all items must be assigned to categories. You can define multiple structures fro different category groups. So that you can associate these structures with categories & category sets.

Sales order
Table name: MTL_SALES_ORDERS Unique ID Column: SALES_ORDER_ID Through this flexfield inventory will identify sales order transactions of OM with
inventory. This sales order flexfield should be defined as order number, order type and order source so that each transaction will be unique in inventory.
Stock locators
Table name: MTL_ITEM_LOCATIONS Unique ID Column: INVENTORY_LOCATION_ID
If you keep track of specific locators such as aisle, row, bin indicators for your items, you need to configure your Stock Locators Flexfield and implement locator control in your organization.
You can use stock locators field to capture more information about stock locators in inventory. If you do not have oracle inventory installed any none of items have locator control then it is not necessary to define this flexfield.
And this flexfield supports only one structure.
System items (item flexfield)
Table name: MTL_SYSTEM_ITEMS And unique id column is INVENTORY_ITEM_ID
You can use item flexfield for recording and reporting your item information, and you must define and configure your item flexfield before you can start defining items.
You must plan how Oracle Inventory represents your company’s inventory sites and business units. This includes defining organizations, locations, subinventories, and locators depending on your company structure.
Inventory is consisting of inventory – subinventory -locators as per your organization setup.
ITEM is defined in inventory that is generally first in master organization, so that later it can be assign to multiple organizations. Also item definition can be uploaded by item upload open interface.
ITEM definition
You define items in one organization. To distinguish it from others, we call it the Item Master organization. Other organizations (child organizations) refer to the Item Master for item definition. After you define an item in the Item Master, you can assign it to any number of other organizations.
Item attributes
• inventory attributes like lot control/ serial control
• Purchasing and costing information.
• bill of material/ item category attributes
• Physical attributes like weight, volume
• Receiving attributes
• General planning attributes like min-max qty, order qty.
• Status of item Generally we will group the item attributes in these groups
Main Inventory Bill of material Asset management Costing Purchasing Receiving Physical attributes General planning MPS/MRP planning Lead times Work In Process Order Management Invoicing Service
Now we will discuss main attributes from major group.
Main attribute group
Primary Unit of Measure-
This is the stocking and selling unit of measure. Any necessary conversions are based on this unit of measure. This attribute is not updatable. The default primary unit of measure for new items is defined using the INV: Default Primary Unit of Measure profile option.
User Item Type-
Oracle provides several types by default at installation. These types correspond to the item templates also provided. Select one of these values, or one you defined with the Item Type window.
Different item types are ATO model/ Finished good/ Freight/ Inventory Type etc.
Item Status-
Item status codes set or default the values for attributes under status control. User–defined status codes control certain item attributes designated as status attributes. Item status can be active/engineer/inactive. The default item status for new items is defined using the INV:Default Item Status profile option.

Inventory Attribute Group
Inventory Item-Indicate whether to stock and transact this item in Oracle Inventory.
Stockable-Indicate whether to stock this item in Inventory. You can set this attribute only when you turn on the Inventory Item option.
Transactable – Indicate whether to allow Inventory transactions. You can set this attribute only when you turn on the Stockable option.
Reservable-Indicate whether you can create material reservations. You can reserve an item only when you have sufficient inventory.
Other attribute in this group are Lot control, serial control, locator control.

Bill of Material attribute group
BOM allowed-Allows you to define a bill of material for an item, or to assign the item as a component on a bill.
BOM item type-This attribute is controlled at the Master level only. Select a type to control bill functionality. You must enter a value here if BOM Allowed is turned on.
Asset management attribute group
These are the attributes you have to give for asset management.
Asset item type-This attribute identifies the asset item as an Asset Group, Asset Activity, or Rebuildable item.
Activity type-This is relevant when the Asset Item Type is set to Asset Activity. This indicates the type of maintenance for this asset activity.
Costing attribute group
You have to set these attributes while defining or updating items.
Costing enabled-
Indicate whether to report, value, and account for any item costs. Inventory asset value-Indicate whether to value an item as an asset in inventory. Turning this option off indicates an expense item.
Cost of goods sold account-
This attribute is controlled at the Organization level only. Enter a general ledger account to use as a source for the Cost of Goods Sold Account. The default cost of goods sold account is set when you define organization parameters.

Purchasing attribute group
Purchased-
Indicate whether to purchase and receive an item. Turning this option on allows you to set the Purchasable attribute. Purchasable-Indicate whether to order an item on a purchase order. You can set this only when Purchased is turned on.
Receipt required-
Indicate whether you must receive an item before you can pay the invoice. Leave this field blank if you want Inventory to use the value defined in the Purchasing Options window for transactions involving this item.
i.e. three way invoice matching Inspection required-
Indicate whether to inspect an item upon receipt from the supplier, before paying the corresponding invoice. Leave this field blank if you want Inventory to use the
value defined in the Purchasing Options window for transactions involving this item.
Encumbrance account-
This attribute is controlled at the Organization level only. Enter the default encumbrance account Oracle Purchasing uses when an item is received. If the item encumbrance account does not exist, Oracle Purchasing uses the sub inventory account.
Expense account-
This attribute is controlled at the Organization level only. Enter the default inventory account for expense items. This attribute is used only when Inventory Asset Value is turned off. Oracle Purchasing debits this account when you receive an item into inventory only if the item is being expensed. If you receive into an expense subinventory, Oracle Purchasing uses the expense account you assigned to the subinventory first; if you do not define the account here, Oracle Purchasing uses the expense account assigned to the item.
Receiving attribute group
In this group major attributes are receipt date controls, valid transactions and over-receipt quantity control.

Physical attribute group
The main attributes like weight, volume, dimension are shown below,

General planning attributes
Inventory planning method-Here you can select option for organizational level planning. Like not planned, min-max or recorder point.
For min-max quantity, order quantity and source. For source you can give inventory, subinventory or supplier.

Order Management attribute group
Customer ordered-Indicate whether to allow an item to be ordered by external customers. You can add any customer orderable items to price lists in Oracle Order Management.
Shippable-Indicate whether to ship an item to a customer. Shippable items are released by Oracle Shipping Execution’s Pick Release program, creating confirmable shipping lines, and are printed on the pick slip.
Default shipping organization-Enter the Oracle Shipping Execution primary shipping organization.
Picking rule-Enter the picking rule that defines the order in which subinventories, locators, lots, and revisions are picked.

Invoicing attribute group
Invoicable item-Indicate whether to include an item on an Oracle Receivables invoice.
Accounting rule-Enter an accounting rule to identify special revenue recognition rules for an item, such as recognizing revenue over time.
Invoicing rule-Enter an invoicing rule to determine the period in which you send an invoice when you recognize revenue over time (using accounting rules).
Sales account-This attribute is controlled at the Organization level only. Enter the general ledger account Oracle Receivables uses to record revenue when you bill the customer. If Auto-Accounting is based on items, accounting entries are created at that time.
Item templates
There are two types of templates. Predefined or custom template.
Predefined templates are planning item, purchased, outside processing item, lease item. So that once you assign any template, to new item then all default characters are assign to new item.

Category set & category
Categories are logical grouping of items that have similar characterizes, and a category set is a distinct category grouping scheme and consist of categories. Different category set accordingly to company need and reporting structure.
Use: For forecasting & summarizing history of that category. To keep easy track on that category.
Define category sets

Define categories

Specify default category sets
Assign categories to an item
Tables are related as, for item categories MTL_ITEM_CATEGORIES
MTL_SYSTEM_ITEMS_B
MTL_CATEGORY_SET_VALID_CATS
MTL_CATEGORY_SETS_B
MTL_CATEGORIES_B
Unit of Measure
Oracle Applications products provide powerful methods for defining and manipulating units of measure. You can easily convert between the units you define. This allows you to manufacture, order, or receive items in any unit of measure.
Table is related as:
MTL_UNITS_OF_MEASURE_TL
MTL_UOM_CONVERSIONS
MTL_SYSTEM_ITEMS_B
Item setup
The main tables that are involved in item master set up are with their relation,
MTL_SYSTEM_ITEMS_B
MTL_ITEM_STATUS
MTL_ITEM_TEMPLATES
MTL_PARAMETERS
MTL_ITEM_ATTRIBUTES
Item relationship
You can define item relationship between items. This allows you to search items through these relationships and for maintaining also.
• Item cross reference Use the Customer Item Cross References window to define and update cross references between your inventory items and the customer item numbers defined in the Customer Items Summary/Detail windows.
MTL_ITEM_TEMPL_ATTRIBUTES
• Substitute items In this relationship you can replace the outdated item, still keeping track on it.
• Related items You can relate different items according to your need.
• Manufacturer part no. You can define manufacturer part numbers for items. You can use this information for reporting purposes; and in catalog searches for particular items.

Inventory control
• Locator control You will track item as locator wise, it is a common method of inventory control.
• Revision Control With different revision of items according to your need, revision control can be Implemented.
• Lot Control You will define lot of your items so that you can track that item according to their lot numbers.
• Serial no. Control For expensive or for which you want tight control you will give serial numbers to those items. Item catalog
Used to partition items that share some common characteristics.
Item Transaction
WIP Suppliers INV Inv customers
Inventory can interact or can have transactions with suppliers, customers, work in process and with other sub inventories.
A transaction type is the combination of a transaction source type and a transaction action. It is used to classify a particular transaction for reporting and querying purposes. Oracle Inventory also uses transaction types to identify certain transactions
For example, transaction type is purchase order receipt which is a combination of transaction action i.e. receipt into stores and transaction source type is purchase type.
Major transactions are,

Sub-Inventory transfer
Each subinventory transfer is carried out as two separate transactions, creating two records in MTL_MATERIAL_TRANSACTIONS. The first record represents an issue from the source subinventory and the second record is a receipt from the destination subinventory.

Inter- organization transfer
Use the Inter–Organization Shipping Network window to define accounting information and the relationships that exist between shipping and destination organizations. You can specify whether an organization is a shipping organization, a destination organization, or both.
In these transactions you will need bills, shipping bills and other accounting details.

ABC Analysis & cycle counting
ABC analysis is a method of determining relative value of items in your Inventory sites.
Automatically scheduled or manually scheduled cycle counts You can define your own ABC group like A class, B class, C class.
Now we will go through some of the set up steps, which you will need before setting up inventory.
Setup
• Define item flexfields
• Define item categories flexfields
• Define catalog group flexfields
• Define UOM
• Define subinventories.
• Define locators
• Define organization parameters.
• Define intercompany relationship.
• Define picking rules. Some of the parameters we have to set defaults like item status as active, default primary unit of measure as Each or requisition approval status as approved or unapproved.
Organization parameters
You can define and update default inventory and costing parameters for your current organization in the following areas:
Default inventory parameters Costing information Revision, lot, serial parameters ATP, Pick, Item-sourcing parameters Inter-Organization Information Other account Parameters Define warehouse parameters
Default inventory parameters
Provide organization code and item master organization
In the Move Order Timeout Period field, enter the number of days a move order requisition can wait for approval. For locator control option: Inventory transactions within this organization do not require locator information. Pre-specified only: Inventory transactions within this organization require a valid, predefined locator for each item. Dynamic entry allowed: Inventory transactions within this organization require a locator for each item. You can choose a valid, predefined locator, or define a locator dynamically at the time of transaction. Determined at subinventory level: Inventory transactions use locator control information that you define at the subinventory level.
Costing Information

You have to define costing organization and costing method.
Valuation Accounts:
You choose a default valuation account when you define organization parameters. Under standard costing, these accounts are defaulted when you define subinventories and can be overridden.
• Material An asset account that tracks material cost. For average costing, this account holds your inventory and in transit values. Once you perform transactions, you cannot change this account.
• Material Overhead An asset account that tracks material overhead cost.
• Resource An asset account that tracks resource cost.
• Overhead An asset account that tracks resource and outside processing overheads.
• Outside processing An asset account that tracks outside processing cost.
• Expense The expense account used when tracking a non-asset item. Other accounts
• Sales The profit and loss (income statement) account that tracks the default revenue account.
• Cost of Goods Sold The profit and loss (income statement) account that tracks the default cost of goods sold account.
• Purchase Price Variance The variance account used to record differences between purchase order price and standard cost. This account is not used with the average cost method.
• Inventory A/P Accrual The liability account that represents all inventory purchase order receipts not matched in Accounts Payable, such as the uninvoiced receipts account.
• Invoice Price Variance The variance account used to record differences between purchase order price and invoice price. This account is used by Accounts Payable to record invoice price variance.
• Encumbrance An expense account used to recognize the reservation of funds when a purchase order is approved.
• Project Clearance Account When performing miscellaneous issues to capital projects, the project clearance account is used to post the distributions.
• Average Cost Variance Under average costing with negative quantity balances, this account represents the inventory valuation error caused by issuing your inventory before your receipts. Inter-Organization Transfer Accounts
You define default inter–organization transfer accounts in the Organization Parameters window. These accounts are defaulted when you set up shipping information in the Inter–Organization Shipping
Networks window.
• Transfer Credit The default general ledger account used to collect transfer charges when this organization is the shipping organization. This is usually an expense account. • Purchase Price Variance The default general ledger account used to collect the purchase price variance for inter–organization receipts into standard cost organizations. This is usually an expense account. • Payable The default general ledger account used as an inter–organization clearing account when this organization is the receiving organization. This is usually a liability account. • Receivable The default general ledger account used as an inter–organization clearing account when this organization is the shipping organization. This is usually an asset account. • In-transit Inventory The default general ledger account used to hold in-transit inventory value. This is usually an asset account. For average cost organizations, this account is the default material account. Other information you have to give is,
Revision, Serial and lot control information.
ATP, Pick, Item sourcing rules.
Inventory Planning and replenishment:
Oracle Inventory lets you manage your inventory levels using any combination of the system’s planning and replenishment features, including min–max planning, reorder point planning, kanban replenishment, and a replenishment system for generating orders.
Performing Recorder-Point planning
In this planning method you will take minimum order quantity and time to fulfill the order to decide the level of order. So record point is safety stock + forecast demand during lead time
Performing min-max planning
In this simple method you will decide maximum and minimum level of stock for that item, so that at min level order can be placed and the qty of that item can be full at max level.
Subinventory replishment planning
For some items you will have transactions with other subinventory so that optimum stock can be maintained.
Creating & executing Kanban cards
In this you will use kanban method by deciding some items as kanban cards.
And through requisition interface i.e. after running requisition import, Purchase requisition gets created that turns out to purchase orders. Then through purchase order u can receipt material in inventory.
And that is how purchasing comes into picture.
Before that we will take look at main tables in inventory modules like
Major Tables
• MTL_SYSTEM_ITEMS_B: Base table for item definition.
• MTL_PARAMETERS : This table is consist of ORGANIZATION_ID, PICKING_RULE_ID, RULE_ID for ATP
• MTL_ITEM_CATEGORY_ SETS
• MTL_ITEM_CATEGORIES : These tables will store information about different category sets and categories defined.
• MTL_ITEM _SUB_INVENTORIES
• MTL_ITEM_LOCATIONS
• MTL_SYSTEM_ITEMS_INTERFACE
• MTL_SUPPLY
• MTL_ONHAND_QUANTITIES
• MTL_RESERVATIONS : These table stores information about reserved quantity and on hand quantity with available quantity for picking rules.
• MTL_SALES_ORDERS : Order Management will interact with inventory for order details through this table.
• MTL_ITEM_FLEXFIELDS
• MTL_ITEM_TEMPLATES
• MTL_ITEM_ATTRIBUTES
• MTL_ITEM_REVISIONS
• MTL_MATERIAL TRANSACTION
• MTL_TRANSACTIONS_REASONS Additional terms in inventory
• Accounting close cycle: General ledger transfer Inventory accounting periods

• Move orders: Move orders are requests for the movement of material within a single organization. They allow planners and facility managers to request the movement of material within a warehouse or facility for purposes like replenishment, material storage relocations and quality handling.
Move orders are restricted to transaction within tan organization
& if you are transferring material between organization, you must internal
requisitions.
Three types of move orders:
Move order requisition Replenishment move orders Pick wave move orders
Interfaces
Open Item Interface
You can import items from any source into Oracle Inventory and Oracle Engineering using the Item Interface. With this interface, you can convert inventory items from another inventory system, migrate assembly and component items from a legacy manufacturing system, convert purchased items from a custom purchasing system, and import new items from a Product Data Management package. The Item Interface validates your data, insuring that your imported items contain the same item detail as items you enter manually in the Master Item window.
The Item Interface reads data from three tables for importing items and item details.
MTL_SYSTEMS_ITEM_INTERFACE This table is used for your new item numbers and all item attributes. This is the main item interface table, and may be the only table you choose to use.
MTL_ITEM_REVISIONS_INTERFACE If you are importing revision details for your new items, you can use this table. Which is used only for revision information, and is not required.
MTL_ITEM_CATEGORIES_INTERFACE To import item category assignments, the table is used to store data about item assignments to category sets, and categories to be imported into the Oracle Inventory MTL_ITEM_CATEGORIES table.
MTL_INTERFACE_ERRORS is used for error tracking of all items that the Item Interface fails.
Before you use the Item Interface, you must write and run a custom program that extracts item information from your source system and inserts the records into the MTL_SYSTEM_ITEM_INTERFACE table. And if revision & category details are there upload into respective tables. After you load item, revision, and item category assignment records into these interface tables, you run the Item Interface to import the data. The Item Interface assigns defaults, validates data you include, and then imports the new items.
Customer Item and Customer Item Cross-Reference Open Interface
A number of manufacturing industries are characterized by a multi-tiered, just-intime supply chain structure. Today’s manufacturing environment requires a close working relationship between customers and suppliers along the entire supply chain. Suppliers must be able to react quickly to their customers’ often changing requirements. By cross-referencing customer items with their own inventory items, suppliers can achieve faster order processing and shipments by allowing customers to place orders using customer item numbers.
You can import customer items and customer item cross-references from any legacy system into oracle inventory.
In customer item interface you import customer items into inventory. For each customer item you must define related information such as customer and item definition level.
MTL_CI_INTERFACE
Using this table data is transferred MTL_CUSTOMER_ITEMS table.
In customer item cross reference, you can import cross-references between customer items and exiting inventory items into your master organization. You can create multiple cross-references between customer items and one Oracle Inventory item. You can also create multiple cross-references between Oracle Inventory items and one customer item.
MTL_CI_XREFS_INTERFACE Using this interface table data is uploaded into base table, MTL_CUSTOMER_ITEM_XREFS.
Reports In inventory
Oracle Inventory provides you with a wide variety of reports, intended for different users of the product.
We will have overlook on major reports that you will come across.
Inactive items report
You can use this report to print items that have not had an inventory transaction since the date you specify. You can use this report to isolate items that have become inactive and verify their status.
The parameters are display and break on sub inventory, category set, inactive since i.e. date from which no transactions were occurred for items.
Item categories report
You will use this report to list items and their associated categories. Report can develop output as per category set and for given item range.
Item definition detail
Use the Item Definition Detail report to view comprehensive information for items. Use this report to verify items have been classified in conformance with decisions you have made regarding how the parts are to be planned, coasted, and located.
The report prints the item definition for the organization in which you submit the report.
You can view item attributes as per the category and also depending on your choice which attributes you want to print. Like general item attributes, bill of material item attributes, costing item attributes, inventory item attributes or physical item attributes.
Item definition summary report
Use the Item Definition Summary report to print a limited amount of information about items, such as description, status, and cost.
Item template listing
Use the Item Template Listing to review the template definitions. A template is a way to define a set of attribute values.
Reports parameters are all template flag or item template.
Item statuses report
Use the Item Statuses Report to view the item statuses. For example, You can use the report to review all pending statuses by making the effective date and the report date the same. You can have options like categories from-to, items from –to, and status effective date. And only for particular status.
ABC descending value report
Use the ABC Descending Value Report to view the results of an ABC compile. The report is sorted by descending value or quantity, depending on the compile criterion. Use this report to evaluate the break points for assigning your ABC classes to items.
You can give cumulative display criteria i.e. cumulative by value of cumulative by quantity.

Order Management Stuff

1)     What are the Base Tables and Interface Tables for Order Management?
Interface Tables : OE_HEADERS_IFACE_ALL, OE_LINES_IFACE_ALL
OE_PRICE_ADJS_IFACE_ALL, OE_ACTIONS_IFACE_ALL
OE_CREDITS_IFACE_ALL (Order holds like credit check holds etc)
Base Tables : OE_ORDER_HEADERS_ALL: Order Header Information
OE_ORDER_LINES_ALL: Items Information
OE_PRICE_ADJUSTMENTS: Discounts Information
OE_SALES_CREDITS: Sales Representative Credits.
Shipping Tables :WSH_NEW_DELIVERIES, WSH_DELIVERY_DETAILS, WSH_DELIVERY_ASSIGNMENTS, WSH_DELIVERIES.

2)    What is Order Import and What are the Setup's involved in Order Import?
A) Order Import is an open interface that consists of open interface tables and a set of API’s. It imports New, updated, or changed sales orders from other applications such as Legacy systems. Order Import features include validations, Defaulting, Processing Constraints checks, Applying and releasing of order holds, scheduling of shipments, then ultimately inserting, updating or deleting orders from the OM base tables. Order management checks all the data during the import process to ensure its validity with OM. Valid Transactions are then converted into orders with lines, reservations ,price adjustments, and sales credits in the OM base tables.

B) Setups:
•    Setup every aspect of order management that we want to use with imported orders, including customers, pricing, items, and bills.
•    Define and enable the order import sources using the order import source window.

3)    Explain the Order Cycle?
i)    Enter the Sales Order
ii)    Book the Sales Order(SO will not be processed until booked(Inventory confirmation))
iii)    Release sales order(Pickslip Report is generated and Deliveries are created) (Deliveries – details about the delivery. Belongs to shipping module (wsh_deliveries, wsh_new_deliveries, wsh_delivery_assignments etc) they explain how many items are being shipped and such details.
iv)    Transaction Move Order (creates reservations determines the source and transfers the inventory into the staging areas)
v)    Launch Pick Release
vi)    Ship Confirm (Shipping Documents(Pickslip report, Performa Invoice, Shipping Lables))
vii)    Auto invoice and closed

4)    Explain the Order to Cash Flow?
•    Enter the Sales Order
•    Book the Sales Order(SO will not be processed until booked(Inventory confirmation))
•    Release sales order(Pickslip Report is generated and Deliveries are created) (Deliveries – details about the delivery. Belongs to shipping module (wsh_deliveries, wsh_new_deliveries, wsh_delivery_assignments etc) they explain how many items are being shipped and such details.
•    Transaction Move Order (Selects the serial number of the product which has to be moved/ shipped)
•    Launch Pick Release
•    Ship Confirm (Shipping Documents(Pickslip report, Performa Invoice, Shipping Lables))
•    AutoInvoice (Creation of Invoice in Accounts Receivable Module)
•    Autolockbox ( Appling Receipts to Invoices In AR)
•    Transfer to General Ledger ( Populates GL interface tables)
•    Journal Import ( Populates GL base tables)
•    Posting (Account Balances Updated).

5)    What are the Process Constraints?
A. Process Constraints prevent users from adding updating, deleting, splitting lines and canceling order or return information beyond certain points in the order cycle. Oracle has provided certain process constraints which prevent data integrity violations.

Process constraints are defined for entities and attributes. Entities include regions on the sales order window such as order, line, order price adjustments, line price adjustments, order sales credits and line sales credits. Attributes include individual fields (of a particular entity) such as warehouse, shit to location, or agreement.


6)    What are Validation Templates?
A) Validation Templates are used to define the validation conditions in process constraints. A validation template names a condition and defines the semantic of how to validate that condition. These are used in processing constraints framework to specify the constraining conditions for a given constraint. These conditions are based on
•    Where the entity is in its work flow.
•    The state of attributes on an entity.
•    Any other validation condition that cannot be modeled using the above condition.

7)    What are different types of Holds?
1 GSA(General Services Administration) Violation Hold(Ensures that specific customers always get better pricing for example Govt. Customers)

2 Credit Checking Hold( Used for credit checking feature Ex: Credit Limit)

3 Configurator Validation Hold ( Cause: If we invalidate a configuration after booking)


8)    What is Document Sequence?
A) Document sequence is defined to automatically generate numbers for your orders or returns as you enter them. Single / multiple document sequences can be defined for different order types.

Document sequences can be defined as three types Automatic (Does not ensure that the numbers are contiguous), Gapless (Ensures that the numbering is contiguous), Manual Numbering. Order Management validates that the number specified is unique for order type.



9)    What are Defaulting Rules?
A) A defaulting rule is a value that OM automatically places in an order field of the sales order window. Defaulting rules reduce the amount of information one must enter. A defaulting rule is a collection of defaulting sources for objects and their attributes.
It involves the following steps
1 Defaulting Conditions - Conditions for Defaulting
2 Sequence – Priority for search
3 Source – Entity ,Attribute, Value
4 Defaulting source/Value

10)    When an order cannot be cancelled?
A) An order cannot be cancelled if,
1 It has been closed
2 It has already been cancelled
3 A work order is open for an ATO line
4 Any part of the line has been shipped or invoiced
5 Any return line has been returned or credited.

11)    When an order cannot be deleted?
A) You cannot delete an order line until there is a need for recording reason.

12)    What is order type?
A) An order type is the classification of order. It controls the order work flow activity, order number sequence, credit check point and transaction type. Order Type is associated to a work flow process which drives the processing of the order.

13)    What are primary and secondary price lists?
A) Every order is associated to a price list as each item on the order ought to have a price. A price list is contains basic list information and one or more pricing lines, pricing attributes, qualifiers, and secondary price lists. The price list that is primarily associated to an order is termed as Primary price list.

The pricing engine uses a Secondary Price list if it cannot determine the price of the item ordered in the Primary price list.

14)    What is pick slip? Types?
A) It is an internal shipping document that pickers use to locate items to ship for an order.
1 Standard Pick Slip – Each order will have its own pick slip with in each picking batch.
2 Consolidated Pickslip – Pick slip will have all the orders released in the each picking batch.

15)    What is packing slip?
A) It is an external shipping document that accompanies the shipment itemizing the contents of the shipment.

16)    What are picking rules?
A) Picking rules define the sources and prioritization of sub inventories, lots, revisions and locators when the item is pick released by order management. They are user defined set of rules to define the priorities order management must use when picking items from finished goods inventory to ship to a customer.
17)    Where do you find the order status column?
A) In the base tables, Order Status is maintained both at the header and line level. The field that maintains the Order status is FLOW_STATUS_CODE. This field is available in both the OE_ORDER_HEADERS_ALL and OE_ORDER_LINES_ALL.

18)    When the order import program is run it validates and the errors occurred can be seen in?
A) Responsibility: Order Management Super User
Navigation: Order, Returns > Import Orders > Corrections