EDIs with Oracle Apps R12

Friday, November 9, 2012 by Ajay Atre

EDIs with Oracle Apps R12
Inbound and outbound flow of EDI.

 Typical Oracle EDIs available which can fit in various process-
·         8X series is Customer EDIs
·         9x series is warehouse EDIs

Where does EDIs fit in Process –
As an example- take a manufacturing company let’s say ABC Corp. with third party logistics warehouse as PQR,
Order creation -
Customer places an order via EDI850, ABC Corp. receives order in oracle Customer service personal books the order.
Order Booking -
Scheduled EDI940 picks us the eligible orders (Booked orders) and sends electronic communication to warehouse PQR, letting them know about they need to ship the order.
On the side note as the order is booked another scheduled program EDI855 picks the eligible orders (Booked orders) and sends them to Customer letting them know as an order is acknowledged.
Order Pick release and shipping -
Warehouse PQR ships the order based on decided criteria (Like LIFO) and sends EDI945 information which can contain lots, shipped quantity etc. to ABC Corp. Scheduled EDI945 program at ABC Corp. processes the order according the ship information received from PQR and pick releases/ship confirms the order in oracle.
As the order is closed scheduled EDI856 program picks the eligible orders (shipped orders) and sends electronic information as ship advise to Customer, by which customer knows order is shipped.
Invoice generation-
Once the Invoice is generated the scheduled EDI810 program picks the invoices and sends them to Customer.

IRISO cycle –
ABC. Corp creates requisition in oracle with the intention to send the inventory at its third party logistics (PQR here). The requisition then becomes the ISO (Internal Sales order) and is shipped form ABC Corp. Scheduled EDI943 program picks eligible orders (Internal shipped orders) and sends electronic receipt advise to warehouse PQR.
PQR in return after receiving good physically sends EDI944 information to ABC Corp. The scheduled EDI944 program at ABC Corp. then processes the file and receives the goods as an receiving transaction to its oracle PQR warehouse.

EDI explanation
Customer EDIs
EDI850- Order import EDI, Customer places the order and is then get imported in oracle.
EDI860- Order changes from Customer. Customer places order changes like quantity change, line cancellation, ship date changes etc.
EDI855- Order Acknowledgement to Customer EDI, customer is informed for order is booked.
EDI856- Shipment advise to Customer EDI, Customer is informed for order is shipped.
EDI810- Invoice to Customer EDI. Invoice information is sent Via EDI810

Third party logistics warehouse EDIs
EDI940- Order advise to warehouse EDI, Warehouse gets an electronic information about the order which then warehouse prepares for shipping.
EDI945- Order ship advise from warehouse EDI, Warehouse sends electronic information about order ship info like what lot number, how much qty etc.
EDI943- Receiving advise to warehouse. For internal order scenario (IR ISO), order is shipped internally and is expected to receive to warehouse to create inventory. EDI 943 sends the internal order ship information to warehouse.
EDI944- Warehouse receipt advise EDI. Warehouse sends electronic information about how the internal order (IR ISO) is received at warehouse.
EDI947 IN- Warehouse sends inventory adjustments via EDI. Inventory adjustments like cycle count, product damage adjustment etc.
EDI947 OUT- Main Company sends the lot status information to warehouse; lot status can contain a list of lots which are good to be FG shipping, Quality hold etc. This is to let warehouse know what lots to ship against the order.

