Monday, 7 March 2016

Unix - Scripting Useful commands

Basic Steps to Create Host Concurrent Program 1. Create a ".prog" File
 2. Move the File to Server in any Custom TOP "bin" Folder (Tools Winscp / Filezilla)
 3. Execute the Below commands oderly maner
     3.1 Putty> cd $XXCUSTOM_TOP/bin
         -- Here the Custom TOP is the File Location TOP 
     3.2 Putty> dos2unix sample.prog
     3.3 chmod 755 sample.prog
     3.4 Putty> ln -s $FND_TOP/bin/fndcpesr sample
          -- Here the File name with out .prog Extension
          -- We are creating the Softlink to our File
     3.5 Add continue to create concurrent program Excutable and Program but the Executable type is "HOST"


Sample Commands:

1. Commenting any line in UNIX by using hash(#)
   # this is commented
2. Getting the Oracle Standard Parameters
   #user/bin/ksh
   ORAUSER_PASSWD=$1
   USER_ID=$2
   USER_NAME=$3
   REQUEST_ID=$4
 
3. Below command is used to print to Log File
   echo "Hi"
  
4. In Unix we can create Variables directly when evere we need and we can run any sql/plsql script directly
   like a block
 
Unixvariable =  `sqlplus -S  ${ORAUSER_PASSWD}<< ENDOFSQL
    set feedback off
    set serveroutput on
    exec APPS.Package_name.procedure_name(parameters);
    exit
    ENDOFSQL`
echo "${Unixvariable}"

5. I have text containg three value seperated by comma(,)
   -- Unixvariable = '123,234,456'
   i want to store every value into different variable

value1 = `echo $Unixvariable | awk -F"," '{print $1}'`
value2 = `echo $Unixvariable | awk -F"," '{print $2}'`
value3 = `echo $Unixvariable | awk -F"," '{print $3}'`

6. if there is any spaces in text we can remove
 newvalue1 = `echo $value1 | sed -e 's# ##g'`

7. UNIX is power full we can track each and every step, below function works like SQL%NOTFOUND in Oracle
    here i have written script for connecting to SFTP Server, if the connection is success no issue, if connection is not established due to any problem we can track this failure by using  below command
if [ ${?} -ne 0 ]

it check most recent command is executed successfully / not.

connection=`sftp "${vendor_username}"@"${vendor_host}" << END
    cd "${Direcoty Address}"
    lcd "$CUSTOM_TOP/bin"
    GET *.csv
    quit
    END`
#Check Log File Exist Before Validation Start
if [ ${?} -ne 0 ]
then
    echo "Unable to connect to destination server."
echo "${connection}"
    exit 2
    fi

8. We can call the SQL*LOADER Programs from UNIX Script easily

   CONTROL_STATUS=`sqlldr userid=${ORAUSER_PASSWD}            control=$CUSTOM_TOP/bin/control_file.ctl data=datafile.csv log=$APPLCSF/log/datafile.log bad=$APPLCSF/log/datafile.bad<< ENDOFSQLLDR
   ENDOFSQLLDR`
   echo "${CONTROL_STATUS}"

9. We can capture the date into variable

   currdate = `date +%d_%m_%g_%H_%M_%S`

10. We can create Files into the server using unix script in an easy manner
    `sqlplus -S ${ORAUSER_PASSWD} >> Kranthi.csv <<EOF
set head off;
set pages 0;
set linesize 2000;
set feedback off;
SELECT  'Emp Number'||','||
   'Emp Name' ||','||
     'Emp Sal'
from dual
/

exit
EOF`

11. Move the All ".csv" Files from Source Directory to Destination Directory
    cd "Source_Direcoty"
    find ./ -type f -name "*.csv" -print | xargs -l56 -i mv -f {} "Destination_Directory"

12. We can create Functions and we can pass parameters to Functions, here i am passing one parameter to Function
    Delete_Files()
    {
    cd $1
    echo "${PWD}"
    fileArray=($(find *.csv -mtime +10))
    filescount=${#fileArray[@]}
    for (( i=0; i<${filescount}; i++ ));
    do
    echo "${fileArray[$i]}"
    rm -f ${fileArray[$i]}
    echo "File deleted from Folder"=${fileArray[$i]}
    done
   }
   echo "Searching Files in bin direcory older than 10 Days...."
   Delete_Files $CUSTOM_TOP/bin

13. We can apply file permission(777) to all subfolders by using this command
    chmod -R 777 *
 
      
15. Control Structres in UNIX
 
     if test condition
      then
      statements;
fi

if [condition];
then
     statements;
     else
     statements;
     fi

if [condition];
then
   statements;
     elif
     then
     statements;
else
      statements;
     fi


     for expression
     do
  statements;
     done

16. File Comparisions
    -eq equal to
-ne not equal to
-lt less than
-le less than or equal to
-gt greater than
-ge greater than or equal to

BI Publisher Commands

<?start:body?>
<?end body?>
The text occurring before the <?start:body?> tag  treated as a Header.
The text occurring in between   <?start:body?>  and <?end body?>  treated as a Body.
The text occurring after the <?end body?>  treated as a footer.


<?xdoxslt:sysdate()?>
<?xdoxslt:sysdate('DD/MM/YY HH:MI:SS')?>

To get the Date in RTF Report, For Displaying Current System Date in Layout we have to use tis Tag.


<?for-each@section:G_DEPTNO?>
Use @section to split the page at every deptno level.
The problem with @section is if we don’t have data the output will not open.
And we can’t use @section more than once per a layout.

<?split-by-page-break:?>
We can use split-by-page-break , how many times we want in a single layout.
We have to use this tag exactly before end tag of any group
Don’t use the split-by-page-break in the same line of data row.

url:{concat('${OA_MEDIA}','/',IMAGE_FILE)}
For this you have to do below setps:
1.   Insert a dummy image in your template.
2.   In Microsoft Word's Format Picture dialog box select the Web tab. Enter the following syntax in the Alternative text region to reference the image URL:
url:{'http://image location'}
For example, enter: url:{'http://www.oracle.com/images/ora_log.gif'}

If we want to display main group elements in the sub group like “empno” in “dept” group. We have to place the ../../ before the tag (../../empno)

<?start@last-page:body?>< ?end body?>
If you want to display the total in last page use this command

<?if@row:SAL> 3000?>
 <xsl:attribute  xdofo:ctx="incontext" name="background-color">red
 The Color will apply to entire row by using “@row” attribute.
If you remove the “@row” the color will apply to that single column only.
The Xdofx:ctx has two values 1.incontext 2.block

<?if:SAL> 2500 ?>
<?end if?>
If you want to hide the Rows use this command in Group level

<?init-page-total: pst?>
<?add-page-total:pst;'SAL'?>
<?show-page-total:pst;'C9G990D00';'(C9G990D00)'?>
to show page wise totals
If you are using sum(sal) function in the any rtf file, if at least one sal field contains salary null the output will not generated it will give an error. To get a correct result you have to handle null columns like below
Use sum(sal[.!=’’])

create a variable
<?xdoxslt:set_variable($_XDOCTX, 'V_NUM', 0)?>
incremet / decrement variable
<?xdoxslt:set_variable($_XDOCTX, ‘V_NUM’, xdoxslt:get_variable($_XDOCTX, ‘V_NUM’) + 1)?>
display variable
<?xdoxslt:get_variable($_XDOCTX, 'V_NUM')?>

<?for-each-group:CD;COUNTRY?>
<?for-each-group:current-group();YEAR?>
<?for-each:current-group()?>
<?end for-each?>
<?end for-each-group?>
<?end for-each-group?>


Number Formatting


<?xdoxslt:xdo_format_number_l(100000,'999G999D99','EN-us')?>

O/P:-  100,000.00

<?xdoxslt:xdo_format_number_l(100000,'999G999D99','DE-de')?>

O/P:-   100.000,00


Repeating the Output Based on the String Length

<?xml version="1.0" encoding="WINDOWS-1252" ?>
<juvva>
<test>kranthi</test>
</juvva>


<?xdoxslt:set_variable($_XDOCTX, 'cnt',string-length(test))?>
<?for-each:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'cnt'),1)?>
XYZ
<?end for-each?>

