Monday 29 April 2013

P2P Technical Flow(Complete Query).

1 comments

select prh.segment1 "PO Requisition Number",
       pha.segment1 "PO Number",
       aps.SEGMENT1 "Supplier Number",
       aps.vendor_name,
       apss.vendor_site_code,
       apsc.first_name,
       apsc.last_name,
       pla.item_id,
       plla.ship_to_organization_id,
       plla.ship_to_location_id,
       rt.transaction_type,
       rt.destination_type_code,
       rsh.receipt_num "PO Receipt Number",
       aia.invoice_num,
       aida.dist_code_combination_id,
       aca.check_number,gjh.ledger_id,
       gjh.name
  from po_requisition_headers_all prh,
       po_requisition_lines_all prl,
       po_req_distributions_all prd,
       po_headers_all pha,
       po_lines_all pla,
       po_distributions_all pda,
       po_line_locations_all plla,
       ap_suppliers aps,
       ap_supplier_sites_all apss,
       ap_supplier_contacts apsc,
       rcv_transactions rt,
       rcv_shipment_headers rsh,
       rcv_shipment_lines rsl,
       ap_invoices_all aia,
       ap_invoice_lines_all aila,
       ap_invoice_distributions_all aida,
       ap_invoice_payments_all aipa,
       ap_checks_all aca,
       xla.xla_transaction_entities xte,
       xla_events xe,
       xla_ae_headers xah,
       xla_ae_lines xal,
       xla_distribution_links xdl,
       gl_import_references gir,
       gl_je_batches gjb,
       gl_je_headers gjh,
       gl_je_lines gjl
 where prh.segment1 = :RequitionNumber --Right click :RequitionNumber from Toad Enable Prompt For Substitution Variables
   and aps.vendor_id = pha.vendor_id
   and apss.vendor_id = aps.vendor_id
   and apss.vendor_site_id (+) = pha.vendor_site_id
   and apss.vendor_site_id  = aca.vendor_site_id
   and apsc.vendor_site_id = apss.vendor_site_id
   and apsc.vendor_contact_id = pha.vendor_contact_id
   and prl.requisition_header_id = prh.requisition_header_id
   and prd.requisition_line_id = prl.requisition_line_id
   and pda.req_distribution_id = prd.distribution_id
   and pla.po_header_id = pda.po_header_id
   and pla.po_line_id = pda.po_line_id
   and pha.po_header_id = pla.po_header_id
   and pha.org_id = 204
   and plla.po_header_id = pla.po_header_id
   and plla.po_line_id = pla.po_line_id
   and rt.transaction_type = 'DELIVER'
   and rt.po_header_id = pha.po_header_id
   and rt.po_line_id = pla.po_line_id
   and rsh.shipment_header_id = rt.shipment_header_id
   and rsl.shipment_header_id = rsh.shipment_header_id
   and rsl.shipment_line_id = rt.shipment_line_id
   and aila.po_header_id = pha.po_header_id
   and aila.po_line_id = pla.po_line_id
   and aia.invoice_id = aila.invoice_id
   and aida.invoice_id = aila.invoice_id
   and aida.invoice_line_number = aila.line_number
   and aipa.invoice_id = aia.invoice_id
   and aca.check_id = aipa.check_id
   and xte.entity_code = 'AP_PAYMENTS'
   and xte.transaction_number = aca.check_number
   and xte.source_id_int_1 = aipa.check_id
   and xte.security_id_int_1 = aia.org_id
   and xe.entity_id = xte.entity_id
   and xah.event_id = xe.event_id
   and xal.ae_header_id = xah.ae_header_id
   and xal.ae_line_num = aida.invoice_line_number
   and xdl.ae_header_id = xah.ae_header_id
   and xdl.ae_line_num = xal.ae_line_num
   and xdl.applied_to_dist_id_num_1 = aida.invoice_distribution_id
   and gir.reference_5 = xte.entity_id  -- Entity Id
   and gir.reference_6 = to_char(xe.event_id) --Event Id
   and gir.reference_7 = to_char (xah.ae_header_id) -- AE Header Id
   and gir.gl_sl_link_id = xal.gl_sl_link_id
   --and gir.created_by = 1318
   and gjb.je_batch_id = gir.je_batch_id
   and gjh.je_batch_id=gjb.je_batch_id
   and gjh.je_header_id = gir.je_header_id
   and gjl.je_header_id=gjh.je_header_id
   and gjl.je_line_num= gir.je_line_num


Ur's
AmarAlam

Backend query too see the concurrent program details

0 comments

SELECT DISTINCT
  FCPL.USER_CONCURRENT_PROGRAM_NAME
  ,FRG.REQUEST_GROUP_ID
, 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 'Calling a package'
AND FNRTL.LANGUAGE = 'US'
AND FAPP.LANGUAGE = 'US'
and FRG.request_group_name ='All Reports';


Ur's
AmarAlam

Creation of value set through API

1 comments

1) Creation of value set through API...................
BEGIN
FND_FLEX_VAL_API.CREATE_VALUESET_TABLE
(
 VALUE_SET_NAME =>'PO_VALUE_SET4',
 DESCRIPTION =>'createdfrombackend',
 SECURITY_AVAILABLE =>'N',
 ENABLE_LONGLIST =>'N',
 FORMAT_TYPE   =>'Char',
 MAXIMUM_SIZE =>20,
 precision => NULL,
 numbers_only =>'N',
 uppercase_only  =>'N',
 right_justify_zero_fill =>'N',
 min_value  => NULL,
 MAX_VALUE   => NULL,
 TABLE_APPLICATION => 'Purchasing',
 table_appl_short_name =>'PO' ,
 TABLE_NAME =>'PO_REQUISITION_HEADERS PRH',
 ALLOW_PARENT_VALUES =>'N',
 VALUE_COLUMN_NAME =>'PRH.SEGMENT1',
 VALUE_COLUMN_TYPE  =>'Char',
 value_column_size  =>20,
 meaning_column_name  => NULL,
 meaning_column_type  => NULL,
 MEANING_COLUMN_SIZE  => NULL,
 ID_COLUMN_NAME    =>NULL,--'PRH.SEGMENT1',
 ID_COLUMN_TYPE   =>NULL,--'Char',
 ID_COLUMN_SIZE   =>null,--u20,
 WHERE_ORDER_BY    =>'where rownum<=100',
 ADDITIONAL_COLUMNS => NULL);
 Commit;
  Exception
  WHEN OTHERS THEN
  dbms_output.put_line(sqlerrm);
  end;

After executing the above coding will generate a message Anonymus Block created. To verify the data is created or not. Please check the table Fnd_Flex_Value_Sets

select * from fnd_flex_value_sets where flex_value_set_name = 'PO_VALUE_SET4';

2) Deletion of Valueset can be done by executing the below code :

BEGIN
FND_FLEX_VAL_API.DELETE_VALUESET(VALUE_SET => 'PO_VALUE_SET4');
END;


Ur's
AmarAlam

O2C TECHNICAL FLOW