Prerequisites -
For setting up the EDIs one must think of below prerequisites,
1.   EDI processing Engine- Can be a professional organization or an in-house capability. The processing engine will deal with customer/third party warehouse about how to get connected (various ways available like VAN, AS2 or FTP).
2.   FTP capabilities- This can be provided by EDI processing engine if not then custom UNIX based concurrent programs can be used to achieve to and from FTP requirements.
3.   FTP server/Shared Directories – You can have FTP server associated across oracle ERP system or you can have shared directories (between middle tier or DB tier) by which Oracle extraction/load programs can read and write data as an when needed.
4.   EDI jobs- As a seeded program oracle does provides a list of handful ready to use EDI programs which can be used to perform particular EDI. The only issue with the seeded programs is customization and debugging the exceptions. Alternate and more controlled approach can be having a custom program which can use the APIs/interfaces available to load/extract the data.
5.   Trading partner setup- EDI entities (customer or warehouse) will provide a unique ID (translator code) by which you can have the trading partner setup done in oracle E-Commerce responsibility by which you can then define which transactions wanted to do with EDI entities (customer or warehouse).
6.   EDI exception mechanism- You can have a common exception mechanism which can report all exceptions based on the particular EDIs/operating unit selected.
7.   EDI exception email mechanism- You can have a email utility developed which can be used to email with EDI exception report as an attachment to a designated user community.




Setups with E-Commerce responsibility-
Define the trading partners
E-Commerce Responsibility- Navigation: Setup/ Trading Partners
Customer EDIs Trading partner setup

Click on New to create new setup or click on open
Select the customer and site which you want to map with EDI

On the customer master site setup- assign the EDI location code (EDI location code is a unique ID by which customer deals with the site)
 Once defined click on the details tab


Warehouse EDIs Trading partner setup
Oracle as a seeded does not provide the 9X series of the EDIs so we need to use available customer EDIs with to map with warehouse EDIs

EDI940/945,947 IN and 947 OUT

For example
Map at warehouse level
EDI855- mapped as EDI940, EDI947 out
EDI856 IN - mapped as EDI945, EDI947 IN

For example see below defining for M1 as M1 is whs so we don’t need to assign customer below

But define the above transaction in details tab.

EDI943/944

Map at customer level (In IRISO we created ISO against the customer where we want to send the inventory as receipt, so the customer is internal customer by warehouse for example M1 Seattle customer if you are shipping from V1 whs)
EDI856 OUT- mapped as EDI943
EDI856 IN- mapped as EDI944

For example below ORATEST_INTERNAL_CUSTOMER is internal customer

E-Commerce Category-
You can define the category by which you one can decide the substitution value for both incoming and outgoing EDIs.
The direction column below shows options like IN, OUT or Both


Import/extract Programs -
Oracle as seeded provides below import programs

 For example 850

Extract programs

For example EDI810 program



Custom Programs logic-
As I said earlier issue with the standard program is customization and control.
The real time solution can be using the custom developed programs for each individual EDIs above using APIs/interfaces.

Custom Import Programs –
Incoming FTP Program (Unix shell script program) - which can download the available EDI files from EDI processing engine to incoming directory. This program can be scheduled.

Import program can be constructed as
1.   Load program – have the unix shell script program which can construct all available files into one single file (for example if its EDI 850 then it will club all EDI 850 flat files) and then feed the file name to PLSQL data load program
2.   PLSQL data load program- is the program which will take input from above program and will process the file and load the data (using UTL_FILE utility) into oracle staging tables.
3.   Validate/import program – Validated the necessary validations and if passed through imports the data using APIs/interfaces.
4.   Exception Report program- if there are any exceptions during load/ validate programs this program can report those.
5.   Exception email program- will email the exceptions; this program can be scheduled and can send email at particular interval.