O/P :- XYZ
       XYZ
  XYZ
  XYZ
  XYZ
  XYZ
  XYZ
  
Repeating the Output Data as needed

<?xml version="1.0" encoding="WINDOWS-1252" ?>
<ROWSET>
<ROW>
<DEPT>Z1</DEPT>
<DATA>2112</DATA>
</ROW>
<ROW>
<DEPT>A1</DEPT>
<DATA>7985</DATA>
</ROW>
<ROW>
<DEPT>B1</DEPT>
<DATA>8452</DATA>
</ROW>
<ROW>
<DEPT>B2</DEPT>
<DATA>2159</DATA>
</ROW>
</ROWSET>


<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,2,1)?>
<?for-each:/ROWSET/ROW?> <?DEPT?> <?end for-each?>
<?end for-each?>

O/P :- Z1
       A1
       B1
       B2
       Z1
       A1
       B1
       B2
  
-- @section Gives the data in new page


We can also use below syntax for before and after

<xsl:attribute name="break-before">page</xsl:attribute>
<xsl:attribute name="break-after">page</xsl:attribute>


 Conditional pagebreak, use below syntax. 
 Here we are inserting page-break if value of variable no_of_lines_per_page is equal to total records in loop inner_group. Variable is always referred by $ in XSL

<xsl:if xdofo:ctx="inblock" test="$no_of_lines_per_page=count($inner_group)"> 
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:if>