0 comments
select ooha.order_number,ooha.org_id,
       hca.account_name,
       hp.party_name "Customer Name",
       hcasab.orig_system_reference      BILL_TO_ORIG_REF,
       hpsb.status                       BILL_TO_STATUS,
       'ADDRESS1 - '||bill_loc.address1||','||CHR(10)|| 'ADDRESS2 - '||bill_loc.address2||','||CHR(10)||
       'ADDRESS3 - '||bill_loc.address3||','||CHR(10)|| 'CITY     - '||bill_loc.city||','||CHR(10)||
       'POSTAL CD- '||bill_loc.postal_code||','||CHR(10)|| 'COUNTRY  - '|| bill_loc.country  BILL_TO_ADDRESS,
       hcasas.orig_system_reference      SHIP_TO_ORIG_REF,
       hpss.status SHIP_TO_STATUS,
       'ADDRESS1 - '||ship_loc.address1||','||CHR(10)|| 'ADDRESS2 - '||ship_loc.address2||','||CHR(10)||
       'ADDRESS3 - '||ship_loc.address3||','||CHR(10)|| 'CITY     - '||ship_loc.city||','||CHR(10)||
       'POSTAL CD- '||ship_loc.postal_code||','||CHR(10)|| 'COUNTRY  - '|| ship_loc.country  SHIP_TO_ADDRESS,
       oola.inventory_item_id,oola.ordered_item,
       msib.description item_description,
       wnd.name delivery_number,
       rct.trx_number "AR Invoice Number",
       acr.receipt_number "AR Receipt Number",
       gjh.ledger_id,
       gjh.name
  from oe_order_headers_all ooha,
       oe_order_lines_all oola,
       hz_parties hp,
       hz_cust_accounts hca,
       hz_party_sites hpss,
       hz_party_sites hpsb,
       hz_locations bill_loc,
       hz_locations ship_loc,
       hz_cust_acct_sites_all hcasab,
       hz_cust_acct_sites_all hcasas,
       hz_cust_site_uses_all hzsuab,
       hz_cust_site_uses_all hzsuas,
       mtl_system_items_b msib,
       wsh_delivery_details wdd,
       wsh_new_deliveries wnd,
       wsh_delivery_assignments wda,
       ra_customer_trx_all rct,
       ra_customer_trx_lines_all rctl,
       ra_cust_trx_line_gl_dist_all rctld,      
       ar_cash_receipts_all acr,
       xla.xla_transaction_entities xte,
       xla_events xe,
       xla_ae_headers xah,
       xla_ae_lines xal,
       xla_distribution_links xdl,
       gl_import_references gir,
       gl_je_batches gjb,
       gl_je_headers gjh,
       gl_je_lines gjl
 where ooha.order_number = :SalesOrderNumber --Right click :RequitionNumber from Toad Enable Prompt For Substitution Variables
   and ooha.org_id = 204
   and hca.cust_account_id    = ooha.sold_to_org_id
   and hp.party_id            = hca.party_id
   and hpss.party_id            = hca.party_id
   and hpsb.party_id            = hca.party_id
   and bill_loc.location_id = hpss.location_id
   and ship_loc.location_id = hpsb.location_id
   AND hcasas.cust_account_id  = hca.cust_account_id
   AND hcasab.cust_account_id  = hca.cust_account_id
   AND hcasas.party_site_id    = hpss.party_site_id
   AND hcasab.party_site_id    = hpsb.party_site_id
   and hzsuas.cust_acct_site_id = hcasas.cust_acct_site_id
   and hzsuab.cust_acct_site_id = hcasab.cust_acct_site_id
   and hzsuas.site_use_id = ooha.ship_to_org_id
   and hzsuab.site_use_id = ooha.invoice_to_org_id          
   and wda.delivery_id        = wnd.delivery_id(+)
   and wdd.delivery_detail_id = wda.delivery_detail_id
   and wdd.source_header_id   = ooha.header_id
   and wdd.source_line_id     = oola.line_id
   and wdd.organization_id    = msib.organization_id(+)
   and wdd.inventory_item_id  =msib.inventory_item_id(+)
   and rct.interface_header_attribute1 = to_char(ooha.order_number)
   and rct.org_id = ooha.org_id
   and rctl.customer_trx_id = rct.customer_trx_id
   and rctl.sales_order = to_char(ooha.order_number)
   and rctld.customer_trx_id = rct.customer_trx_id
   and rctld.customer_trx_line_id = rctl.customer_trx_line_id
   and acr.receipt_number = 'G-1001'
   and acr.pay_from_customer = rct.sold_to_customer_id
   and acr.org_id = ooha.org_id
   and acr.customer_site_use_id = rct.bill_to_site_use_id
   and xte.transaction_number = acr.receipt_number
   and xte.entity_code = 'RECEIPTS'
   and xe.entity_id = xte.entity_id
   and xah.event_id = xe.event_id
   and xal.ae_header_id = xah.ae_header_id
   and xal.accounting_class_code = 'CASH'
   and xdl.ae_header_id = xah.ae_header_id
   and xdl.ae_line_num = xal.ae_line_num
   --and xdl.source_distribution_id_num_1
   and gir.reference_5 = xte.entity_id  -- Entity Id
   and gir.reference_6 = to_char(xe.event_id) --Event Id
   and gir.reference_7 = to_char (xah.ae_header_id) -- AE Header Id
   and gir.gl_sl_link_id = xal.gl_sl_link_id
   and gir.created_by = 1318
   and gjb.je_batch_id = gir.je_batch_id
   and gjh.je_batch_id=gjb.je_batch_id
   and gjh.je_header_id = gir.je_header_id
   and gjl.je_header_id=gjh.je_header_id
   and gjl.je_line_num= gir.je_line_num


Ur's
AmarAlam

R12 COGS (Cost Of Goods Sold)

1 comments

In Oracle Application R12 COGS process has been changed. Reason for that are aggressive revenue recognition practices as well as the guidelines from various governing bodies.

Till R11 Cost of goods sold has been recognized as soon as the Order lines has shipped, as shown in below steps

After ship confirm, user run the interface trip stop (ITS).
ITS in turns run the OM Interface and Inventory Interface.
Inventory Interface calls Inventory transaction manager which in turns call COGS WF.
But as per new practices COGS should be recognized along with the revenue.

In R12 used need to define deferred cogs account. These deferred cogs account can be defined at each inventory org level.

During shipping process Inventory tables will hold the deferred COGS accounts. Only after invoicing has done in AR, AR will notify the Costing, and Costing in turns call the COGS account generator to get the cogs account .In that way COGS and revenue will be recognized in the same period.

There are few exceptions like how to get the COGS for

Ship only line (No Invoice will be created).
To handle above cases Close-line activity of the order line workflow has modified to call the costing API to get the cogs value.


Ur's
AmarAlam

Processing a Sales Order in Oracle Order Management

0 comments
StepOrder Header StatusOrder Line StatusOrder Flow Workflow Status (Order Header)Line Flow Workflow Status (Order Line)
1. Enter an OrderEnteredEnteredBook Order ManualEnter – Line
2. Book the OrderBookedAwaiting ShippingClose OrderSchedule ->Create Supply ->Ship – Line
3. Pick the OrderBookedPickedClose OrderShip – Line
4. Ship the OrderBookedShippedClose OrderFulfill – Deferred
BookedClosedClose OrderFulfill ->Invoice Interface ->Close Line -> End
5. Close the OrderClosedClosedEndEnd

Friday 26 April 2013

Queries Related to Responsibilities

0 comments

Operating Units and Inventory Orgs

List of Operating Units

SELECT a.name,
       a.organization_id,
       a.creation_date,
       a.last_update_date
  FROM hr_organization_units a, hr_organization_information b
 WHERE     a.organization_id = b.organization_id
       AND org_information1 = 'OPERATING_UNIT'
       AND org_information2 = 'Y'
   
List of INV Organizations

SELECT a.name,
       a.organization_id,
       a.creation_date,
       a.last_update_date
  FROM hr_organization_units a, hr_organization_information b
 WHERE     a.organization_id = b.organization_id
       AND org_information1 = 'INV'
       AND org_information2 = 'Y'

Concurrent Program/Set attached to Request Groups

SELECT
  RG.APPLICATION_ID "Request Group Application ID",
  RG.REQUEST_GROUP_ID "Request Group - Group ID",
  RG.REQUEST_GROUP_NAME,
  RG.DESCRIPTION,
  rgu.unit_application_id,
  rgu.request_group_id "Request Group Unit - Group ID",
  rgu.request_unit_id,cp.concurrent_program_id,
  cp.concurrent_program_name,
  cpt.user_concurrent_program_name,
  DECODE(rgu.request_unit_type,'P','Program','S','Set',rgu.request_unit_type) "Unit Type"
FROM
  apps.fnd_request_groups rg,
  apps.fnd_request_group_units rgu,
  apps.fnd_concurrent_programs cp,
  apps.fnd_concurrent_programs_tl cpt
WHERE rg.request_group_id = rgu.request_group_id
  AND rgu.request_unit_id = cp.concurrent_program_id
  AND cp.concurrent_program_id = cpt.concurrent_program_id
  AND cpt.user_concurrent_program_name = 'JDSU CM Pack Slip - US'


Menu attached to Responsibilities:

SELECT DISTINCT a.responsibility_name, c.user_menu_name
FROM apps.fnd_responsibility_tl a,
apps.fnd_responsibility b,
apps.fnd_menus_tl c,
apps.fnd_menus d,
apps.fnd_application_tl e,
apps.fnd_application f
WHERE a.responsibility_id(+) = b.responsibility_id
AND a.responsibility_id = ‘20538’
AND b.menu_id = c.menu_id
AND b.menu_id = d.menu_id
AND e.application_id = f.application_id
AND f.application_id = b.application_id
AND a.LANGUAGE = 'US';

Form Function attached to Responsibilities:

