Hiển thị các bài đăng có nhãn AR. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn AR. Hiển thị tất cả bài đăng

Chủ Nhật, 20 tháng 11, 2016

Join condition between RA_CUSTOMER_TRX_ALL and OE_ORDER_HEADERS_ALL/LINES_ALL

Here is the query to find link of Sales Orders with their corresponding Invoices
/**************************************************************************
 *PURPOSE: To find link of Sales Orders with their corresponding Invoices *
 *AUTHOR: Shailender Thallam                                              *
 **************************************************************************/
SELECT ooh.order_number, ool.line_number, ool.ordered_item,
       ool.ordered_quantity * ool.unit_selling_price,
       rcta.trx_number invoice_number, rcta.trx_date, rctl.line_number,
       rctl.unit_selling_price, ooh.org_id
  FROM oe_order_headers_all ooh,
       oe_order_lines_all ool,
       ra_customer_trx_all rcta,
       ra_customer_trx_lines_all rctl
 WHERE ooh.header_id = ool.header_id
   AND rcta.interface_header_context = 'ORDER ENTRY'
   AND rctl.interface_line_context = 'ORDER ENTRY'
   AND rctl.interface_line_attribute1 = TO_CHAR (ooh.order_number)
   AND rctl.interface_line_attribute6 = TO_CHAR (ool.line_id)
   AND rctl.customer_trx_id = rcta.customer_trx_id
   AND ooh.order_number = NVL (:p_order_number, ooh.order_number)
--AND  ooh.org_id=nvl(:p_org_id,ooh.org_id)
;

What is MO_GLOBAL.INIT and When to Use MO_GLOBAL.INIT?

Before reading this post, if you are new to Multi Org and MOAC then read: MOAC – Oracle Apps ORG_ID, Multi Org Concept

What is MO_GLOBAL.INIT ?

MO_GLOBAL.INIT will read the “MO: Operating Unit” and “MO: Security Profile” profile option values from the current context (responsibility/user) and will initialize access to Multiple Organizations.

How does MO_GLOBAL.INIT initialize access to Multiple Organizations?

MO_GLOBAL.INIT will be executed in multi org environment, this API takes application short name as input and finds values for “MO: Operating Unit” and “MO: Security Profile” in the current context(responsibility/user). If the application being initialized is turned on with Multi-Org Access Control then access will be allowed for all the Operating Units under the security profile. (Note: Query for table FND_MO_PRODUCT_INIT to know if an application is turned on for multiple organizations access or not)

What if MO Profiles are not configured

If “MO: Security Profile” is configured then “MO: Operating Unit” is ignored, If “MO: Security Profile” isnot configured and “MO: Operating Unit” is configured then the application being initialized is granted access only to a particular organization configured in “MO: Operating Unit”.
If both “MO: Operating Unit” and “MO: Security Profile” are not configured then its a critical error and MOAC will not function.

When should we use MO_GLOBAL.INIT?

  1. MO_GLOBAL.INIT should be used in Multi Org environment
  2. MO_GLOBAL.INIT will be called every time after logging into the application or whenever there is a switch in context/responsibility

Sample Usage of MO_GLOBAL.INIT

--Use this before API call
mo_global.init ('AR');