Multiple Date Formats
------------------------
<?xdoxslt:to_char(DATECREATED,'DD-MON-YYYY')?> 
<?format-date:hiredate;'SHORT'?>
<?format-date:hiredate;'YYYY-MM-DD'?> 
<?xdoxslt:sysdate(“DD-Mon-YY”)?>
<?initial-page-number:'AUTO'?>
<?initial-page-number:PAGESTART?>
<?initial-page-number:$PAGESTART?> --Parameter


Number Format
---------------

<?choose:?><?when:./PERIOD_NET_CR!=""?><?format-number:./PERIOD_NET_CR;'99G990D00'?><?end when?><?otherwise:?><?format-number:0.00;'0D00'?><?end otherwise?><?end choose?>

<?xdoxslt:set_variable($_XDOCTX, ’CC1’, ./ACCOUNTING_CODE_COMBINATION)?>
<? xdoxslt:get_variable($_XDOCTX, ’CC1’)?>


All Tables- Oracle Apps


OM - Order Management
Table Name Description

OE_ORDER_HEADERS_ALL stores header information for orders
in Order Management.
OE_ORDER_LINES_ALL stores information for all order lines in
OE_ORDER_SOURCES Feeder System Names that create orders in Order Management
tables.
OE_ORDER_HOLDS_ALL This table stores information of all the orders and lines
that are on hold and the link to hold sources and hold releases.
OE_SALES_CREDITS This table stores information about sales credits.
OE_TRANSACTION_TYPES_ALL This table stores information about the order and line
transaction types
WSH_DELIVERY_ASSIGNMENTS Delivery Assignments
WSH_DELIVERY_DETAILS Delivery Details
WSH_NEW_DELIVERIES Deliveries
WSH_TRIPS Trips
WSH_TRIP_STOPS Trip Stops
PO - Purchasing
Table Name Description

PO_ACTION_HISTORY Document approval and control action history table
PO_AGENTS Buyers table
PO_DISTRIBUTIONS_ALL Purchase order distributions
PO_HEADERS_ALL Document headers (for purchase orders, purchase agreements,
quotations, RFQs)
PO_LINES_ALL Purchase document lines (for purchase orders, purchase agreements,
quotations, RFQs)
PO_LINE_LOCATIONS_ALL Document shipment schedules (for purchase orders,
purchase agreements, quotations, RFQs)
PO_RELEASES_ALL Purchase order releases
PO_LINES_ARCHIVE_ALL Archived purchase order lines
PO_LINE_LOCATIONS_ARCHIVE_ALL Archived purchase order shipments
PO_HEADERS_ARCHIVE_ALL Archived purchase orders
PO_LINE_TYPES_B Line types
PO_RELEASES_ARCHIVE_ALL Archived releases
PO_REQUISITION_HEADERS_ALL Requisition headers
PO_REQUISITION_LINES_ALL Requisition lines
PO_REQ_DISTRIBUTIONS_ALL Requisition distributions
RCV_TRANSACTIONS Receiving transactions
RCV_SHIPMENT_HEADERS Shipment and receipt header information
RCV_SHIPMENT_LINES Receiving shipment line information

 INV - Inventory
Table Name Description

MTL_CATEGORIES_B Code combinations table for Item Category
MTL_CATEGORY_SETS_B Category Sets
MTL_ITEM_CATEGORIES / MTL_ITEM_CATEGORIES_V gives the details of Item category details
MTL_CUSTOMER_ITEMS Customer item Information
MTL_CUSTOMER_ITEM_XREFS Relationships between customer items and inventory
items
MTL_DEMAND Sales order demand and reservations
MTL_DEMAND_HISTORIES Sales order demand and reservations
MTL_ITEM_LOCATIONS Definitions for stock locators
MTL_ITEM_REVISIONS_B Item revisions
MTL_ITEM_TEMPLATES_B Item template definitions
MTL_ITEM_TEMPL_ATTRIBUTES Item attributes and attribute values for a template
MTL_LOT_NUMBERS Lot number definitions
MTL_MATERIAL_TRANSACTIONS Material transaction table
MTL_MATERIAL_TRANSACTIONS_TEMP Temporary table for processing material
transactions
MTL_ONHAND_QUANTITIES_DETAIL FIFO quantities by control level and receipt
MTL_PARAMETERS Inventory control options and defaults
MTL_RESERVATIONS Reservations
MTL_SECONDARY_INVENTORIES Subinventory definitions
MTL_SECONDARY_LOCATORS Item-subinventory-locator assignments
MTL_SERIAL_NUMBERS Serial number definitions
MTL_SYSTEM_ITEMS_B Inventory item definitions
MTL_TRANSACTION_ACCOUNTS Material transaction distributions
MTL_TRANSACTION_TYPES Inventory Transaction Types Table
MTL_TXN_REQUEST_HEADERS Move Order headers table
MTL_TXN_REQUEST_LINES Move order lines table
MTL_UNIT_TRANSACTIONS Serial number transactions
GL- General Ledger
Table Name Description