List of Responsibilities associated with Form Functions

SELECT DISTINCT responsibility_id
FROM apps.fnd_responsibility_vl a
WHERE a.end_date IS NULL
AND a.menu_id IN (
SELECT menu_id
FROM apps.fnd_menu_entries_vl
START WITH menu_id IN (SELECT menu_id FROM apps.fnd_menu_entries_vl
WHERE function_id IN (SELECT function_id FROM applsys.fnd_form_functions a
WHERE function_name = pc_function_name))
CONNECT BY PRIOR menu_id = sub_menu_id)
AND a.responsibility_id NOT IN (SELECT responsibility_id FROM apps.fnd_responsibility_vl
WHERE responsibility_id IN (SELECT responsibility_id FROM applsys.fnd_resp_functions resp
WHERE action_id IN (SELECT function_id FROM applsys.fnd_form_functions a
WHERE function_name = pc_function_name)))
AND a.responsibility_id NOT IN (SELECT responsibility_id FROM apps.fnd_responsibility_vl
WHERE responsibility_id IN (SELECT responsibility_id FROM applsys.fnd_resp_functions resp
WHERE action_id IN (SELECT menu_id FROM apps.fnd_menu_entries_vl
START WITH menu_id IN (SELECT menu_id FROM apps.fnd_menu_entries_vl
WHERE function_id IN (SELECT function_id FROM applsys.fnd_form_functions a
WHERE function_name = pc_function_name))
CONNECT BY PRIOR menu_id = sub_menu_id)))
ORDER BY responsibility_id



Ur's
AmarAlam

Thursday 25 April 2013

Reset Password for Applications

0 comments

DECLARE
    v boolean;
BEGIN
    v := fnd_user_pkg.changepassword('WELCOME','AMARALAM408');
    COMMIT;
END;


Ur's
AmarAlam

Interface Tables

0 comments

General Ledger:

GL_INTERFACE
GL_BUDGET_INTERFACE
GL_DAILY_RATES_INTERFACE_V
GL_IEA_INTERFACE
GL_INTERFACE_CONTROL

Payable:

AP_INVOICES_INTERFACE
AP_INVOICE_LINES_INTERFACE
AP_INTERFACE_CONTROLS
--------------------------------------
AP_SUPPLIERS_INT
AP_SUPPLIER_SITES_INT
AP_SUP_SITE_CONTACT_INT
AP_SUPPLIER_INT_REJECTIONS

Receivables:

RA_CUSTOMERS_INTERFACE
RA_CUSTOMER_PROFILES_INTERFACE
RA_CONTACT_PHONES_INTERFACE
RA_CUSTOMER_BANKS_INTERFACE
RA_CUST_PAY_METHOD_INTERFACE
--------------------------------------
RA_INTERFACE_DISTRIBUTIONS_ALL
RA_INTERFACE_LINES_ALL
RA_INTERFACE_SALESCREDITS_ALL
RA_INTERFACE_ERRORS_ALL
--------------------------------------
AR_PAYMENTS_INTERFACE_ALL
AR_TAX_INTERFACE

Cash Management:

CE_STATEMENT_HEADERS_INT_ALL
CE_STATEMENT_LINES_INTERFACE

Purchasing:

PO_HEADERS_INTERFACE
PO_LINES_INTERFACE
PO_DISTRIBUTIONS_INTERFACE
--------------------------------------
PO_REQUISITIONS_INTERFACE_ALL
PO_REQ_DIST_INTERFACE_ALL
PO_RESCHEDULE_INTERFACE
PO_INTERFACE_ERRORS

Inventory:

MTL_REPLENISH_HEADERS_INT
MTL_REPLENISH_LINES_INT
MTL_SERIAL_NUMBERS_INTERFACE
MTL_SYSTEM_ITEMS_INTERFACE
MTL_TRANSACTION_LOTS_INTERFACE
MTL_TRANSACTIONS_INTERFACE

Order Entry:

SO_HEADERS_INTERFACE_ALL
SO_HEADER_ATTRIBUTES_INTERFACE
SO_LINES_INTERFACE_ALL
SO_LINE_ATTRIBUTES_INTERFACE
SO_LINE_DETAILS_INTERFACE
SO_PRICE_ADJUSTMENTS_INTERFACE
SO_SALES_CREDITS_INTERFACE
OE_HEADERS_IFACE_ALL
OE_LINES_IFACE_ALL
OE_EXP_INTERFACE_ERRORS


Ur's
AmarAlam

R12 Table Changes

0 comments

Suppliers: 

New R12 tables  -> Old 11i Tables
AP_SUPPLIERS - replaces PO_VENDORS
AP_SUPPLIER_SITES_ALL- replaces PO_VENDOR_SITES_ALL

Additional supplier related tables in IBY (Payments) and HZ (TCA):
IBY_EXTERNAL_PAYEES_ALL - stores Payee(supplier) information.
HZ_PARTIES - Party data for the suppliers.
HZ_PARTY_SITES - Party site data for the supplier sites.

Invoices:

Additional table in R12: AP_INVOICE_LINES_ALL
Allocations - AP_CHRG_ALLOCATIONS_ALL is obsolete in R12

Taxes:

Functionality provided by E-Business Tax
New tables in R12
ZX_LINES - Detailed Tax lines for the invoice (trx_id = invoice_id)
ZX_LINES_SUMMARY - Summary tax lines for the invoice (trx_id = invoice_id)
ZX_REC_NREC_DIST  - Tax distributions for the invoice (trx_id = invoice_id)
ZX_LINES_DET_FACTORS - Tax determination factors for the invoice (trx_id = invoice_id)

Payments:

Functionality moved to central Payments (IBY)
New IBY tables in R12:
IBY_PAY_SERVICE_REQUESTS  - Payment Process Request information

Accounting:

Functionality moved to SubLedger Accounting (SLA)
New R12 tables:
XLA_EVENTS -> replaces AP_ACOCUNTING_EVENTS_ALL
XLA_AE_HEADERS -> replaces AP_AE_HEADERS_ALL
XLA_AE_LINES-> replaces AP_AE_LINES_ALL
XLA_DISTRIBUTION_LINKS

Trial Balance:

New R12 Table
XLA_TRIAL_BALANCES
AP_LIABILITY_BALANCE-> not used in new R12 transactions
AP_TRIAL_BALANCE -> not used in new R12 transactions

Bank Accounts:

Functionality moved to Cash Management.
CE_BANK_ACCOUNTS -> replaces AP_BANK_ACCOUNTS_ALL
CE_BANK_ACCT_USES_ALL  -> replaces AP_BANK_ACCOUNT_USES_ALL
CE_PAYMENT_DOCUMENTS -> AP_CHECK_STOCKS_ALL


Ur's
AmarAlam

DBA Queries

0 comments

-- Database Details
SELECT * FROM v$database

-- Instance Details
SELECT * FROM v$instance

-- License Details
SELECT * FROM v$license

-- Version Details
SELECT * FROM v$version

--Release Details
SELECT * FROM apps.fnd_product_groups

-- Patch Details
SELECT * FROM ad_applied_patches
SELECT * FROM ad_bugs


-- Concurrent Manager

SELECT concurrent_queue_name,
       user_concurrent_queue_name,
       description,
       enabled_flag
  FROM apps.fnd_concurrent_queues_vl fcq
 WHERE user_concurrent_queue_name LIKE 'AA%'



-- Partitioning Installed
SELECT DECODE (COUNT (*), 0, 'No', 'Yes') partitioning
FROM (SELECT 1
FROM dba_part_tables
WHERE owner NOT IN ('SYSMAN', 'SH', 'SYS', 'SYSTEM') AND ROWNUM = 1);

-- Spatial Installed
SELECT DECODE (COUNT (*), 0, 'No', 'Yes') spatial
FROM (SELECT 1
FROM all_sdo_geom_metadata
WHERE ROWNUM = 1);

-- RAC Installed
SELECT DECODE (COUNT (*), 0, 'No', 'Yes') rac
FROM (SELECT 1
FROM v$active_instances
WHERE ROWNUM = 1);

-- Unix Product Top Value
SELECT variable_name, value
FROM apps.fnd_env_context
WHERE variable_name = 'AP_TOP'
AND concurrent_process_id =
(SELECT MAX (concurrent_process_id) FROM apps.fnd_env_context);

-- Command to Kill Session for Releasing Lock
ALTER SYSTEM KILL SESSION '(sid, serial#)';


Ur's
AmarAlam

