Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Tuesday, July 23, 2013

Purge Obsolete Workflow Runtime Data (FNDWFPR)

Use the standard concurrent program FNDWFPR "Purge Obsolete Workflow Runtime Data" to purge old data from the Oracle Workflow tables regularly.

This program purges obsolete runtime information associated with work items, including status information, any associated notifications, and, if the ECX: Purge ECX data with WF profile option is set to Y, any associated Oracle XML Gateway transactions. By default, it also purges obsolete design information, such as activities that are no longer in use and expired ad hoc users and roles, and obsolete runtime information not associated with work items, such as notifications that were not handled through a workflow process and, if the ECX: Purge ECX data with WF profile option is set to Y, Oracle XML Gateway transactions that were not handled through a workflow process. You can optionally choose to purge only core runtime information associated with work items for performance gain during periods of high activity, and purge all obsolete information as part of your routine maintenance during periods of low activity.
Note: This program does not delete ad hoc users or roles whose expiration date is null. To ensure that ad hoc users and roles are purged in a timely fashion after they are no longer needed, estimate how long they should be active and specify an appropriate expiration date when you call WF_DIRECTORY.CreateAdHocUser(), WF_DIRECTORY.CreateAdHocRole(), or WF_DIRECTORY.CreateAdHocRole2() to create them.
To preserve electronic signature evidence for future reference, this program by default does not delete any notifications that required signatures or their associated signature information. If you do not need to maintain signature evidence, you can choose to delete signature-related information as well.
Navigate to the Submit Requests form in Oracle E-Business Suite to submit the Purge Obsolete Workflow Runtime Data concurrent program. When you install and set up Oracle E-Business Suite and Oracle Workflow, your system administrator needs to add this concurrent program to a request security group for the responsibility that you want to run this program from. See: Overview of Concurrent Programs and Requests, Oracle E-Business Suite System Administrator's Guide - Configuration and Running Reports and Programs, Oracle E-Business Suite User's Guide.
You can supply the following parameters for the Purge Obsolete Workflow Runtime Data concurrent program:

  • Item Type - The item type to purge. Leaving this field blank defaults to purging the runtime data for all item types.
  • Item Key - The item key to purge. Leaving this field blank defaults to purging the runtime data for all item keys.
  • Age - Minimum age of data to purge, in days. The default is0.
  • Persistence Type - The persistence type to be purged, either Temporary or Permanent. The default is Temporary
  • Core Workflow Only - Enter 'Y' to purge only obsolete runtime data associated with work items, or 'N' to purge all obsolete runtime data as well obsolete design data. The default is 'N'.
  • Commit Frequency - The number of records to purge before the program commits data. To reduce rollback size and improve performance, set this parameter to commit data after a smaller number of records. The default is 500 records.

    Note: After performing a commit, the program resumes purging work items with the next subsequent begin date. In some cases, if additional items have the same begin date as the last item that was purged before a commit, the program may not purge all eligible items. To purge these remaining work items, simply rerun the program.
  • Signed Notifications - Enter 'N' to preserve signature evidence, including notifications that required electronic signatures and their associated signature information. Enter 'Y' to purge signature-related information. The default is 'N'.

Useful Information about Workflow Background Process Concurrent Program

What is the purpose of Workflow Background Process

Workflow Background Process is a concurrent program which is run for processing deferred activities, timed out activities, and stuck processes using the parameters specified. The background engine executes all activities that satisfy the given arguments at the time that the background engine is invoked. This procedure does not remain running long term, so you must restart this procedure periodically. Any activities that are newly deferred or timed out or processes that become stuck after the current background engine starts are processed by the next background engine that is invoked.
Workflow Background Process is run with the help of Workflow Background Engine which is PL/SQL Procedure which runs this concurrent program with specified parameters.
Workflow Background Process Parameters:
  • Item Type – Specify an item type to restrict this engine to activities associated with that item type. If you do not specify an item type, the engine processes any activity regardless of its item type.
  • Minimum Threshold – Specify the minimum cost that an activity must have for this background engine to execute it, in hundredths of a second.
  • Maximum Threshold – Specify the maximum cost that an activity can have for this background engine to execute it, in hundredths of a second. By using Minimum Threshold and Maximum Threshold you can create multiple background engines to handle very specific types of activities. The default values for these arguments are null so that the background engine runs activities regardless of cost.
  • Process Deferred – Specify whether this background engine checks for deferred activities. Setting this parameter to Yes allows the engine to check for deferred activities.
  • Process Timeout – Specify whether this background engine checks for activities that have timed out. Setting this parameter to Yes allows the engine to check for timed out activities.
  • Process Stuck – Specify whether this background engine checks for stuck processes. Setting this parameter to Yes allows the engine to check for stuck processes.
 Note: Make sure you have a least one background engine that can check for timed out activities, one that can process deferred activities, and one that can handle stuck processes. At a minimum, you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes.