EDI 850 – is an incoming EDI where we need to import the sales order in oracle.
We can use oe_order_pub.process_order APIs to get the order imported in oracle.

            oe_order_pub.process_order (p_api_version_number          => p_api_version_number
                                       ,p_init_msg_list               => fnd_api.g_false
                                       ,p_return_values               => fnd_api.g_false
                                       ,p_action_commit               => fnd_api.g_false
                                       ,x_return_status               => l_return_status
                                       ,x_msg_count                   => l_msg_count
                                       ,x_msg_data                    => l_msg_data
                                       ,p_header_rec                  => l_header_rec
                                       ,p_header_adj_tbl              => l_header_adj_tbl
                                       ,p_line_tbl                    => l_line_tbl
                                       ,p_line_adj_tbl                => l_line_adj_tbl
                                       ,p_action_request_tbl          => l_action_request_tbl
                                       ,x_header_rec                  => x_header_rec
                                       ,x_header_val_rec              => x_header_val_rec
                                       ,x_header_adj_tbl              => x_header_adj_tbl
                                       ,x_header_adj_val_tbl          => x_header_adj_val_tbl
                                       ,x_header_price_att_tbl        => x_header_price_att_tbl
                                       ,x_header_adj_att_tbl          => x_header_adj_att_tbl
                                       ,x_header_adj_assoc_tbl        => x_header_adj_assoc_tbl
                                       ,x_header_scredit_tbl          => x_header_scredit_tbl
                                       ,x_header_scredit_val_tbl      => x_header_scredit_val_tbl
                                       ,x_line_tbl                    => x_line_tbl
                                       ,x_line_val_tbl                => x_line_val_tbl
                                       ,x_line_adj_tbl                => x_line_adj_tbl
                                       ,x_line_adj_val_tbl            => x_line_adj_val_tbl
                                       ,x_line_price_att_tbl          => x_line_price_att_tbl
                                       ,x_line_adj_att_tbl            => x_line_adj_att_tbl
                                       ,x_line_adj_assoc_tbl          => x_line_adj_assoc_tbl
                                       ,x_line_scredit_tbl            => x_line_scredit_tbl
                                       ,x_line_scredit_val_tbl        => x_line_scredit_val_tbl
                                       ,x_lot_serial_tbl              => x_lot_serial_tbl
                                       ,x_lot_serial_val_tbl          => x_lot_serial_val_tbl
                                       ,x_action_request_tbl          => x_action_request_tbl
                                       );

EDI 945 –
EDI945 can do pick release and ship confirm of the order, below are some APIs by which entire process can be accomplished.
1.   Create reservation
         inv_quantity_tree_pvt.clear_quantity_cache;
         inv_reservation_pub.create_reservation (p_api_version_number          => 1.0
                                                ,p_init_msg_lst                => fnd_api.g_true
                                                ,x_return_status               => l_api_return_status
                                                ,x_msg_count                   => l_msg_count
                                                ,x_msg_data                    => l_msg_data
                                                ,p_rsv_rec                     => p_created_res
                                                ,p_serial_number               => l_serial_no
                                                ,x_serial_number               => l_actual_sn
                                                ,p_partial_reservation_flag    => fnd_api.g_false
                                                ,p_force_reservation_flag      => fnd_api.g_false
                                                ,p_validation_flag             => fnd_api.g_true
                                                ,p_over_reservation_flag      => l_over_reservation_flag
                                                ,x_quantity_reserved           => l_quantity_reserved
                                                ,x_reservation_id              => x_reservation_id
                                                ,p_partial_rsv_exists          => l_partial_rsv_exists
                                                ,p_substitute_flag             => l_substitute_flag
                                                );
2.   Delivery creation
               wsh_delivery_details_pub.autocreate_deliveries
                                                              (p_api_version_number          => 1.0
                                                              ,p_init_msg_list               => fnd_api.g_true
                                                              ,p_commit                      => fnd_api.g_false
                                                              ,x_return_status           => xout_return_status
                                                              ,x_msg_count               => xout_msg_count
                                                              ,x_msg_data                    => xout_msg_data
                                                              ,p_line_rows                   => l_line_rows
                                                              ,x_del_rows                    => l_del_rows
                                                              );
3.   Pick release Delivery
               wsh_deliveries_pub.delivery_action (p_api_version_number          => 1.0
                                                  ,p_init_msg_list               => fnd_api.g_true
                                                  ,x_return_status               => xout_return_status
                                                  ,x_msg_count                   => xout_msg_count
                                                  ,x_msg_data                    => xout_msg_data
                                                  ,p_action_code                 => 'PICK-RELEASE'
                                                  ,p_delivery_id                 => l_delivery_id
                                                  ,x_trip_id                     => l_trip_id
                                                  ,x_trip_name                   => l_trip_name
                                                  );