Tuesday 23 April 2013

Get Source Code of any SQL Object in Oracle

0 comments

To get the source code of any SQL object in Oracle we can use a standard API(Package-function) DBMS_METADATA.GET_DDL

Syntax:
  dbms_metadata.get_ddl('object_type','object_name')

Example:
  select dbms_metadata.get_ddl('INDEX','SAM_IDX') from dual;

  select dbms_metadata.get_ddl('INDEX','SAM_IDX') from dual;

API to make invalid objects to valid in any instance

0 comments

I would like to share you one standard API of making invalid objects valid in any instance.  This API will check the inter-dependencies between the objects and make them valid sequentially.  The below code needs to be run in apps schema which makes all the objects valid.  This info. I got from DBA who made 3600+ objects valid within half an hour.

BEGIN
exec sys.utl_recomp.recomp_parallel(20);
END;

Oracle Reports

0 comments

Oracle Reports


Objects of Reports builder6i
Object Navigator
Data Model
Layout Model
Parameter Form
Report Triggers
Property palette
Overview of Reports Styles
Tabular
Form like
Mailing label
Form letter
Group left
Group above
Matrix
Matrix with group
Creating Reports
Wizard
Manual
Data model objects
Group
Summary column
Formula column
Placeholder column
Data Link
Cross Product
Layout Model objects
Fields
Repeating Frame
Frame
Text
Anchor
Button
Layout Sections
1. Header Section
2. Main section
3. Trailer section
Parameters Reports
System Parameters
User Parameters
1. Bind parameter Report
2. Lexical parameter Report\
Different Triggers in Report6i
Validation Trigger
Format Trigger
Group Filter Trigger
Action Trigger
Report Trigger
Oracle Reports 6i
In this tutorial you will learn about Introduction to Oracle Reports Builder, Report file storage formats, Oracle Reports Builder Tools, Report Wizard, Triggers in Reports, Types of Triggers and Case Study - Creating a Tabular report.
Introduction to Oracle Reports Builder
Oracle Reports Builder is a powerful enterprise reporting tool used to build reports that dynamically retrieve data from the database, format, display and print quality reports.Reports can be stored in File or Database (Report Builder Tables).
Report file storage formats
.rdf Report
Binary File Full report definition (includes source code and comments)
Modifiable through Builder. Binary, executable Portable if transferred as binary.
PL/SQL recompiles on Open/Run
.rep Report
Binary Run-Only File
No source code or comments. Not modifiable binary, executable.
Report Executables
RWBLD60 Report Builder
RWRUN60 Report Runtime
RWCON60 Report Converter/Compiler [File => Administration => Compile (rdf to rep)/Convert]
Oracle Reports Builder Tools
Oracle Reports Builder comes with the following components
Object Navigator
Property Palette
Data Model Editor
Layout Model Editor
Parameter Form Editor
Object Navigator
The Object Navigator shows a hierarchical view of objects in the report. Each item listed is called a node and represents an object or type of object the report can contain or reference.
Property Palette
A Property Palette is a window that displays the settings for defining an Oracle reportsobject.
Data Model Editor
To specify data for a report, a data model should be defined. A data model is composed of some or all of the following data definition objects.
Queries
Queries are SQL Select statements that fetch data from the oracle database. These statements are fired each time the report is run.
Groups
Groups determine the hierarchy of data appearing in the report and are primarily used to group columns selected in the query. Oracle report automatically creates a group for each query.
Data Columns
Data columns contain the data values for a report. Default data columns, corresponding to the table columns included in each query’s SELECT list are automatically created byoracle reports. Each column is placed in the group associated with the query that selected the column.
Formula Columns
Formulas can be entered in formula columns to create computed columns. Formulas can be written using PL/SQL syntax. Formula columns are generally preceded by CF_ to distinguish from other columns.
Summary Columns
Summary columns are used for calculating summary information like sum, average etc. This column uses a set of predefined oracle aggregate functions. Summary columns are generally preceded by CS_ to distinguish them from other columns.
Data Links
Data links are used to establish parent-child relationships between queries and groups via column matching.
Layout Model Editor
A report layout editor contains the following layout objects
Frames
Frames surround other layout objects, enabling control of multiple objects simultaneously
Repeating Frames
Repeating frames acts as placeholders for groups (I.e repeating values) and present rows of data retrieved from the database. Repeating frames repeat as often as the number of rows retrieved.
Fields
Fields acts as placeholders for columns values. They define the formatting attributes for all columns displayed in the report.
Boilerplate
Boilerplate consists of text (label of the column) and graphics that appear in a report each time it is run.
Parameter Form Editor
Parameter form is a runtime form used to accept inputs from the user.
Parameters
Parameters are variables for a report that accept input from the user at runtime. These parameter values can then be used in the SQL select statements to retrieve data conditionally. Oracle reports creates a set of system parameters at runtime namely report destination type, number of copies etc.
Report Wizard
When we create a default Tabular Report using report wizard, the wizard will take you through the below mentioned pages
Report Style Tabular, Form-Like, Mailing Label, Form Letter, Group Left, Group Above, Matrix, Matrix with Group
Query Type Choose whether to build a SQL query or an Express query.
Data Enter a SELECT statement to retrieve the report data
Displayed Fields Select the fields that you want to display in the output.
Fields to Total Select the fields that you want to summarize.
Labels for Fields Alter the labels that appear for each field and the width of each field.
Template Select the template that you want to use for this report. A template contains standard information such as company logo, date, and so on.
Note: The above steps are different for each report style.
Group Left & Have an additional page: ‘Groups’
Group Above styles
Matrix Reports styles Have 3 additional pages: ‘Matrix Rows’ ‘Columns’ ‘Cells’
Mailing Label & Have 4 pages: ‘Report Style’ ‘Data’
Form Letter styles ‘Text’ ‘Template’
The difference between Mailing Labels and Form Letters is, Mailing Label shows multiple records on one page while Form Letter shows one record on each page.
Triggers in Reports
Types of Triggers
Formula Triggers: Formula triggers are PL/SQL functions that populate columns of type Formula.
Format Triggers:
Format triggers are PL/SQL functions executed before the object is formatted. These triggers are used to dynamically change the formatting attributes and used to conditionally print and not to print a report column value. These triggers return Boolean values TRUE or FALSE. If the return value of the format trigger is FALSE, the value is not displayed.
Action Triggers: Action triggers are used to perform user-defined action. These triggers do not return any value.
Validation Triggers: Validation triggers are PL/SQL functions that are executed when a parameter value is entered and the cursor moves to the next parameter. These triggers return Boolean value TRUE / FALSE.
Report Triggers: Report triggers enable execution of PL/SQL functions at specific time during execution and formatting of report.
Before Parameter Form
Fires before the Runtime Parameter Form are displayed. Can access the PL/SQL global variables, report level columns and manipulate accordingly.
After Parameter Form
Fires after the Runtime Parameter form are displayed. Used to validate the parameter values.
Before Report
Fires before the report is executed but after the queries is parsed and date is fetched.
Between Pages
Fires before each page of the report are formatted, except the very first page. This page is used to customize page formatting.
After Report
Fires after the report previewer are exited, or after report output is sent to a specified destination.
Case Study - Create a Tabular report
After invoking the report builder and connecting to the database invoke Report wizard.
Click on Tools… Report Wizard… to start the report wizard for a new report. Report wizard shows the following tab pages to enter information required for report.
Style Totals Data
Labels Fields Template
In the Style tab select ‘Tabular’ as the report style and Click Next
The Data tab allows creation of an SQL statement using Query Builder or to enter the SQL statement in the multi line edit box provided in the Data tab.
Click Next
This will take you to the next tab if your SQL statement syntax is correct.
Fields tab is used to specify the fields that must be displayed in tabular format. Select all fields by clicking on >> icon.
Click Next
The Totals tab is displayed that allows creation of Summary columns using aggregate functions.
This report does not include totals for the selected fields and thus Click Next.
The Labels tab is displayed that enable us to change the labels of the columns.
Click Next
The Templates tab is displayed that enable us to create report from templates. There are number of pre-determined templates available in Oracle Reports Builder.
Select Corporate 1 as the template. Click Finish
Click on File. Save to save the report, specify the report name and click OK.
Run the report!!