How to run Workflow Background Process from Oracle Applications?

1. Responsibility: System Administrator
2. Navigate: Requests > Run
3. Select Workflow Background Process from the list of values.
4. Enter parameters:
Item Type = OM Order Line
Process Deferred = yes
Process Timeout = yes
5. Submit concurrent program.

How to run Workflow Background Process from SQL*Plus?

BEGIN
  wf_engine.background (itemtype=>NULL ,
                        process_deferred=>TRUE ,
                        minthreshold=>NULL ,
                        maxthreshold=>NULL ,
                        process_timeout=>FALSE ,
                        process_stuck=>FALSE);
END;

How to run Workflow Background Process from Unix?

$ $FND_TOP/Admin/Sql/wfbkg.sql

Performance Tuning of Workflow Background Process

Workflow Background Process picks and executes all eligible workflow items related to Oracle Modules like OM,AP,PO,WSH,OKL,ASN,WIP, etc
Hence if ItemType parameter is not specified the workflow background process runs will first check for all eligible workflow activities and then run for all eligible workflows this will result in poor performance. It is preferable to execute the Workflow Background Process with specified ItemType.

Thursday, July 18, 2013

"Purge Concurrent Request and/or Manager Data" Concurrent program

Purge Concurrent Request and/or Manager Data 

One of the important area of Concurrent Manager tuning is monitoring the space usage for the subsets within each concurrent manager. When the space in FND_CONCURRENT_PROCESSES and FND_CONCURRENT_REQUESTS exceed 50K, you can start to experience serious performance problems within your Oracle Applications. When you experience these space problems, a specific request called "Purge Concurrent Requests And/Or Manager Data" should be scheduled to run on a regular basis. This request to purge can be configured  the request data from the FND tables as well as the log files and output files on accumulate on disk.

When the tables FND_CONCURRENT_REQUESTS and FND_CONCURRENT_PROCESSES reaches above 3000-4000 rows, the performance diminishes.You have to run Purge Concurrent Request and/or Manager Data program on a regular basis depending on the amount of request being run.

Find Size in KB for FND_CONCURRENT_REQUESTS

sql> SELECT (BYTES/1024)/1024 "Size in KB" from dba_segments where SEGMENT_NAME='FND_CONCURRENT_REQUESTS';
O/P   Size in KB
          ----------
          3.65

SQL> SELECT (BYTES/1024)/1024 "Size in KB" from dba_segments WHERE SEGMENT_NAME='FND_CONCURRENT_PROCESSES';
O/P :      Size in KB
              ----------
              10.75

The Purge Concurrent Request and/or Manager Data program job can be used to purge Requests,Mgr Logs
and all requests depending on what is choosen.

Use the following options: Enter=ALL, Mode =Age, Mode Value=15 

How to Purge Concurrent Request and/or Manager Data

Loigin to frontend with sysadmin responsibility:
Navigate :
System Administrator -- Concurrent - Requests
Click on Submit a New Request -- Select Single Request click ok
Enter Name as Purge Concurrent Request and/or Manager Data

Entity - ALL / Request / Manager

ALL - Purges records from database tables that record history information for concurrent requests,concurrent managers, and purges request log files, manager log files, and report output files from the operating system.
Request - Purges records from database tables that record history information for concurrent requests, and purges request log files and report output files from the operating system.
Manager - Purges records from database tables that record history information for concurrent managers, and purges manager log files from the operating system. 

Mode - Age / Count