GL_CODE_COMBINATIONS Stores valid account combinations
GL_SETS_OF_BOOKS Stores information about the sets of books
GL_IMPORT_REFERENCES Stores individual transactions from subledgers
GL_DAILY_RATES Stores the daily conversion rates for foreign currency
Transactions
GL_PERIODS Stores information about the accounting periods
GL_JE_HEADERS Stores journal entries
GL_JE_LINES Stores the journal entry lines that you enter in the Enter Journals
form
GL_JE_BATCHES Stores journal entry batches
GL_BALANCES Stores actual, budget, and encumbrance balances for detail and
summary accounts
GL_BUDGETS Stores Budget definitions
GL_INTERFACE Import journal entry batches
GL_BUDGET_INTERFACE Upload budget data from external sources
GL_DAILY_RATES_INTERFACE Import daily conversion rates
 AR- Accounts Receivables
Table Name Description

RA_CUST_TRX_TYPES_ALL Transaction type for invoices, commitments and credit
memos
RA_CUSTOMER_TRX_ALL Header-level information about invoices, debit memos,
chargebacks, commitments and credit memos
RA_CUSTOMER_TRX_LINES_ALL Invoice, debit memo, chargeback, credit memo and
commitment lines
RA_CUST_TRX_LINE_GL_DIST_ALL Accounting records for revenue, unearned revenue
and unbilled receivables
RA_CUST_TRX_LINE_SALESREPS_ALL Sales credit assignments for transactions
AR_ADJUSTMENTS_ALL Pending and approved invoice adjustments
RA_BATCHES_ALL
AR_CASH_RECEIPTS_ALL Detailed receipt information
AR_CASH_RECEIPT_HISTORY_ALL History of actions and status changes in the life
cycle of a receipt
AR_PAYMENT_SCHEDULES_ALL All transactions except adjustments and miscellaneous
cash receipts
AR_RECEIVABLE_APPLICATIONS_ALL Accounting information for cash and credit memo
applications
AR_TRANSACTION_HISTORY_ALL Life cycle of a transaction
HZ_CUST_ACCOUNTS Stores information about customer accounts.
HZ_CUSTOMER_PROFILES Credit information for customer accounts and customer
account sites
HZ_CUST_ACCT_SITES_ALL Stores all customer account sites across all operating
units
HZ_CUST_ACCT_RELATE_ALL Relationships between customer accounts
HZ_CUST_CONTACT_POINTS This table is no longer used
HZ_CUST_PROF_CLASS_AMTS Customer profile class amount limits for each currency
HZ_CUST_SITE_USES_ALL Stores business purposes assigned to customer account
sites.
HZ_LOCATIONS Physical addresses
HZ_ORG_CONTACTS People as contacts for parties
HZ_ORG_CONTACT_ROLES Roles played by organization contacts
HZ_PARTIES Information about parties such as organizations, people, and groups
HZ_PARTY_SITES Links party to physical locations
HZ_PARTY_SITE_USES The way that a party uses a particular site or address
HZ_RELATIONSHIPS Relationships between entities
HZ_RELATIONSHIP_TYPES Relationship types
CE- Cash Management
Table Name Description

CE_BANK_ACCOUNTS This table contains bank account information. Each bank
account must be affiliated with one bank branch.
CE_BANK_ACCT_BALANCES This table stores the internal bank account balances
CE_BANK_ACCT_USES_ALL This table stores information about your bank account
uses.
CE_STATEMENT_HEADERS Bank statements
CE_STATEMENT_LINES Bank statement lines
CE_STATEMENT_HEADERS_INT Open interface for bank statements
CE_STATEMENT_LINES_INTERFACE Open interface for bank statement lines
CE_TRANSACTION_CODES Bank transaction codes
AP - Tables
Table Name Description

AP_ACCOUNTING_EVENTS_ALL Accounting events table
AP_AE_HEADERS_ALL Accounting entry headers table
AP_AE_LINES_ALL Accounting entry lines table
AP_BATCHES_ALL Summary invoice batch information
AP_CHECKS_ALL Supplier payment data
AP_HOLDS_ALL Invoice hold information
AP_INVOICES_ALL Detailed invoice records
AP_INVOICE_LINES_ALL contains records for invoice lines
entered manually, generated automatically or imported from the Open Interface.
AP_INVOICE_DISTRIBUTIONS_ALL Invoice distribution line information
AP_INVOICE_PAYMENTS_ALL Invoice payment records
AP_PAYMENT_DISTRIBUTIONS_ALL Payment distribution information
AP_PAYMENT_HISTORY_ALL Maturity and reconciliation history for
AP_PAYMENT_SCHEDULES_ALL Scheduled payment information on
invoices
AP_INTERFACE_REJECTIONS Information about data that could not be loaded by
Payables Open Interface Import
AP_INVOICES_INTERFACE Information used to create an invoice using Payables Open
Interface Import
AP_INVOICE_LINES_INTERFACE Information used to create one or more invoice
distributions
AP_SUPPLIERS stores information about your supplier level
attributes.
AP_SUPPLIER_SITES_ALL stores information about your
supplier site level attributes.
AP_SUPPLIER_CONTACTS Stores Supplier Contacts
FA - Fixed Assets
Table Name Description