1.What is SRW Package?
Ans: The Report builder Built in package know as SRW Package (Sql Report Writer) This package extends reports, Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exit, to format width of the columns, to page break the column, to set the colors
Ex: SRW.DO_SQL, It’s like DDL command, we can create table, views , etc.,
SRW.SET_FIELD_NUM
SRW. SET_FIELD_CHAR
SRW. SET FIELD _DATE
2.What are Lexical Parameters and bind parameters?
Lexical Parameter is a Simple text string that to replace any part of a SELECT statement. Column names, the from clause, where clause or the order by clause. To create a lexical reference in a query we prefix the parameter name with an ampersand (ex. &.dname,)
3. What is User Parameters?
A parameter, which is created by user. For to restrict values with where clause in select statement.
Data type, width, input mask, initial value, validation trigger, list of values
We can use Lovs in use in user parameter with static and Dynamic Select Statement.
4. What is System Parameters: These are built-in parameters by corporation.
BACKGROUND: Is whether the report should run in the foreground or the background.
COPIES Is the number of report copies that should be made when the report is printed.
CURRENCY Is the symbol for the currency indicator (e.g., "$").
DECIMAL Is the symbol for the decimal indicator (e.g., ".").
DESFORMAT Is the definition of the output device's format (e.g., landscape mode for a printer). This
parameter is used when running a report in a character-mode environment, and when
sending a bitmap report to a file (e.g. to create PDF or HTML output).
DESNAME Is the name of the output device (e.g., the file name, printer's name, mail userid).
DESTYPE Is the type of device to which to send the report output (screen, file, mail, printer, or
screen using PostScript format).
MODE Is whether the report should run in character mode or bitmap.
ORIENTATION Is the print direction for the report (landscape, portrait, default).
PRINTJOB Is whether the Print Job dialog box should appear before the report is run.
THOUSANDS Is the symbol for the thousand's indicator (e.g., ",").
5. How many Types of Reports available in Reports
Tabular form-like form – letter Group left
Group above matrix Matrix with group Mailing label
Matrix Report: Simple, Group above, Nested
Simple Matrix Report required 4 groups
1.Cross Product Group
2. Row and Column Group
3. Cell Group
4. Cell column is the source of a cross product summary that becomes the cell content.
Frames: 1.Repeating frame for rows (down direction)
2.Repeating frame for columns (Across)
3.Matrix object the intersection of the two repeating frames
6.What Types of Triggers are Available in Reports.
Report level Triggers
Data Model Triggers
Layout Model Triggers
Report Level Triggers
Before parameter form: If u want take parameters passed to the report and manipulate them so that they appear differently in the parameter form., this is where modification can be done for ex: when u want pass a deptno but show the dname selected , use a before parameter form trigger.
After parameter form & Before Report: These two triggers are fired one after the other. No event occurs in between them. However the way the way that the reports product behaves when the triggers fail is quite different. If the After Parameter trigger fails the report will be put back into the parameter form. It’s useful to place code here to check whether values in your parameter form are valid. Even though the Before Report trigger is executed before the query runs, if this trigger fails it won’t fail until reports tries to display the first page of the report. This means that even if something goes wrong in the before report trigger (meaning that you may not want to run the query at all) It will run anyway
Between pages: This Trigger fires before all pages except first page one. It will not fire after the last page of a report. If a report only has one page it will not fire at all. You can use this trigger to send specific control to the change the paper orientation or to do double sided printing
After report: This trigger fires the report has printed or in the case of a screen report, after the report is closed following viewing. This trigger can be used to update a global variable if u r returning the number of pages in a report. It is also used to delete temporary table used to print the report
Data Model Triggers
Formula Column, Group Filter, Parameter values
Layout Model Triggers
7. What is Format triggers.
Format triggers enable you to modify the display of objects dynamically at run time or to suppress display altogether
For Headings, for repeating frames, for field, for boilerplate object
To format a column based on certain criteria for example
i) To format the max(Sal) for particular department.
ii) To format the Sal column with a Dollar($) prefix.
iii) To format Date formats….etc
8. What is Data Model?
Data Model is logically group of the Report Objects through query and Data model tools . Once query is compiled report automatically generates group. The queries build the groups ant then Groups are used to populate the report. The only function of queries in report is to create the groups. The Report Editor's Data Model view enables you to define and modify the data model objects for a report. In this view, objects and their property settings are represented symbolically to highlight their types and relationships. To create the query objects for your data model, you can use the Report Wizard, Data Wizard, or the Query tools in the tool palette.
9. What is Layout model?
Layout Model is to Physically arrange Data model group objects on the Report. The Report Editor's Layout Model view enables you to define and modify the layout model objects for a report. In this view, objects and their property settings are represented symbolically to highlight their types and relationships.
10 What is Livepreviewer?
Ans: The Live Previewer is a work area in which you can preview your report and manipulate the actual, or live data at the same time. In the Live Previewer you can customize reports interactively, meaning that you can see the results immediately as you make each change.
To activate buttons in the Live Previewer, you must display the report output in the Runtime Previewer. In order to edit your report, such as changing column size ,move columns, align columns insert page numbers, edit text, change colors, change fonts set format masks, insert field the Live Previewer must be in Flex Mode.
Access
Title
Viewing region
Rulers
Grid
Toolbar
Style bar
Tool palette
Status bar
11. What is Parameter Form
Ans: Parameters are variables for report that users can change at runtime immediately prior to the execution of the report. You can use system parameters to specify aspects of report execution, such as the output format, printer name , mailed or number of copies. We can also create own parameters through sql or Pl/sql at runtime.
The Parameter Form view is the work area in which you define the format of the report's Runtime Parameter Form. To do this, you define and modify parameter form objects (fields and boilerplate).
When you run a report, Report Builder uses the Parameter Form view as a template for the Runtime Parameter Form. Fields and boilerplate appear in the Runtime Parameter Form exactly as they appear in the Parameter Form view. If you do not define a Runtime Parameter Form in the Parameter Form view, Report Builder displays a default Parameter Form for you at runtime.
12. What is Query?
The first thing in data model is the query. Through query we access database objects with sql query. Compiled query creates groups. We can create query through query builder, sql query and import query from o/s file or database.
13. What is Group?
Ans: Groups are created to organize the columns in your report. When you create a query, Report Builder automatically creates a group that contains the columns selected by the query. You create additional groups to produce break levels in the report, either manually or by using the Report Wizard to create a group above or group left report.
14 What is Repeating Frame?

Ans: Repeating frames surround all of the fields that are created for a group’s columns.
Repeating frames correspond to groups in the data model. Each repeating frame must to be associated with a group of data model The repeating frame prints (is fired) once for each record of the group.
15. What is Reference Cursor?

A ref cursor query uses PL/SQL to fetch data. Each ref cursor query is associated with a PL/SQL function that returns a strongly typed ref cursor. The function must ensure that the ref cursor is opened and associated with a SELECT statement that has a SELECT list that matches the type of the ref cursor.
You base a query on a ref cursor when you want to:
n more easily administer SQL
n avoid the use of lexical parameters in your reports
n share datasources with other applications, such as Form Builder
n increase control and security
n encapsulate logic within a subprogram
Furthermore, if you use a stored program unit to implement ref cursors, you receive the added benefits that go along with storing your program units in the Oracle database.
16. What is Template?
Ans: Templates define common characteristics and objects that you want to apply to multiple reports. For example, you can define a template that includes the company logo and sets fonts and colors for selected areas of a report. And properties of the objects also
Creation of Template: In Report editor , open a existing Template or Create a new Template and save it concerned directory. Then Edit CAGPREFS.ORA File , and Specify which type of Template are u going to develop.
Ex. Tabular, form, matrix Then give your developed template *.tdf file name.
Develop Report with Newly developed Template.
17 what is Flex mode and Confine mode?
Confine mode
On: child objects cannot be moved outside their enclosing parent objects.
Off: child objects can be moved outside their enclosing parent objects.
Flex mode:
On: parent borders "stretch" when child objects are moved against them.
Off: parent borders remain fixed when child objects are moved against them.
18. What is Page Break?

