You are on page 1of 9

ORACLE EDI GATEWAY (R10.

7, R11) E-COMMERCE GATEWAY (R11I)
Support Document Outbound Transactions: Print and EDI Extract
Creation Date: December 13, 1999 Updated: Oct. 24, 2000

Implementation of this custom solution is not supported by Oracle Support. This document was written as a guideline to assist you in expediting a custom solution.

05/02/2002 2:30 PM

Page 1

Contents Overview Document Purpose Reference Document Documentation Changes Parallel Printing and EDI Transaction Resetting Print/EDI Flags Invoice (INO) Sample Code Purchase Order (POO) and PO Change (POCO) Sample Code 3 3 3 3 4 5 5 6 05/02/2002 2:30 PM Page 2 .

this document may assist you as a work around The purpose of this document is to provide a guideline on the custom code you need to do the following: • • . The sample code may need adjustments. There are plans to enhance the Oracle application to allow you to do both. Please send your recommendation for improving this document and sample code to Bonnie.Williams@Oracle. The table names and columns may have changed across releases. Confirm in the base application manuals whether their procedures allow both the EDI transaction and the printing of the document.com. Documentation Changes The sample code in this document may not be exact. Reference Document Reference the Oracle R11i Oracle e-Commerce Gateway Implementation Manual for a list of data elements that are updated in the transactions in the base application tables when an EDI transaction is extracted. Process the EDI transaction through the EDI Gateway or e-Commerce Gateway. 05/02/2002 2:30 PM Page 3 .7 and R11.Overview Document Purpose Several Oracle transactions do not allow both the printing and creation of the outbound EDI transaction. AND Print the same document from the base application. They may have changed. Until that is available (date not determined). You need a work around until the base product can provide that. We would like to have sample code for each transaction for each release until the standard product can provide this feature. These are the fields that need to be reset by the process described below. Confirm that these are the same fields in R10.

This process will update key data elements in the base Application tables. 1. 05/02/2002 2:30 PM Page 4 . Run the Oracle EDI Gateway process first Running the EDI Gateway process first will assure that the interface file for the EDI transactions is created. Run the base Oracle application’s regular process to produce paper documents. 3. Given the transaction identifier (for example. the flags must be reset for the second process to be successful.. read the base Oracle application to reset the appropriate flags and codes that prevented the transaction from being processed again. 2. Run the Oracle EDI Gateway process first to extract transactions Reset the print flag in the base application (custom code) given the transactions just extracted Run the print document request. These transactions are found in the file just created by the EDI Gateway. Reset the print flag in the base application (Custom Code) Custom code is needed to read through control (0010) records to identify which transactions were extracted. Because the EDI Gateway and the base application share the same flags and indicators in the base application tables to prevent duplicate processing. 3. This file will provide the list of document/transactions extracted by the first process.Parallel Printing and EDI Transaction. Run the print document request. 2. Method 1 The following procedure will work for the following transactions that do not allow both printing of the document and the EDI transaction extraction: • • • • Outbound Invoice (INO) Outbound Purchase Order (POO) Outbound Purchase Order Change (POCO) Others to be determined These steps can be followed: 1. purchase order number).

Resetting Print/EDI Flags Invoice (INO) Sample Code undefine 1 update ra_customer_trx set printing_pending = 'Y'. BEGIN START_TRX_DATE := '&1'. LAST_PRINTED_SEQUENCE_NUM = DECODE((LAST_PRINTED_SEQUENCE_NUM-1). printing_count = NULL. set serveroutput on size 10000 DECLARE START_TRX_DATE DATE. END_TRX_DATE DATE. that in my experience HAD to be decremented. in particular the LAST_PRINTED_SEQUENCE_NUM. EXCEPTION when OTHERS THEN invoice_count := 0. The INO is the only one I ever had to reset. END_TRX_DATE := '&2'. CUSTOMER_TO_RESET := '&3'. COMMIT. end. update ra_customer_trx set printing_pending = 'Y'. / 05/02/2002 2:30 PM Page 5 . edi_processed_flag = 'N'. printing_last_printed = NULL. I reset several other values. DBMS_OUTPUT. 0. -1. edi_processed_status = NULL where trx_number = '&1'.(LAST_PRINTED_SEQUENCE_NUM-1)) WHERE trx_date between START_TRX_DATE AND END_TRX_DATE and SOLD_TO_CUSTOMER_ID = CUSTOMER_TO_RESET. EDI_processed_status = NULL. END. EDI_processed_flag = 'N'. printing_original_date = NULL. begin SELECT COUNT(*) INTO INVOICE_COUNT FROM ra_customer_trx WHERE trx_date between START_TRX_DATE AND END_TRX_DATE and SOLD_TO_CUSTOMER_ID = CUSTOMER_TO_RESET.PUT_LINE('Invoice count: '||TO_CHAR(INVOICE_COUNT)). INVOICE_COUNT number. This sample accepts a starting and ending date range as well as a customer ID and shows how many invoices would be reset by the operation. CUSTOMER_TO_RESET NUMBER.