4.   Ship Confirm Delivery
            wsh_deliveries_pub.delivery_action (p_api_version_number          => 1.0
                                               ,p_init_msg_list               => fnd_api.g_true
                                               ,x_return_status               => xout_return_status
                                               ,x_msg_count                   => xout_msg_count
                                               ,x_msg_data                    => xout_msg_data
                                               ,p_action_code                 => 'CONFIRM'
                                               ,p_delivery_id                 => r_order.delivery_id
                                               ,p_sc_action_flag              => 'S'
                                               ,p_sc_intransit_flag           => 'Y'
                                               ,p_sc_close_trip_flag          => 'Y'
        ,p_sc_actual_dep_date => NVL (TRUNC (r_order.date_shipped), TRUNC (SYSDATE))
                                               ,x_trip_id                     => l_trip_id
                                               ,x_trip_name                   => l_trip_name
                                               );
5.   Close the Delivery
            wsh_ship_confirm_actions.interface_all (errbuf                        => l_errbuf
                                                   ,retcode                       => l_retcode
                                                   ,p_mode                        => 'ALL'
                                                   ,p_stop_id                     => NULL
                                                   ,p_delivery_id                 => l_delivery_id
                                                   ,p_log_level                   => 1
                                                   );

EDI 944 –
EDI944 can do the receipts in oracle. Using this program you can validate the receiving data and then insert into standard receiving interface tables
·         INSERT INTO po.rcv_headers_interface
·         INSERT INTO po.rcv_transactions_interface
·         INSERT INTO inv.mtl_transaction_lots_interface
·         If WMS being used then INSERT INTO wms_lpn_interface
·         Finally run the RCVTP
v_child_request                     :=
fnd_request.submit_request (‘PO’, ‘RCVTP’, NULL, NULL, FALSE, 'BATCH',
o   rcv_group_id, CHR (0));
·         RCVTP can be run as – immediate, batch or online.
EDI 947 IN-
Is an inventory adjustment EDI where warehouse can send adjustments like cycle count, damages, writeoffs etc.
Validate the data and then insert into
·         INSERT INTO mtl_transactions_interface
·         INSERT INTO mtl_transaction_lots_interface
·         Finally run the standard inventory transaction worker which can take care of posting the transactions
               fnd_request.submit_request ('INV'   -- Appl short name
                                          ,'INCTCW'   -- Inventory transaction worker
                                          ,NULL   -- Description
                                          ,NULL   -- Date and Time
                                          ,FALSE   -- Sub-request
                                          ,l_transaction_header_id
                                          ,3
                                          ,NULL
                                          ,NULL
                                          );




Custom Export Programs –
Outgoing extract programs can be constructed as a request set where the first stage will extract the data and stage 2 will then FTP the extracted file to the EDI processing engine.
The FTP utility can be constructed as a single concurrent unix shell program which can be shared across all outgoing jobs.

Import program can be constructed as
1.   Extract program – have the PLSQL extract done by SQL statements and generate a flat file using UTL_FILE utility. Pass on the file name to next stage.
2.   FTP Send Utility- is the common FTP program which will take input as file name and directory from above program and will FTP the file to EDI processing engine. EDI processing engine will then process the file and send it to customer.
3.   Exception Report program- if there are any exceptions during extracting and validating the data exception report can report those.
4.   Exception email program- will email the exceptions; this program can be scheduled and can send email at particular interval.