Ans: To limit the records per page.
19 What is Page Protector?
Ans: The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page. Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page. Ex: if you set yes, the object information print another page.
Print Condition
The print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame.
20 What is Print Direction?
Ans: The Print Direction property is the direction in which successive instances of the repeating frame appear.
21 What is Vertical and Horizental Elacity
Ans: The Horizontal Elasticity property is how the horizontal size of the object will change at runtime to accommodate the objects or data within it:
22.What is Place holder Columns?
Ans: A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object. You can set the value of a placeholder column is in a Before Report trigger , A report level formula column(if the place holder column is at report level) A formula column in the place holder group or a group below it
Uses of place holder columns enables u to populate multiple columns from one piece of code. U can calculate several values in one block of pl/sql code in a formula column and assign each value into a different placeholder column. U therefore create and maintain only program unit instead of many.
Store a Temporary value for future reference. EX. Store the current max salary as records are retrieved.
23 What is Formula Column?
Ans: A formula column performs a user-defined computation on another column(s) data, including placeholder columns.
24 What is Summary columns?
Ans: A summary column performs a computation on another column's data. Using the Report Wizard or Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, % total. You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries: first, last, standard deviation, variance.
25 What is Boilerplate?
Ans: Boilerplate is any text or graphics that appear in a report every time it is run. Report Builder will create one boilerplate object for each label selected in the Report Wizard (it is named B_
Column name). Also, one boilerplate object is sometimes created for each report summary. A boilerplate object is owned by the object surrounding it, unless otherwise noted.
26 What is Data Link
When we join multiple quires in a report the join condition is stored in the data link section
Data links relate the results of multiple queries. A data link (or parent-child relationship) causes the child query to be executed once for each instance of its parent group. When you create a data link in the Data Model view of your report, Report Builder constructs a clause (as specified in the link's Property Palette) that will be added to the child query's SELECT statement at runtime. You can view the SELECT statements for the individual parent and child queries in the Builder, but can not view the SELECT statement that includes the clause created by the data link you define.
27 What is filter and Group Filter
28.What is Query Builder
Ans: it’s a gui tool to build a query in Report Wizard, Data Wizard or Data model.
29 What is Break Column?
Ans: We can break a column through data model , it Display once for a group
30.How do u call Report From form?

Ans: RUN_PRODUCT and RUN_REPORT_OBJECT
40. HOW CAN U CREATE TWO FORMATS
USING DISTRIBUTION WE CAN CREATE DIFFERENT FORMATS
45 HOW TO DISPLY ONE RECORD PER PAGE ( WHICH PROPERTY WE SHOULD SET)
Set Repeating Frame Properties : Maximum records per page=1 And it will override group filter property.
In Data model Layout , Group Property Through Filter Type & No of records to display
Property, Values are First, last, pl/sql
47. What is Header ,Body, Trailer, and Footer in Reports
Header: The header consist of on e or more pages that are printed before report proper. The type of
Information you might want to print title of the page ,company logo and address or chart the
Summarizes the report.
Trailer: The trailer consists of one or more pages that print after the report itself, usually used for nothing more than an end of report blank page, but also used for a report summary or chart.
Body: The body is where all the main report objects are placed
Margin: the report layout only governs the part of the pages designated for the main data portion of the report. The margins are can be used to specify page headers and page footers.
49. what are Executable file definitions in Reports
Report Builder (RWBLD60.EXE)
n Reports Runtime (RWRUN60.EXE)
n Reports Convert (RWCON60.EXE)
n Reports Background Engine (RWRBE60.EXE)
n Reports Server (RWMTS60.EXE)
n Reports Web Cartridge (RWOWS60.DLL)
n Reports CGI (RWCGI60.EXE)
n Reports Queue Manager (RWRQM60.EXE)
n Reports Launcher (RWSXC60.EXE)
n Reports ActiveX Control (RWSXA60.OCX)
What are the Non_query fields?
Aggregated Information, Calculated information, A string Function
Can I highlight and change all the format masks and print conditions of a bunch of fields all at once?
You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once.
How do I change the printed value of a field at runtime?
Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value.
That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure.
The syntax is SRW.Set_Field_char (0,) and the output of the object that the current trigger is attached to will be replaced by .
There are also SRW.set_fileld_num and SRW.set_field_date for numeric or date fields.
While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totals
Report Bursting
The capability of producing multiple copies of a given report or portion of it in different output formats is referred to as report bursting.
Additional Layout:
Additional layout created for to different format using same query and groups without modifying default layout created by report wizard., we can use both layouts according to user requirement.
System Variables as Source Field In Layout Editor
Ans: Current date, Page Number, Panel number, Physical Page Number, Total Pages,
Total Panels, Total Physical Pages.
Link File : Is a special type of boilerplate, that doesn’t have to remain constant for each report run
The type of file contents, can be Text, Image, CGM, Oracle drawing format, or image URL
Source filename :the name of the file the u want link to the report Through import Image from

ORA-29280: invalid directory path

0 comments

Before moving furthur in this post, please check if the directory has full permissions (Read, Write, Execute) or not. The error will also occour when there are no permissions to the directory. Once you set full permissions to the directory, try to run the program and if it still errors with the 'invalid directory path' error then please proceed furthur below for some more solutions....

Cause: A corresponding directory object does not exist.
Action: Correct the directory object parameter, or create a corresponding directory object with the CREATE DIRECTORY command.

We can derieve the directory object parameter from the following sql query:

-------------------------------------

SELECT VALUE
FROM v$parameter
WHERE NAME = 'utl_file_dir';

-------------------------------------

We can also use the CREATE DIRECTORY feature instead of UTL_FILE_DIR for directory access verification.

Up to 8i, Oracle refused to access a file that is not pointed to in the utl_file_dir parameter in the init.ora file. In Oracle 9i, in order to access a file, either the utl_file_dir parameter must be set, or one has to create a directory.

Steps to create a example directory entry:

sql> Connect apps/apps
sql> create directory CESDIR_COMMON as '/home/common';
sql> grant read on directory CESDIR_COMMON to public;

Buyer Setup

0 comments

1) In HRMS ‘People > Enter and maintain’, Create New Employee whose Last name must be same as User name Which we are logged in. Go to Assignment; Enter Org, Position and Job. Save the record.

2) In Sysadmin ‘Security > User > Define’, Query for the user & enter ‘person’ field with employee name created in HRMS. Save the record.

3) In PO’ Setup >Personal > Buyers ‘, Create new buyer for our user. Now we can create a PO

4) In PO’ Setup >Approvals > Approval groups ’, Create an approval group.

5) Go to ‘Setup >Approvals > Approval Assignments’, Select the position ( as given in HRMS) and assign approval group for different document types. Now we can approve Documents

Query to find the list of Parameters of a Concurrent Program

0 comments

select column_seq_num
      ,END_USER_COLUMN_NAME    
      ,description
      ,enabled_flag
      ,required_flag
      ,display_flag
      ,flex_value_set_id
from FND_DESCR_FLEX_COL_USAGE_VL a
where DESCRIPTIVE_FLEXFIELD_NAME='$SRS$.XXCAMARJ' --XXCAMARJ is short name of CP

To disable the Concurrent Program from Backend

0 comments

To disable the Concurrent Program from Backend
whenever sqlerror continue
SET ECHO OFF
SET SERVEROUTPUT ON
SET LINESIZE 200

BEGIN
  fnd_program.enable_program('XXCAMARJ',     --CP Short Name
                             '9GS Financials', -- Application Name
                             'N');               --Enable Flag 'Y' or 'N'
EXCEPTION
  WHEN OTHERS THEN
    dbms_output.put_line('Main Exception : '||sqlerrm);
END;
/

Oracle Apps Stuff in Net

2 comments

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/

Retrieve IP Address and Host Name using PL/SQL

0 comments

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('apps.ora.com'));
    DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_NAME('192.168.4.157'));
END;

How to disable a parameter based on the other parameter

0 comments

Requirement
-----------
There are 2 parameters, First parameter is independent value set and second parameter is Table value set. First parameter contains two values 'Summarized' and 'Detailed'.Second parameter contains the values like 100,200,300,400, etc.

Now while submitting the concurrent program the second parameter should be in disables mode and when we enter the First parameter value as 'Detailed' then only the second parameter should be enabled. If the First parameter is null or if we enter the value as 'Summarized' then it should be in disabled mode.

Solution
--------
For this we have to take one extra parameter that is dummy parameter along with First and Second parameters.

Parameter Seq,
1.First Parameter
2.Dummy Parameter
3.Second Parameter

1.First Parameter Properties,
Name: First_param
value set: First_param_vs (Table or Independent value set)
required check box: based on the requirement.
Default type/ Default Value : Null
display check box: Checked or based on the requirement.

2.Dummy Parameter
Name: Dummy_param
value set: Dummy_param_vs (Table)
required check box: Checked.
Default type: Sql Statement
Default value: select decode(:$FLEX$.First_param_vs,'Detailed',1,null) from dual
display check box: Unchecked.
Value Set
Table: (select decode(:$FLEX$.First_param_vs,'Detailed',1,null) x from dual) y
id: y.x