po_num from temp_head1 a where a. printed_date = NULL.segment1 = (select a.type_lookup_code and a.po_num = apps. UPDATE po_headers SET printed_date = NULL. --------------------------------------------------------------------------------------update apps.po_num from temp_head1 a where a. The difference is that the POCO SQL sets the edi_processed_flag in the po_headers table to Y.po_headers_archive_all. COMMIT. update apps.segment1 ) and apps.po_headers_all set print_count = 0.doc_type = apps.po_headers_archive_all. edi_processed_flag = NULL WHERE segment1 = &PO_NUMBER AND latest_external_flag = 'Y'. In other words: if the edi_processed_flag is Y the POCO process extracts the order else the POO process extracts the order __________________________________________________________________________________________ REM The following script will reenable a Standard or REM Blanket PO for extraction by the POO transaction. edi_processed_flag = NULL where apps. printed_date = NULL. edi_processed_flag). COMMIT.po_headers_archive_all.po_headers_all.segment1 ) . print_count = 0. print_count = 0.po_headers_archive_all set print_count = 0.type_lookup_code and a.po_headers_archive_all.doc_type = apps. edi_processed_flag = NULL WHERE segment1 = &PO_NUMBER. edi_processed_flag = NULL where apps.po_num = apps.po_headers_all.segment1 = (select a. print_count.latest_external_flag = 'Y' / 05/02/2002 2:30 PM Page 6 .Purchase Order (POO) and PO Change (POCO) Sample Code NOTE: PO outbound and PO Change Outbound update the same fields on the po_headers table and the po_headers_archive table (printed_date. UPDATE po_headers_archive SET printed_date = NULL.po_headers_all.

update apps.po_header_id = (select b. printed_date = NULL.po_headers_all b where b.release_num) and apps.po_releases_all.doc_type and b.latest_external_flag = 'Y' / 05/02/2002 2:30 PM Page 7 . apps.po_releases_archive_all.po_headers_all b where b.po_releases_archive_all.po_header_id from temp_rel1 a. edi_processed_flag = NULL where apps.po_num and a. edi_processed_flag = NULL where apps.rel_num = apps.segment1 = a.po_releases_archive_all set print_count = 0.segment1 = a.po_releases_all.rel_num = apps.po_releases_archive_all.po_header_id = apps.release_num) .po_header_id and b.po_header_id from temp_rel1 a.po_releases_archive_all.po_header_id and b.po_releases_all.type_lookup_code = a.po_header_id = apps.po_num and a.doc_type and b.update apps.po_header_id = (select b. printed_date = NULL. apps.type_lookup_code = a.po_releases_all set print_count = 0.

A company used this for invoices. otherwise. the customer MUST then reinstate the INO process using the above navigation. Method 2 This is an alternative manual procedure that may be viable for some organizations.Parallel Printing and EDI Transaction. 05/02/2002 2:30 PM Page 8 . Navigation --> Trading Partner --> Query the Trading Partner --> Open the Trading Partner --> Select the Detail Alternate region --> Disable the Invoice Outbound reference by click on the Enable box. the EDI invoices will not be extracted when the Concurrent Manager Request is run again. You MUST REINSTATE the Trading Partner for the outbound invoice in the Gateway again. Upon completion. You may try it for other transactions. INVOICES: The solution requires the user to connect to the Application using the EDI Gateway responsibility. Save the transaction. Once connected follow the following navigation path. Once this is done the regular invoice process will print the document.

This document is provided for informational purposes only and the information herein is subject to change without notice. Worldwide Inquiries: 650.7200 Copyright © Oracle Corporation 2000 All Rights Reserved 05/02/2002 2:30 PM Page 9 .S. CA 94065 U.S. Oracle EDI Gateway. Oracle. Oracle Corporation does not provide any warranties covering and specifically disclaims any liability in connection with this document. Oracle e-Commerce Gateway October 2000 Author: Bonnie Shebat Williams Contributing Authors: Geoff Scott-Baker.A. Oracle e-Commerce Gateway are trademarks of Oracle Corporation. Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores.7000 Fax 650. Oracle UK Stephen Douglas Nelson Copyright © Oracle Corporation 2000 All Rights Reserved Printed in the U.Oracle EDI Gateway.506. Please report any errors herein to Oracle Corporation. Oracle is a registered trademark and Enabling the Information Age.A.506.