Age - Enter the number of days for which you want to save concurrent request history, log files, and report output files. The purge program deletes all records older (in days) than the number you enter. For example, if you enter "5", then all concurrent request history, log files, and report output files older than five days is purged.
Count - Enter the number of (most recent) records for which you want to save concurrent request history, log file, and report output files. The purge program starts from the most recent records, retains the number you enter, and purges all remaining records. For example, if you enter "5", then the five most recent concurrent request history records, request log files, manager log files, report output files are saved, and all remaining records are purged.

Mode Value - Value

Mode Value - Enter a value to define the number of days for Mode=Age or the number of records for Mode=Count. The valid values are 1 - 9999999

Then Submit.

The database tables that are affected by running the Purge Concurrent Request and/or Manager Data program are:

FND_CONCURRENT_REQUESTSThis table contains a complete history of all concurrent requests.
FND_RUN_REQUESTS
When a user submits a report set, this table stores information about the reports in the report set and the parameter values for each report.
FND_CONC_REQUEST_ARGUMENTSThis table records arguments passed by the concurrent manager to each program it starts running.
FND_DUAL
This table records when requests do not update database tables.
FND_CONCURRENT_PROCESSESThis table records information about Oracle Applications and operating system processes.
FND_CONC_STAT_LIST
This table collects runtime performance statistics for concurrent requests.
FND_CONC_STAT_SUMMARYThis table contains the concurrent program performance statistics generated by the Purge Concurrent Request and/or Manager Data program. The Purge Concurrent Request and/or Manager Data program uses the data in FND_CONC_STAT_LIST to compute these statistics.


SQL queries for iSupport, OM, Install base, Service Contracts

Isupport
---------
SELECT p3.party_name Customername, p3.party_number Customernumber, p1.person_first_name' 'p1.person_middle_name' 'p1.person_last_name Contactname, hzc1.email_address Emailaddress, hzc2.raw_phone_number Primaryphonenumber, hca.cust_account_id, p3.party_id 
FROM ibu_multi_parties mul, 
hz_parties p1, 
hz_parties p3, 
hz_relationships r,
fnd_user u, 
apps.hz_cust_accounts hca, 
apps.HZ_CONTACT_POINTS hzc1, 
apps.HZ_CONTACT_POINTS hzc2, 
apps.hz_party_preferences pref 
WHERE mul.party_id = r.party_id 
AND mul.enable_flag = 'Y' 
AND p3.party_type = 'ORGANIZATION' 
AND p3.party_id = r.object_id 
AND r.subject_id = p1.party_id 
AND p1.party_type = 'PERSON'
AND u.employee_id IS NULL 

AND r.relationship_code IN ('EMPLOYEE_OF', 'CONTACT_OF') 
AND TRUNC (NVL (u.end_date, SYSDATE + 1)) >= TRUNC (SYSDATE) 
AND u.user_id NOT IN ( SELECT user_id FROM jtf_um_usertype_reg WHERE status_code IN ('PENDING', 'UPGRADE_APPROVAL_PENDING')) AND u.user_id = mul.user_id 
AND u.user_id = fnd_global.user_id 
AND hca.party_id = p3.party_id 
AND hzc1.owner_table_name(+) = 'HZ_PARTIES' 
AND hzc1.contact_point_type(+) ='EMAIL' 
AND hzc2.owner_table_name(+) = 'HZ_PARTIES' 
AND hzc2.contact_point_type(+) = 'PHONE' 
AND hzc1.primary_flag(+) = 'Y' 
AND hzc2.primary_flag(+) = 'Y' 
AND hzc1.owner_table_id(+) = u.customer_id 
AND hzc1.owner_table_id = hzc2.owner_table_id(+) 
AND pref.party_id = r.party_id 
AND pref.module='IBU_ACCOUNT' 
AND pref.category = 'PRIMARY_ACCOUNT' 
AND pref.preference_code='CUSTOMER_ACCOUNT_ID' 
AND mul.current_party = 'Y' 
AND hca.cust_account_id = Decode(pref.value_number,NULL,hca.cust_account_id,0,hca.cust_account_id,pref.value_number)
OM
----
SELECT loc.location_id ShipLocId ,loc.address1', 'loc.address2', 'loc.address3', 'loc.city', 'loc.postal_code', 'loc.state', 'loc.country ShipAdd, hcsu.site_use_id ship_site_use_id 
FROM apps.hz_parties hp ,
apps.hz_party_sites hps ,
apps.hz_locations loc ,
apps.hz_cust_accounts_all hca ,
apps.hz_cust_acct_sites_all hcas ,
apps.hz_cust_site_uses_all hcsu
where hps.party_id = hp.party_id 
AND loc.location_id = hps.location_id 
AND hca.party_id = hp.party_id 
AND hcas.party_site_id = hps.party_site_id 
AND hcas.cust_account_id = hca.cust_account_id 
AND hcas.CUST_ACCT_SITE_ID = hcsu.cust_acct_site_id 
AND hcsu.site_use_code = 'SHIP_TO' 
AND hcas.org_id = hcsu.org_id 
AND hcas.org_id = NVL(hca.org_id,hcas.org_id)
AND hca.cust_account_id = NVL(:1,hca.cust_account_id)
AND NVL(hcsu.status,'I') = 'A' 
INSTALL BASE
-----------------
SELECT distinct KFV.attribute12 Model_type, CII.serial_number serial_number, HZA.cust_account_id cust_account_id
FROM CSI_ITEM_INSTANCES CII,
CSI_IP_ACCOUNTS CIA, 
CSI_I_ORG_ASSIGNMENTS CIOA,
CSI_I_PARTIES CIP,
CSI_II_RELATIONSHIPS CIR, 