EDI 855 –
This program will send order acknowledgement to customer. Typical extraction SQL can be.
         SELECT DISTINCT *
                    FROM apps.oe_order_headers_all h
                        ,apps.oe_transaction_types_tl ot
                        ,apps.ra_salesreps_all rsa
                        ,apps.oe_order_lines_all l
                        ,hz_cust_site_uses_all ship_hcsu
                        ,hz_cust_acct_sites_all ship_hcas
                        ,hz_cust_accounts_all ship_hca
                        ,hz_parties ship_hp
                        ,hz_party_sites ship_hps
                        ,hz_locations ship_hc
                        ,apps.hz_cust_acct_sites_all bill_to
                        ,apps.hz_cust_site_uses_all bill_use
                        ,hz_party_sites bill_hps
                        ,hz_locations bill_hc
                        ,apps.ece_tp_headers eth
                        ,apps.ece_tp_details etd
                        ,ra_terms_tl rtl
                        ,qp_list_headers_tl qlht
                        ,hr_organization_units_v houv
                   WHERE 1 = 1
                     AND h.org_id = p_org_id
                     AND h.open_flag = 'Y'
                     AND h.booked_flag = 'Y'
                     AND NVL (h.cancelled_flag, 'N') != 'Y'
                     AND h.order_type_id = ot.transaction_type_id
                     AND h.salesrep_id = rsa.salesrep_id
                     AND h.header_id = l.header_id
                     AND l.flow_status_code NOT IN ('CANCELLED', 'AWAITING_RETURN', 'RETURNED', 'CLOSED')
                     AND h.ship_to_org_id = ship_hcsu.site_use_id
                     AND ship_hcsu.cust_acct_site_id = ship_hcas.cust_acct_site_id
                     AND ship_hcas.cust_account_id = ship_hca.cust_account_id
                     AND ship_hcsu.org_id = ship_hcas.org_id
                     AND ship_hca.party_id = ship_hp.party_id
                     AND ship_hcas.party_site_id = ship_hps.party_site_id
                     AND ship_hps.location_id = ship_hc.location_id
                     AND bill_to.party_site_id = bill_hps.party_site_id
                     AND bill_hps.location_id = bill_hc.location_id
                     AND h.invoice_to_org_id = bill_use.site_use_id
                     AND bill_to.cust_acct_site_id = bill_use.cust_acct_site_id
                     AND bill_to.org_id = bill_use.org_id
                     AND bill_to.cust_account_id = ship_hca.cust_account_id
                     AND ship_hcas.tp_header_id = eth.tp_header_id
                     AND etd.tp_header_id = eth.tp_header_id
                     AND etd.document_id = 'POAO'
                     AND etd.document_type = 'POAO'
                     AND etd.edi_flag = 'Y'
                     AND h.payment_term_id = rtl.term_id
                     AND qlht.list_header_id = h.price_list_id
                     AND l.ship_from_org_id = houv.organization_id
                     AND (p_order_number_list IS NULL OR (',' || p_order_number_list || ',' LIKE '%,' || h.order_number || ',%'))
                ORDER BY h.order_number;