3.Second Parameter
Name: Second_param
value set: Second_param_vs (Table)
required check box: based on the requirement.
Default type/ Default Value : Null
display check box: Checked or based on the requirement.
Value Set
Table: Table Name
id: table_name.column_name
where: :$FLEX$.Dummy_param_vs = 1

Want to forcefully kill any session

0 comments

alter system kill session 'sid,serial#'

e.g.
altery system kill session '123,5325';

Delete Duplicate Rows From A Table

1 comments

1) DELETE FROM EMP E1
WHERE ROWID >(SELECT min(ROWID)
FROM EMP E2
WHERE E1.EMP_ID = E2.EMP_ID);

2) DELETE FROM EMP E1
WHERE E1.EMP_ID IN (SELECT E2.EMP_ID
FROM EMP E2
WHERE E1.EMP_ID = E2.EMP_ID
AND E1.ROWID > E2.ROWID);


Ur's
AmarAlam

Monday 22 April 2013

Multi-Org or Multiple Organization Access (MOAC) in R12

0 comments

What is MOAC?
Multi-Org or multiple organization access (MOAC) is basically an ability to access multiple operating units from a single application responsibility.

Why it has been created?
Prior to R12, end users use to toggle / switch / change responsibilities in order to do transactions (like invoice / payment processing in AP) in different operating units. This is a very time consuming and inefficient way of recording transactions when you have 100s of operating units specially Internet based organizations who have worldwide operations in almost all the countries. To address this, a new feature in R12 has been introduced in which user can switch between operating units within a responsibility something similar to “Change Organization” feature in inventory. Prior to R12, user would have to switch responsibilities in order to enter transactions in respective operating units (tagged to the responsibility).

What are its advantages?
Multi-Org Access Control (MOAC) enables companies that have implemented a Shared Services operating model to efficiently process business transactions by allowing them to access, process and report on data for an unlimited number of operating units within a single applications responsibility.
This increases the productivity of Shared Service Centers, as users no longer have to switch application responsibilities when processing transactions for multiple operating units at a time.
Ability to view data from multiple operating units from a single responsibility, gives users more information. This enables them to make better decisions.
The following SQL will dump out the Security Profiles and Operating Unit Names assigned to them.

SELECT   psp.SECURITY_PROFILE_NAME,
         psp.SECURITY_PROFILE_ID,
         hou.NAME,
         hou.ORGANIZATION_ID
FROM     PER_SECURITY_PROFILES psp,
         PER_SECURITY_ORGANIZATIONS pso,
         HR_OPERATING_UNITS hou
WHERE    pso.SECURITY_PROFILE_ID = psp.SECURITY_PROFILE_ID
         AND pso.ORGANIZATION_ID = hou.ORGANIZATION_ID;
There are three Profile Options you need to be aware of related to Multi-Org that should be set at the Responsibility Level.
MO: Security Profile- Always evaluated first.
MO: Operating Unit- Secondary priority being evaluated after ‘MO: Security Profile’
MO: Default Operating Unit- Sets the default Operating Unit for transactions when running under a Security Profile.

How it is done in R12?
In Release 12, one creates a Security Profile and assigns as many operating units as you required. One can tie that security profile to a single responsibility using a profile option called MO: Security Profile. For example, you could assign the security profile to the EMEA Payables responsibility to allow that responsibility to process invoices across all operating units.
In Release 12, define a security profile in HR using the Security profile form or the Global Security profile form, and assign all of the operating units that one would want a responsibility to access. The one needs to run a concurrent request called “Run Security List Maintenance” from HR which will make those security profile available and allow one to assign them to a responsibility via a profile option called MO: Security Profile.
One can define another profile option called MO: Default Operating Unit which is optional and allows one to specify a default operating unit that will be the default when you open different subledger application forms.


Ur's
AmarAlam

Steps to create a XML Publisher Report

0 comments

1] Add the “Xml Publisher Administrator” Responsibility to the user through the front end.
2] Create the Report(Data Model or we can say the .Rdf file) using Oracle Report Builder.
3] Set the user parameter as p_conc_request_id.
4] Add the default values to the Before Report and After Report triggers(not mandatory)
5] Ftp the Report to the Cust_Top/Report/Us.
6] Open the Oracle E-Business Suite then go to Sysadmin>Concurrent>Program>Executables, Here we have to create one executable file for that Rdf.
7] Then go to Sysadmin>Concurrent>Program>Define, Here we have to make a Concurrent Program for that Executable. Make sure that the output format must be XML.
8] Goto the Sysadmin>Security>Responsibility>Define. Query for the Xml Publisher Administrator. See the Request Group attached to this. Attach the Concurrent Program to this Request Group.
9] Design the template in Ms Word(Using the .Rtf file).
10] Goto responsibility XML PUBLISHER ADMINISTRATOR. Then Goto HOME>DATA DEFINITION>CREATE DATA DEFINITION and create a new data definition. Make sure that your Data Definition’s Code should be same as Concurrent Program’s Short Name used by you to create the Rdf file.
11] Now go to Xml publisher administrator>Home>Template. Create a new template with template type=’Rtf’. Then upload the RTF File by browsing the path.
12] Now go to the Responsibility and run the request.


Ur's
AmarAlam

Oracle Reports Introduction

2 comments

Oracle Reports, the high-fidelity enterprise reporting tool, enables businesses to give immediate access to information to all levels within and outside of the organization in a scalable and secure environment. Using Oracle Reports, you can publish information from any data source, in any format (PDF, HTML, printed, XML, etc.), to any destination (Web, Portal, e-mail, file, etc.) in a scalable, efficient manner.

The main features are:
1. You can access data from any data source
2. You can obtain the report data in a graphical representation by a query builder
3. You can use default report templates or you can customize it if needed
4. A live editor that allows you to modify paper report layouts in WYSIWYG (“what you see is what you get”) mode.
5. The ability to add dynamic report output to an HTML page by embedding custom JavaServer Page (JSP) tags within an HTML document.
6. You can graphically represent report data with the help of  integrated chart builder
7. You can use various web publishing tools that dynamically generate Web pages based on your data
8. You can show the report data in various formats such as HTML, HTMLCSS, XML, PDF, PCL (Printer Control Language), Postscript, and ASCII Support for run-time customization.
9. You can execute dynamic SQL statements within PL/SQL procedures
10. Seamless integration of Oracle Reports with OracleAS Portal for administering report security
11. The ability to publish report output to portlets.

Designing Reports:
Before you create a report using any report-writing software, you must first consider the type of report that you are being asked to produce. You will have a specification of the needs, required output, and the expected publishing medium, but you also need to know the underlying structure that supports the requirement and the most efficient way to retrieve data.

Common report styles:
The majority of report requirements fall into the following categories:
Tabular: One group
Master-detail: Master-detail hierarchy (may be several levels).
Master and multiple details: Two or more detail groups at the same level.
Matrix: Two masters, one detail.

Running a Report:
There are many ways of running a report, depending on the application design. You can call a report from:
A Web browser.

1. An OracleAS Portal application
2. The command line, using the Start > Run option in Windows
3. The OracleAS Reports Queue Manager
4. A Java application
5. A database trigger
6. A customized menu in a Forms application
7. A button in a Forms application.

Supported File Types:
RDF: Report Definition File: binary file containing source code
REP: Report: binary file without source code
JSP: JavaServer Page format
HTML: HyperText Markup Language
XML: Extensible Markup Language.

Reports Builder Modules:
The Reports Builder interface enables you to create a number of different types of modules, and it provides a Report Editor in which you can view the structure and objects in a report module. The Reports Builder module types are:

Report: A report definition
Template: A skeleton definition containing common style and standards
PL/SQL Library: A stand-alone library containing PL/SQL program units—procedures, functions, packages—that can be called from multiple reports.
Report Data and Layout:
A report definition defines two main parts of a report and brings them together in the output.
Data: Data structure and data to be displayed
Layout: Formatting information about how the data appears in the output
Each report module can have a data model, a paper layout, and a Web layout. The data model, as well as program units, can be shared by the paper and Web layouts.
A report can consist of:

A data model and a paper layout.
A data model and a Web layout.
A data model, a paper layout, and a Web layout.