CSI_INSTANCE_STATUSES CIS, 
CSI_LOOKUPS CL, 
CSI_LOOKUPS CL3, 
CSI_SYSTEMS_VL CSV, 
MTL_SYSTEM_ITEMS_KFV KFV, 
OE_AGREEMENTS A1, 
ASO_I_OE_ORDER_HEADERS_V OOH, 
ASO_I_OE_ORDER_LINES_V OOL, 
HZ_CUST_ACCOUNTS HZA, 
HZ_PARTIES HZP 
WHERE CII.SYSTEM_ID = CSV.SYSTEM_ID(+) 
AND CII.INSTANCE_TYPE_CODE = CL.LOOKUP_CODE(+)
AND CL.LOOKUP_TYPE(+) = 'CSI_INST_TYPE_CODE' 
AND CII.LAST_OE_AGREEMENT_ID = A1.AGREEMENT_ID(+)
AND CII.INSTANCE_STATUS_ID = CIS.INSTANCE_STATUS_ID 
AND CII.INVENTORY_ITEM_ID = KFV.INVENTORY_ITEM_ID 
AND KFV.ORGANIZATION_ID = CII.INV_MASTER_ORGANIZATION_ID 
AND CIR.RELATIONSHIP_TYPE_CODE = CL3.LOOKUP_CODE(+) 
AND CL3.LOOKUP_TYPE(+) = 'CSI_INSTANCE_VERSION_LABELS'
AND CII.LAST_OE_ORDER_LINE_ID = OOL.LINE_ID(+) 