EDI 856 –
This program will send orders shipped to customer. Typical extraction SQL can be.
         SELECT DISTINCT *
                    FROM apps.wsh_trips wt
                        ,apps.wsh_trip_stops wts
                        ,apps.wsh_trip_stops wts1
                        ,apps.wsh_new_deliveries wnd
                        ,apps.wsh_delivery_assignments wda
                        ,apps.wsh_delivery_details wdd
                        ,apps.wsh_delivery_legs wdl
                        ,apps.wsh_document_instances wdi
                        ,apps.wsh_document_instances wdi2
                        ,apps.hz_cust_site_uses_all ship_to_site
                        ,apps.hz_cust_acct_sites_all ship_to_acct
                        ,apps.hz_party_sites ship_to_party
                        ,apps.hz_locations ship_to_loc
                        ,apps.hz_cust_accounts ship_to_cust
                        ,apps.hz_cust_site_uses_all bill_to_site
                        ,apps.hz_cust_acct_sites_all bill_to_acct
                        ,apps.hz_party_sites bill_to_party
                        ,apps.hz_locations bill_to_loc
                        ,apps.hz_cust_accounts rc
                        ,apps.hz_parties hp
                        ,apps.oe_order_headers_all ooh
                        ,apps.oe_transaction_types_tl oot
                        ,apps.ece_tp_headers eth
                        ,apps.ece_tp_details etd
                        ,apps.ra_terms_tl rtt
                        ,mtl_parameters mp
                        ,oe_order_sources oos
                   WHERE 1 = 1
                     AND (p_delivery_name_list IS NULL OR (',' || p_delivery_name_list || ',' LIKE '%,' || wnd.NAME || ',%'))
                     AND ooh.org_id = p_org_id
                     AND wnd.delivery_id = wda.delivery_id
                     AND wnd.delivery_id = wdl.delivery_id
                     AND wdl.pick_up_stop_id = wts.stop_id
                     AND wdl.drop_off_stop_id = wts1.stop_id
                     AND wts.trip_id = wt.trip_id
                     AND wda.delivery_detail_id = wdd.delivery_detail_id
                     AND wdi.entity_id = wnd.delivery_id
                     AND wdi.entity_name = 'WSH_NEW_DELIVERIES'
                     AND wdi2.entity_id(+) = wnd.delivery_id
                     AND wdi2.entity_name(+) = 'WSH_DELIVERY_LEGS'
                     AND wdd.customer_id = rc.cust_account_id
                     AND rc.cust_account_id = ooh.sold_to_org_id
                     AND rc.party_id = hp.party_id
                     AND ooh.ship_to_org_id = ship_to_site.site_use_id
                     AND ship_to_site.cust_acct_site_id = ship_to_acct.cust_acct_site_id
                     AND ship_to_acct.org_id = ship_to_site.org_id
                     AND ship_to_acct.cust_account_id = rc.cust_account_id
                     AND ship_to_site.site_use_code = 'SHIP_TO'
                     AND ship_to_site.status = 'A'
                     AND wdd.source_header_id = ooh.header_id
                     AND wdd.org_id = ooh.org_id
                     AND oot.transaction_type_id = ooh.order_type_id
                     AND etd.tp_header_id = ship_to_acct.tp_header_id
                     AND eth.tp_header_id = etd.tp_header_id
                     AND etd.document_id = 'DSNO'
                     AND etd.document_type = 'DSNO'
                     AND etd.edi_flag = 'Y'
                     AND ship_to_acct.party_site_id = ship_to_party.party_site_id
                     AND ship_to_party.location_id = ship_to_loc.location_id
                     AND ship_to_cust.cust_account_id = ship_to_acct.cust_account_id
                     AND ooh.payment_term_id = rtt.term_id
                     AND ooh.invoice_to_org_id = bill_to_site.site_use_id
                     AND bill_to_acct.cust_acct_site_id = bill_to_site.cust_acct_site_id
                     AND bill_to_acct.org_id = bill_to_site.org_id
                     AND bill_to_acct.party_site_id = bill_to_party.party_site_id
                     AND bill_to_party.location_id = bill_to_loc.location_id
                     AND bill_to_acct.cust_account_id = rc.cust_account_id
                     AND mp.organization_id = wnd.organization_id
                     AND oos.order_source_id = ooh.order_source_id
                     AND wnd.status_code = 'CL'
                     AND TRUNC (wnd.confirm_date) >= '13-JUL-2010'
                ORDER BY wnd.delivery_id;