Reports Builder Components
Object Navigator:
The Object Navigator is a hierarchical browsing and editing interface that enables you to locate and manipulate application objects quickly and easily.
Report Editor:
The Report Editor contains different views to help you handle the data objects and layout objects for Web and paper reports.
Property Inspector:
All objects in a module, including the module itself, have properties that you can see and modify in the Property Inspector.
PL/SQL Editor:
The PL/SQL Editor enables you to create and compile program units such as procedures, functions, and packages within the current report.
Wizards in Reports Builder:
Wizards provide an easy step-by-step interface for commonly performed tasks. The wizards in Reports Builder are:
Report Wizard: The Report Wizard guides you through the steps to create a basic paper report. Each page of the wizard asks you for information to help you create your initial report.
Data Wizard: This wizard helps you quickly define or modify a query for a multiquery data models.
Graph Wizard: You can add a variety of charts and graphs, including true 3-dimensional graphs, to a report using the Graph Wizard. Charting is implemented in Reports Builder with the Oracle BI graph bean.
Report Block Wizard: This wizard enables you to quickly create a JSP report by embedding report data into a Web page using Reports custom JSP tags.


Ur's
AmarAlam

Flex mode and Confine mode

0 comments

Confine mode:

On: child objects cannot be moved outside their enclosing parent objects.
Off: child objects can be moved outside their enclosing parent objects.

Flex mode:

On: parent borders “stretch” when child objects are moved against them.
Off: parent borders remain fixed when child objects are moved against them.


Ur's
AmarAlam

Registering Reports in Oracle Application

0 comments

Steps Required for Registering a Simple Report:

1. Create a Report using Report Builder.
2. Compile and copy .RDF file in module specific directory.
3. Register the executable with System Administrator Module.
4. Define the Concurrent Program.
5. Assign the executable to Concurrent Program.
6. Assign the Concurrent Program to Request Group.
7. Assign the Request Group to the Responsibility.
8. Assign the Responsibility to the User.

Registering Parametric Reports:

1. Create a Report using Report Builder with parameters.
2. Compile and copy .RDF file in module specific directory.
3. Register the executable with System Administrator Module.
4. Define the Value set to validate the parameters.
5. Define the Concurrent Program.
6. Assign the executable to Concurrent Program.
7. Define Parameters.
8. Assign Value Set to the Parameters.
9. Assign bind parameter of yours to the TOKEN.
Note: Token is used to map bind parameters with the formal parameters of the Concurrent Program.
10. Assign the Concurrent Program to Request Group.
11. Assign the Request Group to the Responsibility.
12. Assign the Responsibility to the User.
To reference the values of Prior Parameters of a particular program into the values of other parameter is based on the Value Set.
The value of the 1st parameter is to be referenced in where clause of the 2nd Parameter.
WHERE Deptno = :$FLEX$.First_Parameter.


Ur's
AmarAlam

Summary column vs. Formula Column vs. Placeholder Column

0 comments

We use these columns in our oracle reports, but always have few doubts about which column to use for what purposes. Here are few brief differences among these columns and the purpose of their use in oracle reports.

Summary column:
It summarizes another column and can recalculate for each record in a specified group. The following properties apply specifically to summary columns:
Function: The calculation to be performed on the values of the column specified in Source.
Source: The name of the column whose values are to be summarized.
Reset At: The group at which the summary column value resets to zero.
Compute At: The group for which a % of Total summary column is computed.
The datatype of a summary column depends on the data type of the source of the summary. If you change the data type of the source column, the datatype of the summary also changes. The Report Wizard does not support page summaries. If you select a page summary in the Field tab of the Report Wizard, an error message appears.

Formula Column:
A formula column performs a user-defined computation on the data of one or more other columns. A formula column executes a PL/SQL function and must return a value. The value can be Character, Number, or Date and returned value must match data type.

Placeholder Column:
A placeholder column is an empty container at design time. The placeholder can hold a value at run time that has been calculated and placed into it by PL/SQL code from another object.Using placeholder columns, you can Populate multiple columns from one piece of code. You can calculate several values in one block of PL/SQL code in a formula column and assign each value to a different placeholder column. Thus, you create and maintain only one program unit instead of many. Store a temporary value for future reference. For example, store the current maximum salary as records are retrieved.

A Scenario:
The goal is to design a salary report of all employees. The aim of the report is to Calculate and temporarily store the name of the employee who earns the highest salary in the company. Display the highest earner and the maximum salary once at the beginning of the report.

For this report, you need to create the following columns:
A summary to show the maximum salary for the company.
A placeholder to contain the highest earner’s name at run time.
A formula to:
Compare each employee salary with the maximum salary. Populate the placeholder with the employee name if salary equals maximum salary.


Ur's
AmarAlam

User Exits in Oracle Reports

0 comments

We can integrate Oracle reports with Oracle Application Object Library, and run them as concurrent programs from your forms or through standard request submission.
These are the user exits available in Oracle Reports that makes AOL integration.

FND SRWINIT
FND SRWEXIT
FND FORMAT_CURRENCY
FND FLEXIDVAL
FND FLEXSQL
FND SRWINIT

This is a User Exit which sets your profile option values and allows Oracle AOL user exits to detect that they have been called by oracle repots.
It must be included if one is using any ORACLE APPLICATION OBJECT LIBRARY features in his report (such as concurrent processing).

FND SRWINIT:
also allows your report to use the correct organization automatically.
Can be used in BEFORE-REPORT Trigger.
Syntax is : SRW.USER_EXIT(‘FND SRWINIT’);

FND SRWEXIT:
This user exit ensures that all the memory allocated for AOL user exits has been freed up properly.
Can be used in AFTER- REPORT Trigger.
Syntax is : SRW.USER_EXIT(‘FND SRWEXIT’);

FND FORMAT_CURRENCY:
To format the currency amount dynamically depending upon the precision of the actual currency value, standard precision, users profile values and location (country) of the site.
You obtain the currency value from the database into an Oracle Reports column.
Define another Oracle Reports column, a formula column of type CHAR, which executes the FORMAT_CURRENCY user exit to format the currency value.
A displayed field has this formula column as its source so that the formatted value is automatically copied into the field for display.
Syntax:

FND FORMAT_CURRENCY
CODE=:column containing currency
DISPLAY_WIDTH=field width for display
AMOUNT=:source column name
DISPLAY=:display column name
[MINIMUM_PRECISION=:P_MIN_PRECISION]
[PRECISION={STANDARD|EXTENDED}]
[DISPLAY_SCALING_FACTOR=:P_SCALING_FACTOR]
FND FLEXSQL:
Call this user exit to create a SQL fragment usable by your report to tailor your SELECT statement that retrieves flexfield values. This fragment allows you to SELECT flexfield values or to create a WHERE, ORDER BY, GROUP BY, or HAVING clause to limit or sort the flexfield values returned by your SELECT statement. You call this user exit once for each fragment you need for your select statement. You define all flexfield columns in your report as type CHARACTER even though your table may use NUMBER or DATE or some other datatype.
Syntax:

FND FLEXSQL
CODE=”flexfield code”
APPL_SHORT_NAME=”application short name”
OUTPUT=”:output lexical parameter name”
MODE=”{ SELECT | WHERE | HAVING | ORDER BY}”
[DISPLAY="{ALL | flexfield qualifier | segment number}"]
[SHOWDEPSEG="{Y | N}"]
[NUM=":structure defining lexical" | MULTINUM="{Y | N}"]
[TABLEALIAS="code combination table alias"]
[OPERATOR="{ = | < | > | <= | >= | != | "||" | BETWEEN | QBE}"]
[OPERAND1=":input parameter or value"]
[OPERAND2=":input parameter or value"]

FND FLEXIDVAL:
Call this user exit to populate fields for display. You pass the key flexfields data retrieved by the query into this exit from the formula column. With this exit you display values, descriptions and prompts by passing appropriate token (any one of VALUE, DESCRIPTION, APROMPT or LPROMPT).
Syntax:

FND FLEXIDVAL
CODE=”flexfield code”
APPL_SHORT_NAME=”application short name”
DATA=”:source column name”
[NUM=":structure defining source column/lexical"]
[DISPLAY="{ALL|flexfield qualifier|segment number}"]
[IDISPLAY="{ALL|flexfield qualifier|segment
number}"]
[SHOWDEPSEG="{Y | N}"]
[VALUE=":output column name"]
[DESCRIPTION=":output column name"]
[APROMPT=":output column name"]
[LPROMPT=":output column name"]
[PADDED_VALUE=":output column name"]
[SECURITY=":column name"]



Ur's
AmarAlam