AND OOL.HEADER_ID = OOH.HEADER_ID(+)
AND HZA.CUST_ACCOUNT_ID= CIA.PARTY_ACCOUNT_ID 
AND HZA.PARTY_ID = HZP.PARTY_ID 
AND CII.INSTANCE_ID = CIR.SUBJECT_ID(+)
AND CIR.RELATIONSHIP_TYPE_CODE (+)= 'COMPONENT-OF'
AND CIR.ACTIVE_END_DATE(+)IS NULL 
AND CII.INSTANCE_ID = CIOA.INSTANCE_ID (+) 
AND CIOA.RELATIONSHIP_TYPE_CODE (+) = 'SOLD_FROM'
AND CII.INSTANCE_ID = CIP.INSTANCE_ID 
AND CIP.RELATIONSHIP_TYPE_CODE = 'OWNER' 
AND CIP.PARTY_SOURCE_TABLE = 'HZ_PARTIES' 
AND CIP.INSTANCE_PARTY_ID = CIA.INSTANCE_PARTY_ID (+) 
AND CIA.RELATIONSHIP_TYPE_CODE(+) = 'OWNER' 
AND CIA.ACTIVE_END_DATE(+) IS NULL 
AND NOT EXISTS ( SELECT 1 FROM CSI_INSTALL_PARAMETERS CIPM WHERE CIPM.INTERNAL_PARTY_ID = CIP.PARTY_ID )
AND CII.serial_number IS NOT NULL;
SERVICE CONTRACTS
------------------------
select DECODE(coverage1,NULL,'No Coverage',coverage1) Service_Coverage,DECODE(warranty1,NULL,'No',warranty1) Warranty from ( Select MAX(DECODE(cov.NAME,'Servicepass Complete',Decode(cle.sts_code,'ACTIVE',cov.NAME,NULL),'Servicepass Standard',Decode(cle.sts_code,'ACTIVE',cov.NAME,NULL),'Qualitypass',Decode(cle.sts_code,'ACTIVE',cov.NAME,NULL),NULL)) coverage1 , MAX(DECODE(cov.NAME,'WARRANTY',Decode(cle.sts_code,'ACTIVE','Yes','No'),NULL)) warranty1 
FROM okc_k_lines_b cle, 
oks_k_lines_b kln, 
okc_k_lines_tl cov, 
okc_line_styles_tl lse, 
okc_statuses_tl sts, 
okc_k_items cit, 
OKS_AUTH_LINES_V x
WHERE cle.cle_id IS NULL 
AND kln.cle_id = cle.ID 
AND lse.ID = cle.lse_id 
AND lse.LANGUAGE = USERENV ('LANG') 
AND cit.cle_id = cle.ID 
AND cit.jtot_object1_code IN ('OKX_SERVICE', 'OKX_WARRANTY', 'OKX_USAGE', 'OKS_SUBSCRIPTION') 
AND sts.code = cle.sts_code
--AND sts.meaning NOT IN ('Terminated') 
AND sts.LANGUAGE = USERENV ('LANG') 
AND cov.ID(+) = kln.coverage_id 
AND cov.LANGUAGE(+) = USERENV ('LANG') 
AND x.CLE_ID = cle.id 
AND ( x.id IN ( select cle_id from okc_k_items where dnz_chr_id = cit.dnz_chr_id and object1_id1 IN (select instance_id from csi_item_instances where 1 = 1 and SERIAL_NUMBER =NVL(:1,SERIAL_NUMBER)))))

http://oracle-apps-support.blogspot.com/2010/07/queries-for-use.html

Tuesday, July 16, 2013

What is Back Order in OM? How are Backorders Handled

What is Back Order in OM? How are Backorders Handled

What is Back order? When it occurs?
In the Back Order the material gets unreserved. .  Backorders caused by Pick Releasing (PR) 
order lines when there is no or not enough stock available.  And backorders caused by shipping less,
 at Ship confirm, than what was released.
How are Backorders handled /processed?
As in previous releases, Order Management and Shipping Execution has two types of   Backorders.
 Backorders caused by Pick Releasing (PR) order lines when there is no or not enough stock available.  And backorders caused by shipping less, at Ship confirm, than what was released.
 
 A. Backorders after Pick Releasing with Insufficient Stock
Pick Release will process all order (more correctly shipping) lines that you selected when 
submitting PR.  It will create move order lines for each line, whether there is stock available or not.  You (or the system) will however, not be able to (auto) detail and (auto) Pick Confirm the lines where there is not enough stock available.  In R11i, you cannot switch off reservations for PR.  Also, the system will not print pick slips for lines that are not detailed.
 
The delivery line, which was 'Ready to Release' before running PR will be split into a quantity
 that was available for picking and a unavailable quantity.  The first delivery line will become 
status ‘Released’ (Pick Confirmed), the second 'Submitted for Release' (Move Order created, but not confirmed).  In the latter case, the ‘Details Required' status is checked.  The order line will not split at this point, but receives a 'Picked partial' status.  After Ship Confirming the Released delivery line, the original order line will be split into a 'Shipped' and a 'Submitted for Release' line  (unless the shipped quantity falls within the under shipment tolerance).  The latter will be available  for Pick Release as a 'Backorder' as soon as there is stock available.  On the sales order, there is no order or workflow status called 'Backorder'.  You will not really see any difference between a scheduled order line that was never released and a backordered line. Pick Release is able to distinguish between the two, because it allows you to release them separately.