FA_ADDITIONS_B Descriptive information about assets
FA_ADJUSTMENTS Information used by the posting program to generate journal
entry lines in the general ledger
FA_ASSET_HISTORY Historical information about asset reclassifications and unit
adjustments
FA_ASSET_INVOICES Accounts payable and purchasing information for each asset
FA_BOOKS Financial information of each asset
FA_BOOK_CONTROLS Control information that affects all assets in a depreciation
book
FA_CALENDAR_PERIODS Detailed calendar information
FA_CALENDAR_TYPES General calendar information
FA_CATEGORIES_B Default financial information for asset categories
FA_CATEGORY_BOOKS Default financial information for an asset category and
depreciation book combination
FA_DEPRN_DETAIL Depreciation amounts charged to the depreciation expense
account in each distribution line
FA_DEPRN_PERIODS Information about each depreciation period
FA_DEPRN_EVENTS Information about depreciation accounting events.
FA_DEPRN_SUMMARY Depreciation information at the asset level
FA_DISTRIBUTION_ACCOUNTS Table to store account ccids for all distributions for
a book
FA_DISTRIBUTION_DEFAULTS Distribution set information
FA_DISTRIBUTION_HISTORY Employee, location, and Accounting Flexfield values
assigned to each asset
FA_DISTRIBUTION_SETS Header information for distribution sets
FA_FORMULAS Depreciation rates for formula-based methods
FA_LOCATIONS Location flexfield segment value combinations
FA_MASS_ADDITIONS Information about assets that you want to automatically add
to Oracle Assets from another system
FA_METHODS Depreciation method information
FA_RETIREMENTS Information about asset retirements and reinstatements

HRMS- Human Resource Management System
Table Name Description

HR_ALL_ORGANIZATION_UNITS Organization unit definitions.
HR_ALL_POSITIONS_F Position definition information.
HR_LOCATIONS_ALL Work location definitions.
PER_ADDRESSES Address information for people
PER_ALL_PEOPLE_F DateTracked table holding personal information for employees,
applicants and other people.
PER_ALL_ASSIGNMENTS_F Allocated Tasks
PER_ANALYSIS_CRITERIA Flexfield combination table for the personal analysis key
flexfield.
PER_ASSIGNMENT_EXTRA_INFO Extra information for an assignment.
PER_ASSIGNMENT_STATUS_TYPES Predefined and user defined assignment status
types.
PER_CONTRACTS_F The details of a persons contract of employment
PER_CONTACT_RELATIONSHIPS Contacts and relationship details for dependents,
beneficiaries, emergency contacts, parents etc.
PER_GRADES Grade definitions for a business group.
PER_JOBS Jobs defined for a Business Group
PER_PAY_BASES Definitions of specific salary bases
PER_PAY_PROPOSALS Salary proposals and performance review information for
employee assignments
PER_PEOPLE_EXTRA_INFO Extra information for a person
PER_PERIODS_OF_PLACEMENT Periods of placement details for a non-payrolled
worker
PER_PERIODS_OF_SERVICE Period of service details for an employee.
PER_PERSON_ANALYSES Special information types for a person
PER_PERSON_TYPES Person types visible to specific Business Groups.
PER_PERSON_TYPE_USAGES_F Identifies the types a person may be.
PER_PHONES PER_PHONES holds phone numbers for current and ex-employees, current
and ex-applicants and employee contacts.
PER_SECURITY_PROFILES Security profile definitions to restrict user access to
specific HRMS records

PAY- Payroll
Table Name Description

PAY_ACTION_INFORMATION Archived data stored by legislation
PAY_ALL_PAYROLLS_F Payroll group definitions.
PAY_ASSIGNMENT_ACTIONS Action or process results, showing which assignments
have been processed by a specific payroll action, or process.
PAY_ELEMENT_CLASSIFICATIONS Element classifications for legislation and
information needs.
PAY_ELEMENT_ENTRIES_F Element entry list for each assignment.
PAY_ELEMENT_ENTRY_VALUES_F Actual input values for specific element entries.
PAY_ELEMENT_LINKS_F Eligibility rules for an element type.
PAY_ELEMENT_TYPES_F Element definitions.
PAY_ELEMENT_TYPE_USAGES_F Used to store elements included or excluded from a
defined run type.
PAY_ORG_PAYMENT_METHODS_F Payment methods used by a Business Group.
PAY_PAYMENT_TYPES Types of payment that can be processed by the system.
PAY_PAYROLL_ACTIONS Holds information about a payroll process.
PAY_PEOPLE_GROUPS People group flexfield information.
PAY_PERSONAL_PAYMENT_METHODS_F Personal payment method details for an employee.
 PAY_RUN_RESULTS Result of processing a single element entry.