EDI 810 –
This program will send invoices to customer. Typical extraction SQL can be.
         SELECT   *
             FROM apps.ra_cust_trx_types_all ctt
                 ,apps.ra_customer_trx_all rct
                 ,apps.hz_cust_acct_sites_all ship_to
                 ,apps.hz_cust_site_uses_all ship_use
                 ,hz_party_sites hps
                 ,hz_locations ship_loc
                 ,apps.ece_tp_headers eth
                 ,apps.ece_tp_details etd
                 ,apps.hz_cust_accounts cust
                 ,hz_parties hp
                 ,apps.hz_cust_acct_sites_all bill_to
                 ,apps.hz_cust_site_uses_all bill_use
                 ,hz_party_sites hpb
                 ,hz_locations bill_loc
                 ,apps.hz_cust_acct_sites_all remit_to
                 ,hz_party_sites hpr
                 ,hz_locations remit_loc
                 ,apps.hr_organization_units hou
                 ,apps.hr_locations ship_from
                 ,apps.ra_terms term
                 ,apps.oe_order_headers_v ooh
            WHERE 1 = 1
              AND ctt.org_id = p_org_id
              AND ctt.attribute1 = 'Y'
              AND rct.org_id = ctt.org_id
              AND rct.cust_trx_type_id = ctt.cust_trx_type_id
              AND TRUNC (rct.trx_date) <= TRUNC (SYSDATE)
              AND rct.complete_flag = 'Y'
              AND NVL (rct.edi_processed_flag, 'N') = 'N'
              AND rct.edi_processed_status IS NULL
              AND ship_use.site_use_id = rct.ship_to_site_use_id
              AND hp.party_id = cust.party_id
              AND ship_to.cust_acct_site_id = ship_use.cust_acct_site_id
              AND hps.location_id = ship_loc.location_id
              AND ship_to.party_site_id = hps.party_site_id
              AND eth.tp_header_id = ship_to.tp_header_id
              AND etd.tp_header_id = eth.tp_header_id
              AND etd.document_id = 'INO'
              AND etd.document_type = 'INV'
              AND etd.edi_flag = 'Y'
              AND cust.cust_account_id = rct.bill_to_customer_id
              AND bill_use.site_use_id = rct.bill_to_site_use_id
              AND bill_to.cust_acct_site_id = bill_use.cust_acct_site_id
              AND hpb.location_id = bill_loc.location_id
              AND bill_to.party_site_id = hpb.party_site_id
              AND remit_to.cust_acct_site_id = rct.remit_to_address_id
              AND hpr.location_id = remit_loc.location_id
              AND remit_to.party_site_id = hpr.party_site_id
              AND hou.organization_id = TO_NUMBER (TRIM (rct.interface_header_attribute10))
              AND ship_from.location_id = hou.location_id
              AND term.term_id = rct.term_id
              AND ooh.order_type = rct.interface_header_attribute2
              AND ooh.order_number = TO_NUMBER (TRIM (rct.interface_header_attribute1))
              AND TRUNC (rct.creation_date) >= '21-FEB-2005'
              AND (   TO_CHAR (p_invoice_number_string) IS NULL
                   OR (',' || TO_CHAR (p_invoice_number_string) || ',' LIKE '%,' || TO_CHAR (rct.trx_number) || ',%')
                  )
         ORDER BY TO_NUMBER (invoice_number);




This explains complete EDI details and setups with oracle apps R12.
Thanks,
Ajay


Filed under , having 22 comments

Discrete Quality Setup in Oracle Apps R12

Wednesday, November 7, 2012 by Ajay Atre



Discrete Quality Setup in Oracle Apps R12

The entire process of defining data collection components, collecting, reporting, and analyzing data is summarized by the following diagram:


Collection Elements
Collection elements are the basic building blocks of collection plans, which are the data structures that you use to collect Quality results. Before you can collect Quality data, you must first create a collection plan. You begin by creating collection elements, which define the characteristics of the product or process that you want to monitor, record, and analyze.

When you define collection elements, you are creating data fields that you can use in collection plans to collect quality results. Once you create a collection element, it becomes available as a selection on a list of values that you can choose from when you set up collection plans.

For example, you can define a collection element called Color that has the values red, yellow, and blue, then use it in a collection plan where you assign it all of these values and also assign it additional values, such as orange, and green.

Collection Element Types
Collection elements are categorized by type so that they can be sorted and grouped in database searches and on reports. You assign collection element types to collection elements when you define them. Thus, you must first set up collection element types before you create collection elements.