B. Backorders Caused by shipping less than what was Released
Before Ship Confirming a Released (Pick Confirmed) delivery line, you have the option to update the shipped quantity.  If the shipped quantity is less than the picked quantity, you have can either designate the remaining quantity as 'Backordered' (meaning the quantity was lost somewhere along the picking/staging process) or leave it in staging in to assign it to a different delivery (i.e. truck was full and wait for next pick up). At Ship Confirm, any staged quantities will be split off in a separate delivery line that is immediately ready to be shipped in a subsequent delivery.  A backordered quantity will remain noted on the same delivery line.  Only when the original delivery line is interfaced through Inventory Interface/Order Management Interface, will the order line be split into a line for the shipped quantity and a new line for the backordered quantity (Awaiting shipping).  This enables you to pick the remaining quantity again in order to fulfill the complete order quantity.  This split will only happen if the backordered quantity is greater than the Under Shipment Tolerance.

What is EDI ?

EDI stands for Electronic Data Interchange


To understand the need for EDI, lets take a business flow and transactions involved. Company "C" is a manufacturer and regularly buys raw material from Supplier "S" that would typically involve below transactions for each purchase done. 

1. Buyer at Customer "C" enters a Purchase Order in his computer system
2. Buyer sends the PO through email or fax or mail to Supplier "S"
3. Sales team at Supplier "S" validates the PO to ensure that required information is provided
4. Sales team at Supplier "S" enters a Sales Order in his computer system
5. Sales team at Supplier "S" sends the Sales Order acknowledgment to Customer "C" through email or fax or regular mail

Imagine the cost, cycle time, money and risks of data entry errors involved in the above process. What if computer system at Customer "C" exchanges data with computer system at Supplier "S" using an intermediate communication link ? Yes, that's the idea behind EDI.

Organizations that send or receive documents between each other are referred to as "trading partners" in EDI terminology. Trading partners are free to use any method for the transmission of documents. Few of the transmission mediums used are Value Added Network (VAN), Internet/AS and Web EDI.

EDI translation software, popularly known as Translator, validates the partner and checks if the data received meets the standard formats defined before converting it to a desired file format which can be read and imported by the receiver's computer systems (for e.g. ERP)

EDIFACT & X12 are most widely followed EDI standards. The standards prescribe the formats, character sets, and data elements used in the exchange of business documents and forms. 

Oracle e-Commerce gateway (earlier EDI gateway) module helps organizations meet their EDI requirements with flexibility to use choice of your translator, EDI standard and yet tightly integrates with other modules from Oracle.


Oracle eCommerce Gateway Overview

The Oracle Gateway resides between the Oracle Applications and the EDI Translator. The Gateway processes data between Oracle Applications and the EDI Translator using ASCII interface flat files.

The EDI Translator accommodates the standards and all the monitoring of transmitting standard formatted data between Trading Partners. For outbound data, the EDI Translator maps data from the Oracle interface flat files to any standards of choice. For inbound data, the EDI Translator maps data from the standards of choice to the Oracle interface flat file. The format and content of this flat file can be easily adjusted using the open interface definition table within the Oracle Gateway, though any changes that are made should also be implemented within the EDI Translator set-up.

The Gateway processes data via an interface file which is received from or sent to the EDI Translator. The Gateway is independent of all standard formats since only the business data is found in the Oracle Gateway defined interface files. Additionally, the Oracle Gateway provides general code conversion functions for data such as Unit of Measure, Shipping Codes, Payment Terms, and determines the Trading Partner EDI validation/authorization between the Oracle application and the EDI Translator.

Inbound Transactions
For inbound transactions Oracle Gateway populates the Application Open Interfaces within the Oracle Application products. All of the necessary application logic to validate and load data is provided by the Application Programming Interface code (APIs), i.e. not by the Gateway. The Gateway only populates the relevant Application Open Interface tables recognized by the APIs for the specific EDI message/transaction.



Process Flow
The Oracle Gateway performs the following functions during an inbound transaction process after it receives an interface file from the EDI Translator or other process:

• Gets Trading Partner validation processing parameters
• Applies code conversions (if set up and activated).
• Loads valid data into the appropriate Oracle Application Open Interface tables for the transaction.
• e-Commerce Gateway captures transaction data exceptions. These exceptions can be reviewed on-line from the staging tables to examine the exception condition. The correction action is performed in a trading partner set up or other application set up. The transaction can then be revalidated.