PAY_RUN_RESULT_VALUES Result values from processing a single element entry.
PAY_SECURITY_PAYROLLS List of payrolls and security profile access rules.
PAY_INPUT_VALUES_F Input value definitions for specific elements.

BOM - Bills Of Material
Table Name Description

BOM_DEPARTMENTS Departments
BOM_DEPARTMENT_CLASSES Department classes
BOM_DEPARTMENT_RESOURCES Resources associated with departments
BOM_OPERATIONAL_ROUTINGS Routings
BOM_OPERATION_NETWORKS Routing operation networks
BOM_OPERATION_RESOURCES Resources on operations
BOM_OPERATION_SEQUENCES Routing operations
BOM_OPERATION_SKILLS
BOM_RESOURCES Resources, overheads, material cost codes, and material overheads
 BOM_STANDARD_OPERATIONS Standard operations
BOM_ALTERNATE_DESIGNATORS Alternate designators
BOM_COMPONENTS_B Bill of material components
BOM_STRUCTURES_B Bills of material
BOM_STRUCTURE_TYPES_B Structure Type master table
WIP - Work in Process
Table Name Description
WIP_DISCRETE_JOBS Discrete jobs
WIP_ENTITIES Information common to jobs and schedules
WIP_LINES Production lines
WIP_MOVE_TRANSACTIONS Shop floor move transactions
WIP_MOVE_TXN_ALLOCATIONS Move transaction allocations for repetitive schedules
WIP_OPERATIONS Operations necessary for jobs and schedules
WIP_OPERATION_NETWORKS Operation dependency
WIP_OPERATION_OVERHEADS Overheads for operations in an average costing
organization
WIP_OPERATION_RESOURCES Resources necessary for operations
WIP_OPERATION_YIELDS This table keeps all costing information for operation
yield costing.
WIP_TRANSACTIONS WIP resource transactions
WIP_TRANSACTION_ACCOUNTS Debits and credits due to resource transactions

FND - Appication Object Library
Table Name Description

FND_APPLICATION Applications registered with Oracle Application Object Library
FND_CONCURRENT_PROGRAMS Concurrent programs
FND_CONCURRENT_REQUESTS Concurrent requests information
FND_CURRENCIES Currencies enabled for use at your site
FND_DATA_GROUPS Data groups registered with Oracle Application Object Library
FND_FLEX_VALUES Valid values for flexfield segments
FND_FLEX_VALUE_HIERARCHIES Child value ranges for key flexfield segment values
FND_FLEX_VALUE_SETS Value sets used by both key and descriptive flexfields
FND_FORM Application forms registered with Oracle Application Object Library
FND_FORM_FUNCTIONS Functionality groupings
FND_ID_FLEXS Registration information about key flexfields
FND_ID_FLEX_SEGMENTS Key flexfield segments setup information and
correspondences between table columns and key flexfield segments
FND_ID_FLEX_STRUCTURES Key flexfield structure information
FND_LOOKUP_TYPES Oracle Application Object Library QuickCodes
FND_LOOKUP_VALUES QuickCode values
FND_MENUS New menu tabl for Release 10SC
FND_PROFILE_OPTIONS User profile options
FND_PROFILE_OPTION_VALUES Values of user profile options defined at different
profile levels
FND_REQUEST_SETS Reports sets
FND_REQUEST_SET_PROGRAMS Reports within report sets
FND_REQUEST_SET_STAGES Stores request set stages
FND_RESPONSIBILITY Responsibilities
FND_RESP_FUNCTIONS Function Security
FND_USER Application users
JA - Asia/Pacific Localizations
Table Name Description

JAI_CMN_BOE_HDRS Stores BOE header info when a BOE Invoice is created through
IL
JAI_CMN_BOE_DTLS Detail table for BOE Invoices
JAI_CMN_TAXES_ALL Master table for Localization Taxes
JAI_CMN_TAX_CTGS_ALL Stores tax categories and their link to excise ITEM
classes.
JAI_CMN_TAX_CTG_LINES Stores the tax lines for defined tax categories
JAI_CMN_VENDOR_SITES Stores excise account related information about vendors.
JAI_RGM_DEFINITIONS Stores regime information.
JAI_RGM_TAXES This table stores tax details for transactions having TCS tax
type.
JAI_CMN_RG_23AC_I_TRXS Stores Information of RG23A/C records and known as
Quantity Register.
JAI_CMN_RG_23AC_II_TRXS Stores Information of RG23A/C Part II Details. Also
known as Amount Register
JAI_CMN_RG_23D_TRXS Quantity register for Trading Organizations
JAI_CMN_RG_BALANCES Store the current balances of RG23A, RG23C and PLA
Registers
JAI_CMN_RG_PLA_TRXS Stores the Transaction Information of PLA Register.
JAI_CMN_RG_PLA_HDRS Stores PLA header Infomation when a PLA invoice is created
in AP module
JAI_CMN_RG_PLA_DTLS Stores PLA Detail Information when a PLA Invoice is created
in AP Module