Predefined Collection Element Types
·         Attributes- Used to stored characteristics of any object
·         Variable- Used to numeric measurements
·         Reference Information. There reference to common objects in Oracle Applications like PO, SO, WIP etc.

Collection Plan Types
For sorting, grouping, categorizing, and other informational purposes, you must assign a collection plan type to each collection plan that you create
Collection plans
Collection plans are the structure that you use for data collection. Collection plans are composed of collection elements (the fields that you set up for the data that you want to collect), their values and specifications, and any actions that you want to initiate in response to quality results. You can create a collection plan that you can use as the default when you directly enter, view, and update quality results
Before we can collect the data with Oracle Quality, one must define a collection plan. You begin by defining collection elements which define the characteristics of the product, process that you want to record monitor and analyze. The data entry can be validated by static values or SQL statement or creating specifications.

Case Study- Fruit (Apple) Selling Company
Company sells apples which are different kinds and has different properties.
Create collection element type – we’ll use existing element types
Create collection elements - which represent properties of a apple e.g. color, type, grade, size, Decay Present, cut present, Dehydration, External Color, Sampling Location etc.
Define Collection Elements Values- for example color can be red brown green, decay present yes no etc.
Create collection plan type
Define collection plan - Will use the above defined collection elements and set the excepted values.
Finally enter the results and update results



Step#1 Collection Element Type
Quality Vision Enterprises - Navigation: Setups/ Collection Element Type
We are not defining any new collection element type

Step#2 Defining Collection Element
Quality Vision Enterprises - Navigation: Setups/ Collection Element

1.   External Color Green, External Color Red – The intention is operator will enter value form 1-10 to achieve this I have defined look up for storing the values


The same lookup I will be using under SQL validation
select a.lookup_code, a.meaning from fnd_lookup_values_vl a where a.lookup_type = 'QA_ORA_NUMBER_RANGE' order by to_number(a.lookup_code)


Note- the element type is the same we are using from step#1.

2.   Decay Present - Using value as Yes or No. I can have values right here on the Values screen or I can define it under collection plan as well.

3.   Grade - Using value as 1 or 2. 

4.   Size - Using value as 10,20,30,40,50.


Step#3 Defining Collection Plan Type
Quality Vision Enterprises - Navigation: Setups/ Collection Plan Type


Step#4 Defining Collection Plan
Quality Vision Enterprises - Navigation: Setups/ Collection Plans
Note the plan type earlier we defined we are using that here.


Values definition-
For example we are defining size as 10,20,30,40,50
So click on values of the size element, you can use as pop list.

Similarly for decay we can define as yes/no

And for grade its first and second

Save the work we are now ready to enter results

Step#5 Entering Quality Results
Quality Vision Enterprises - Navigation: Results/Entry/Enter Quality Results

Notice the fields are showing by the collection plan we are using. Also see the Green% field is showing the pop list and we made it mandatory as well. So the results screen is showing all the elements.

Step#5 Updating Quality Results
Quality Vision Enterprises - Navigation: Results/Entry/Update Quality Results
Under update Quality results you can update the values of previously recorded results by selecting the collection plan.


This explains the discrete quality setups.
Thanks,
Ajay


Filed under , having 9 comments

Processing Constraints in Oracle Order Management

by Ajay Atre



Processing Constraints in Oracle Order Management

Processing constraint in OM is common security framework where you can define rules around OM entities like order header and order line. The rules can validate the backend operations like Insert update, delete and cancel.

For example a line cannot be cancelled after it has been shipped, Order type cannot be changed if the order is booked or exists order line.



Step#1 – Define constraints
Order management Super User - Navigation: Setup/Rule/ Security/Processing Constraints
Add a constraint for order type
And then add the conditions such as line exists and order is booked.




Now create an order and try changing the order type

For example I have created an order with Mixed order type


And now trying to change the order type the message will pop up by saying you cannot change the order type as the order already has the line existed.

Filed under , having 6 comments