Outbound Transactions
For outbound transactions, the Gateway extracts the data from the base Application tables. Also, it may optionally extract data from other files/tables using the built-in extensible architecture using ‘Extension’ tables. The use of Extension tables requires customization of standard code packages provided with the Oracle Gateway if the user has need of this function.



Process Flow
The Oracle Gateway outbound transaction process creates interface data files to support any EDI Standard that is available from the EDI Translator.

The Oracle Gateway collects all of the business data needed to map to a standard EDI transaction/message which the receiving Trading Partner can interpret properly into their receiving application using their equivalent of the Gateway/EDI Translator set up.

The Oracle Gateway does the following:

• Gets Trading Partner processing parameters, e.g. location codes, allowable/enabled EDI transactions/messages, etc.,
• Extracts data from the Oracle base applications tables relevant to the EDI transaction/message being processed.
• Optionally, retrieves data from customer defined extension tables (requires some customization).
• Applies code conversions (when set up and activated).
• Populates Oracle Gateway interface tables with all the data gathered.
• Sets the data extract flags in the base Oracle Application table to prevent subsequent extraction.
• Produces an interface data file for use by the EDI Translator.

Note

The Oracle Gateway does not have communication software to transmit the standard formatted data between Trading Partners. The Oracle Gateway relies on the EDI Translator being connected to third party communication service providers to transmit data to, or receive data from, Trading Partners after the data is mapped to the desired standard format.


Data flow for Order-to-Cash cycle


1. Order Entry: 
This is first stage when Order in enter in system.When the order is entered it basically create a record in order headers and Order Lines table.
Enter header details: Once you enter details on the order header and save it or move it to lines, record goes to one table oe_order_headers_all flow_status_code = ENTERED, booked_flag = N), Primary key=HEADER_ID
No record exist in any other table for this order till now.
Enter Line details for this order: Enter different item numbers, quantity and other details in line tab. When the record gets saved, it goes to one table. Order header details will be linked with line details by order HEADER_ID. oe_order_lines_all (flow_status_code = ENTERED, booked_flag = N, open_flag = Y) Primary key= LINE_ID 


2.Order Booking:


This is next stage, when Order is booked then the Flow status changed from Entered to Booked. At this stage, these below table get affected.
oe_order_headers_alL (flow_status_code as BOOKED, booked_flag updated to Y)
oe_order_lines_all (flow_status_code as AWAITING_SHIPPING, booked_flag updated Y)
wsh_delivery_details (DELIVERY_DETAIL_ID is assigned here, released_status ‘R’ ready to release, LINE_ID comes as SOURCE_LINE_ID)
wsh_delivery_assignments (DELIVERY_ASSIGNMENT_ID is assigned for DELIVERY_DETAIL_ID present in wsh_delivery_details, DELIVERY_ID remains blank till this stage)
*In shipping transaction form order status remains “Ready to Release”.
At the same time, Demand interface program runs in background And insert into inventory tables mtl_demand, here LINE_ID come as a reference in DEMAND_SOURCE_LINE
3. Reservation :


This step is required for doing reservations SCHEDULE ORDER PROGRAM runs in the background and quantities are reserved. Once this program get successfully get completed, the mtl_demand and mtl_reservations table get updated. LINE_ID gets updated in DEMAND_SOURCE_LINE_ID in both the tables.
4. Pick Release :