QP - Advanced Pricing
Table Name Description

QP_LIST_HEADERS_B QP_LIST_HEADERS_B stores the header information for all
lists. List types can be, for example, Price Lists, Discount Lists or
Promotions.
QP_LIST_LINES QP_LIST_LINES stores all list lines for lists in
QP_LIST_HEADERS_B.
QP_PRICE_FORMULAS_B QP_PRICE_FORMULAS_B stores the pricing formula header
information.
QP_PRICE_FORMULA_LINES QP_PRICE_FORMULA_LINES stores each component that makes
up the formula.
QP_PRICING_ATTRIBUTES QP_PRICING_ATTRIBUTES stores product information and
pricing attributes.
QP_QUALIFIERS QP_QUALIFIERS stores qualifier attribute information.

XLA - Subledger Accounting
Table Name Description

XLA_EVENTS The XLA_EVENTS table record all information related to a specific
event. This table is created as a type XLA_ARRAY_EVENT_TYPE.
XLA_TRANSACTION_ENTITIES The table XLA_ENTITIES contains information about
sub-ledger document or transactions.
XLA_AE_HEADERS The XLA_AE_HEADERS table stores subledger journal entries. There
is a one-to-many relationship between accounting events and journal entry
headers.
XLA_AE_LINES The XLA_AE_LINES table stores the subledger journal entry lines.
There is a one-to-many relationship between subledger journal entry headers and
subledger journal entry lines.
XLA_DISTRIBUTION_LINKS The XLA_DISTRIBUTION_LINKS table stores the link between
transactions and subledger journal entry lines.
XLA_ACCOUNTING_ERRORS The XLA_ACCOUNTING_ERRORS table stores the errors
encountered during execution of the Accounting Program.
XLA_ACCTG_METHODS_B The XLA_ACCTG_METHODS_B table stores Subledger Accounting
Methods (SLAM) across products. SLAMs provided by development are not chart of
accounts specific. Enabled SLAMs are assigned to ledgers.
XLA_EVENT_TYPES_B The XLA_EVENT_TYPES_B table stores all event types that
belong to an event class.
XLA_GL_LEDGERS This table contains ledger information used by subledger
accounting.
 

Order management Tables

select * from oe_order_headers_all

select * from oe_order_lines_all

select * from oe_order_sources

select * from oe_price_adjustments

select * from oe_order_price_attribs

select * from oe_order_holds_all

select * from wsh_new_deliveries

select * from wsh_delivery_details

select * from wsh_delivery_assignments

select * from wsh_trip_stops

select * from qp_list_headers

select * from qp_list_lines

 select * from oe_hold_definitions

select * from oe_hold_authorizations

select * from oe_hold_sources_all

select * from oe_order_holds_all

select * from oe_hold_releases_all

Links:


 SOLD_FROM_ORG_ID  =   (ORG_ID)
SOLD_TO_ORG_ID    =   (CUST_ACCOUNT_ID)
SHIP_FROM_ORG_ID  =   (ORGANIZATION_ID)
SHIP_TO_ORG_ID    =   (SHIP to SITE_USE_ID)
INVOICE_TO_ORG_ID =   (BILL to SITE_USE_ID)

AR Tables

select * from HZ_CUST_ACCOUNTS where cust_account_id = 123

select * from hz_parties where party_id in (1234,110011)

select * from  HZ_CUST_ACCOUNT_ROLES where cust_account_id = 1243 and cust_account_role_id = 1100

select * from RA_SALESREPS_ALL

select * from RA_CUST_TRX_TYPES_ALL

select * from SO_AGREEMENTS_B

select * from RA_TERRITORIES

select * from AR_BATCHES_ALL

select * from RA_ADDRESSES_ALL

select * from RA_TERMS_B

select * from AR_CASH_RECEIPTS_ALL

select * from AR_CASH_RECEIPT_HISTORY_ALL

select * from AR_RECEIVABLE_APPLICATIONS_ALL

select * from AR_PAYMENT_SCHEDULES_ALL

select * from AR_RECEIPT_CLASSES

select * from AR_RECEIPT_METHODS

select * from AR_RECEIPT_METHOD_ACCOUNTS

AP Tables

select * from ap_invoices_all

select * from ap_invoice_lines_all

select * from ap_invoice_distributions_all

select * from ap_ae_headers_all

select * from ap_ae_lines_all

select * from ap_payment_schedules_all

select * from ap_invoice_payments_all

select * from ap_checks_all

select * from ap_check_formats

select * from ap_holds_all

select * from ap_terms

select * from ap_lookup_codes

select * from AP_INV_APRVL_HIST_ALL

select * from ap_selected_invoices_all

select * from AP_DOCUMENTS_PAYABLE

select * from ORG_ACCT_PERIODS

New Features in Oracle apps R12

What's new on Oracle R12:

1. Multi-org Access Control (MOAC)
    - Access Multiple Operating Units Within a Single Application Responsibility.
    - Set column MULTI_ORG_CATEGORY on table FND_CONCURRENT_PROGRAMS to 'S' - single or 'M' - Multi,
      for Multi-org Access.
    - Set MO_GLOBAL.SET_POLICY_CONTEXT('S', ORG_ID); when running views on SQL tools
2. Enhanced TCA model
    - HZ_CUSTOMER_PROFILES replace AR_CUSTOMER_PROFILES (11i)
    - AR_ADDRESSES_V replace RA_ADDRESSES (11i)
    - AR_SITE_USES_V replace RA_SITE_USES (11i)
    - AR_CUSTOMERS replace RA_CUSTOMERS (11i)
    - HZ_CONTACT_POINTS where OWNER_TABLE_NAME = 'HZ_PARTIES' and
      CONTACT_POINT_TYPE = 'PHONE' replace RA_PHONES (11i)
    - AR_CONTACTS_V replace RA_CONTACTS
3. SLA - Sub-ledger Accounting (see GL Tables)
    - Reference columns on table GL_JE_LINES are no more used.
    Sub ledger data retrieved from below tables.

 1. GL_JE_BATCHES (je_batch_id)

     => GL_JE_HEADERS (je_batch_id)

 2. GL_JE_HEADERS (je_header_id)

     => GL_JE_LINES (je_header_id)

 3. GL_JE_LINES (je_header_id, je_line_num)

     => GL_IMPORT_REFERENCES (je_header_id, je_line_num)

 4. GL_IMPORT_REFERENCES (gl_sl_link_table, gl_sl_link_id)

     => XLA_AE_LINES (gl_sl_link_table, gl_sl_link_id)

 5. XLA_AE_LINES (application_id, ae_header_id)

      => XLA_AE_HEADERS (application_id, ae_header_id)

 6. XLA_AE_HEADERS (application_id, event_id)

     => XLA_EVENTS (application_id, event_id)

 7. XLA_EVENTS (application_id, entity_id)

     => XLA.XLA_TRANSACTION_ENTITIES (application_id, entity_id)
 8.  XLA.XLA_TRANSACTION_ENTITIES(SOURCE_ID_INT_1)
            => Subledger tables
4. New Payments and Bank Model (see AP Payment tables)
    - CE_BANK_ACCOUNTS replace AP_BANK_ACCOUNTS_ALL (11i)
    - CE_BANK_ACCT_USES_ALL replace AP_BANK_ACCOUNT_USES_ALL(11i)
    - CE_BANK_BRANCHES_V replace AP_BANK_BRANCHS_ALL(11i)
    - New table added:  AP_INVOICE_LINES_ALL


5. E-business Tax
    - ZX_TAXES_B – Tax codes are stored
    - All tax related tables from Payables and Receivables are no longer use

Query to Fetch Concurrent program details

Conc Prog Details Query -
SELECT frt.responsibility_name,
                frg.request_group_name,
                frg.description
   FROM fnd_request_groups frg
              ,fnd_request_group_units frgu
              ,fnd_concurrent_programs fcp
              ,fnd_concurrent_programs_tl fcpt
              ,fnd_responsibility_tl frt
              ,fnd_responsibility frs
  WHERE frgu.unit_application_id = fcp.application_id
  AND   frgu.request_unit_id = fcp.concurrent_program_id
  AND   frg.request_group_id = frgu.request_group_id
  AND   frg.application_id = frgu.application_id
  AND   fcpt.source_lang = USERENV('LANG')
  AND   fcp.application_id = fcpt.application_id
  AND   fcp.concurrent_program_id = fcpt.concurrent_program_id
  AND   frs.application_id = frt.application_id
  AND   frs.responsibility_id = frt.responsibility_id
  AND   frt.source_lang = USERENV('LANG')
  AND   frs.request_group_id = frg.request_group_id
  AND   frs.application_id = frg.application_id
 -- AND   fcp.concurrent_program_name = :CONC_PROG_SHORT_NAME
  AND   fcpt.user_concurrent_program_name = :USER_CONC_PROG_NAME

Query to Fetch ValueSet details

Value set details Query -
select ffvs.flex_value_set_id ,
    ffvs.flex_value_set_name ,
    ffvs.description set_description ,
    ffvs.validation_type,
    ffvt.value_column_name ,
    ffvt.meaning_column_name ,
    ffvt.id_column_name ,
    ffvt.application_table_name ,
    ffvt.additional_where_clause
FROM fnd_flex_value_sets ffvs ,
    fnd_flex_validation_tables ffvt
WHERE ffvs.flex_value_set_id = ffvt.flex_value_set_id
AND ffvs.flex_value_set_name = :VALUE_SET_NAME;

Useful fusion query for User access

  Table FUN_USER_ROLE_DATA_ASGNMNTS is used for “Manage data access for users”. it will store use and role assignment to data security. Tabl...