Pick Release is the process of putting reservation on on-hand quantity available in the inventory and pick them for particular sales order.
Pick release can be done from ‘Release Sales Order’ form or ‘Pick release SRS’ program can be scheduled in background. In both of these cases all lines of the order gets pick released depending on the Picking rule used. If specific line/s needs to be pick release it can be done from ‘Shipping Transaction form. For this case Pick Release is done from ‘Release Sales Order’ form with Pick Confirm=NO.
Once pick release is done these are the tables get affected:
If step 3 is not done then MTL_RESERVATIONS gets updated now.
wsh_new_deliveries (one record gets inserted with SOURCE_HEADER_ID= order header ID, status_code=OP =>open)
wsh_delivery_assignments (DELIVERY_ID gets assigned which comes from wsh_new_deliveries) wsh_delivery_details (released_status ‘S’ ‘submitted for release’)
MTL_TXN_REQUEST_HEADERS
MTL_TXN_REQUEST_LINES (LINE_ID goes as TXN_SOURCE_LINE_ID)
(move order tables. Here request is generated to move item from Source (RM or FG) sub-inventory to staging sub-inventory)
Mtl_material_transactions_temp (link to above tables through move_order_header_id/line_id, this table holds the record temporally)
MTL_SERIAL_NUMBERS_TEMP (if item is serial controlled at receipt then record goes in this table)
MTL_SERIAL_NUMBERS (enter value in GROUP_MARK_ID )
*In shipping transaction form order status remains “Released to Warehouse” and all the material still remains in source sub-inventory. We need to do Move Order Transaction for this order. Till this no material transaction has been posted to MTL_MATERIAL_TRANSACTIONS
5.Pick Confirm/ Move Order Transaction:Items are transferred from source sub-inventory to staging Sub-inventory. Here material transaction occurs.
Order line status becomes ‘Picked’ on Sales Order and ‘Staged/Pick Confirmed’ on Shipping Transaction Form.
MTL_MATERIAL_TRANSACTIONS_TEMP (Record gets deleted from here and gets posted to MTL_MATERIAL_TRANSACTIONS)
oe_order_lines_all (flow_status_code ‘PICKED’ )
MTL_MATERIAL_TRANSACTIONS (LINE_ID goes as TXN_SOURCE_LINE_ID)
mtl_transaction_accounts
wsh_delivery_details (released_status becomes ‘Y’ => ‘Released’ )
wsh_delivery_assignments
MTL_ONHAND_QUANTITIES
MTL_SERIAL_NUMBERS_TEMP (record gets inserted after putting details for the item which are serial controlled at ‘Sales order issue’)
MTL_SERIAL_NUMBERS (record gets inserted after putting details for the item which are serial controlled at ‘Sales order issue’)
* This step can be eliminated if we set Pick Confirm=YES at the time of Pick Release



6.Ship Confirm:


Here ship confirm interface program runs in background. Data removed from wsh_new_
deliveries.
The items on the delivery gets shipped to customer at this stage.
oe_order_lines_all (flow_status_code ‘shipped’)
wsh_delivery_details (released_status ‘C’ ‘Shipped’, SERIAL_NUMBER if quantity is ONE)
WSH_SERIAL_NUMBERS (records gets inserted with the DELIVERY_DETAIL_ID reference, only in case of shipped quantity is two or more)
mtl_transaction_interface
mtl_material_TRANSACTIONS (linked through Transaction source header id)
mtl_transaction_accounts
Data deleted from mtl_demand, MTL_reservations
Item deducted from MTL_ONHAND_QUANTITIES
MTL_SERIAL_NUMBERS_TEMP (records gets deleted from this table)
MTL_SERIAL_NUMBERS (Serial number stauts gets updated CURRENT_STATUS=4 , ‘Issued out of store’)



7.Enter Invoice:


After shipping the order the order lines gets eligible to get transfered to RA_INTERFACE_LINES_ALL. Workflow background engine picks those records and post it to RA_INTERFACE_LINES_ALL. This is also called Receivables interface, that mean information moved to accounting area for invoicing details. Invoicing workflow activity transfers shipped item information to Oracle Receivables. At the same time records also goes in the table RA_INTERFACE_SALESCREDITS_ALL which hold details of sales credit for the particular order.
ra_interface_lines_all (interface table into which the data is transferred from order management) Then Autoinvoice program imports data from this table which get affected into this stage are receivables base table. At the same time records goes inra_customer_trx_all (cust_trx_id is primary key to link it to trx_lines table and trx_number is the invoice number)ra_customer_trx_lines_all (line_attribute_1 and line_attribute_6 are linked to order number and line_id of the orders)
8.Complete LineIn this stage order line level table get updated with Flow status and open flag.oe_order_lines_all (flow_status_code ‘shipped’, open_flag “N”)

9.Close Order:


This is last step of Order Processing. In this stage only oe_order_lines_all table get updated. These are the table get affected in this step.
oe_order_lines_all (flow_status_code ‘closed’, open_flag “N”)
oe_order_HEADERS_all