Basics of Interfaces

download Basics of Interfaces

of 15

Transcript of Basics of Interfaces

  • 8/10/2019 Basics of Interfaces

    1/15

  • 8/10/2019 Basics of Interfaces

    2/15

  • 8/10/2019 Basics of Interfaces

    3/15

  • 8/10/2019 Basics of Interfaces

    4/15

    Conditionally Required Columns:The values for these columns are based on the values of Mandatory columns. For Example:If you are converting foreigncurrency transactions to INR then it as compulsory to provide conditionally required columns like Currency conversion rate,Conversion Time and Conversion Date.

    Optional Columns:These are used when a client wanted to transfer some additional information from source to destination. These are based on

    clients requirement.

    Internal Processing Columns:Status and Error Message columns are called Internal Processing Columns. These are specific only to Interface Table. Thesecolumns are going to be used by the Import Program to update the status and error message, if the record fails its validationwhile importing from Interface Table to the Destination Table.

    C] Import Program:For all Interface Tables, Oracle Application Package is going to provide Import Programs. These are generally registered withdestination modules. These Import Programs are designed using PL/SQL, JAVA, C, C++, etc.What they do?

    It maps the columns of the Interface Table with one or more columns in the destination table.

    It performs row level and column level validation.

    It imports the data from Interface Table to the Destination tables, if the records validated successfully.

    It deletes all the successfully validated records from Interface Table.

    If the record fails its validation then the Import Program will update the status and error message columns of Interface Table.

    Interface Vs. Application Program Interface (API):

    Interfaces are used to transfer the data from legacy system to Oracle Application system where as API is used to convert thedata from one form to another form with in the Oracle Application Module.

    Data Migration vs. Data conversion

    When we need to enter data into oracle Apps, following are the few techniques:

    The Data can be entered using the application Screens (for small amount of data, like creating PO, entering sales orders

    using Oracle Apps screens).

    The data can be entered using Oracles Open System Interface (for regular operations e.g. for moving data from one module

    to another).

    The data can be stored in the database table directly (Not recommended by oracle and can be very risky, because on any

    event data is going to be stored in many tables and data should be validated before inserting into tables that may cause data

    integrity and inconsistency problem, sometimes it may corrupt the data completely.).

    Using third party tools like data loader (It is also can be used when data is relatively small (25-200 records) because it

    captures the keystrokes and works like manually entering the data into Oracle form but much faster as process is automated).

    What is the need of Migration/Conversion?

    Migration/Conversion are required when we are upgrading to one version to another (e.g. Oracle Apps 11.5.7 to Oracle

    11.5.10) or moving data from some legacy system to Oracle Apps. There will be bulk of data (sometimes millions or even more

    than that) that needs to be moved from one system to another and before moving the data it should be validated and only

    valid records should be entered into Oracle Apps.

    If both the systems (Target and source) are not having same structure for data (Tables are not same/Table Structure is not

    same/The data is being stored in database is not same), it needs to be translated (e.g. upgrading from Oracle 11i to R12 where

    table structures are not same) then we say it as conversion (any kind of translation of data on Source data to make it suitable

    for Target system) otherwise migration.

    What is Migration?

  • 8/10/2019 Basics of Interfaces

    5/15

  • 8/10/2019 Basics of Interfaces

    6/15

  • 8/10/2019 Basics of Interfaces

    7/15

    Setting up cost rates for employees is not mandatory. But if you need to cost the hours that are migrated in the system, thelabor cost distribution process in Oracle Projects do need the rates setup in order to calculate the costs.But if you are migrating the costs directly from the legacy instead of hours then this step is not needed. But ideally the costrates are required in a general production scenario wherein the employees/contractors enter their timecards.You can setup job rate schedule, employee level rate schedule or employee level overrides. Alternatively, the costing clientextension can be setup to calculate the cost according to the business scenario.Refer to the Oracle Projects User Guide for how to setup the employee cost rates.

    First Stage: Obtain Data from Legacy System

    The first stage deals with obtaining the data from the legacy system in the desired format. The data can be obtained in the formof flat text file or comma separated file csv, tab delimited file or file with any delimiters. Generally tab delimited files arerecommended since comma separated files behave strange when there is a comma in the data itself.If there is a database link created between the Source Legacy database and the Oracle Projects Database then the data canbe obtained directly using the select statements against the Source DB from within the Oracle Projects DB. But this method isnot preferred as it is more performance intensive when it comes to selecting large data over the network.For Projects Migration, generally 2 files are obtained. One file for Projects Data and the other file for Tasks Data. For Transaction Migration, single file is enough with all the cost/hours data.For Cost/Revenue Budget migration, single file is enough with all the Budgets Data.Create SQL Loader concurrent program which will upload the obtained data into the Oracle Staging Tables.Also it is always the best practice to create a control table in the Staging area, which will control the data migration. Forexample your control table might look like the one below:

    Parameter Type Parameter Parameter Value

    Template Contract Contract_Template

    Template Indirect Indirect_Template

    Expenditure Type Hours Labor

    Expenditure Type Expenses Employee_Expense

    Transaction Transaction Source Legacy1

    Product Code Product code LEGACY1

    Project Publish Workplan Yes

    Project Baseline Workplan Yes

    Cost Budget Baseline Yes

    Revenue Budget

    Baseline

    Yes

    This control table is looked upon by the migration program. So whenever there is a change in the templates, expenditure typesit is easy to change this control table instead of the code. So the advise is never hard code any values in the code, alwayshandle it using the control table.Also it will be better to have a form based on this table, so that this table data can be changed from the front end.

    Second Stage & Third Stage: Validate and Format the Data

    I am coupling the second and third stage because both are interdependent. Validating data is very important and it preventssome of the t ime consuming tasks in actual migration such as trouble shooting the errors due to the invalid data.Below are some of the key validations that need to be done before doing the actual migration.

    Projects/Tasks Migration:

    Though the projects and tasks are in different staging tables, the migration of projects/tasks is doing using a single program.We can always migrate projects and tasks separately, but the issue is with the performance when adding task by task to eachproject. So it always better to create projects and tasks together because of the bulk loading of tasks.

    Project/TaskSetup Validations:

    Validate the Product code is setup.

    Validate if the required Project Templates are setup.

    Validate if the Project Numbering is set to Manual for creating projects with the predefined project numbers.

    Project/Task Data Validations:

  • 8/10/2019 Basics of Interfaces

    8/15

    Validate if the project name is unique. Project with the same name should not exist in Oracle Projects.

    Validate if the project number is unique. Project with the same number should not exist in Oracle Projects.

    Validate if the project long name is unique. Project with the same long name should not exist in Oracle.

    Validate the project reference(this field is mandatory in the projects file, it can be the projects identifier of the source project or

    project number of the source project, but it has to be unique in the source system as well. This field needs to be populated in all

    the converted projects in order to track back and identify the project in the source system)

    Project name and project number should be 30 chars in length. Project long name should be 240 chars in length. Project

    Description should be 250 chars in length. Project description is not a mandatory field when creating project.

    Check if the project has a project manager and the project manager is active in Oracle HR and has an assignment and a Job

    assigned. Also the project manager has to be active from the project start date, else you cannot create a project with that

    project manager.

    In case of contract projects, check if the customer of the project is a valid customer defined and with a valid Bill To site

    assigned.Apart from the above necessary validations, you may have to validate the additional data such as Projects DFF Data you maywant to populate with your custom f ield values. For example you may want to populate the Project cost center value in theSegment1 of the Project DFF. In such case you have to validate if the cost center value is a valid value for that Segment1(sometimes you may have attached an LOV to that segment1, so in that case, the cost center has to be validated against thatLOV Values).For tasks, values for task types, work type, task manager has to be validated. Task types and work types have to be defined inOracle Projects before the task with those values are migrated, else the task will not be created.

    Cost/hours validationSetup Validations:

    Validate if the Transaction source is setup.

    Validate if the Expenditure type is setup.

    Data Validations:

    Check if the hours value is greater than zero.

    Check if the employee number is valid in HR and is active on the timecard date.

    If the transaction source is setup as costed, then the cost has provided while migrating the transactions. If the transaction

    source is setup as accounted, then the code combination ids need to be provided when migrating transactions.Apart from the above validations, you may want to validate the additional DFF segments that you are going to populate for thatexpenditure item.

    Budgets ValidationSetup Validations:

    Validate the project template has the required financial plan type attached. Financial plans are the project management

    versions of the Budget types in the Forms applications.

    Budget amount has to be greater than zero.

    There is no need to create revenue budgets if the Baseline funding without budget option is checked at the project or project

    type level. Whenever the funding is created for the contract project and is baselined, the revenue budget is automatically

    created and baselined. If that option is not checked, it is necessary that a revenue budget with the same amount as the funding

    amount needs to be created and baselined in order to baseline the funding.Data Validations:The cost budget for the project can be from the source systems budgeting system. If there is no budgeting in the sourcesystem, a cost budget with the total cost of the project can be created in Oracle Projects.For revenue budgets, it has to be equal to the funding amount of the project. If there is no funding amount in the source system,the sum of the revenue amount can be the funding amount and it is the revenue budget amount as well.

    Agreements and Funding ValidationData Validations:

    Agreement type should be valid.

    Agreement Amount should be greater than zero.

  • 8/10/2019 Basics of Interfaces

    9/15

  • 8/10/2019 Basics of Interfaces

    10/15

  • 8/10/2019 Basics of Interfaces

    11/15

    AP_SUPPLIER_SITES_INT:

    This is the open interface table for AP Supplier Sites. It holds Supplier Site information which is loaded by the user for import.The columns in the table map to corresponding columns in PO_VENDOR_SITES_ALL table. The Oracle Payables applicationuses this information to create a new Supplier Site record when the Supplier Sites Open Interface Import program is submitted.Each row in the table will be joined to the appropriate Supplier using the VENDOR_ID column.

    Mandatory Columns:

    VENDOR_SITE_INTERFACE_ID (ap_supplier_sites_int_s.NEXTVAL)Supplier Site interface record unique identifier

    VENDOR_SITE_CODESupplier Site nameOther important columns:

    ADDRESS_LINE1First line of supplier address

    ADDRESS_LINE2Second line of supplier address

    ADDRESS_LINE3Third line of supplier address

    CITYCity name

    STATEState name or abbreviation

    ZIPPostal code

    COUNTRYCountry name

    PHONEPhone number

    FAXSupplier site facsimile number

    SHIP_TO_LOCATION_CODEDefault ship-to-location name

    BILL_TO_LOCATION_CODE Default bill-to-location name

    PAYMENT_METHOD_LOOKUP_CODE Default payment method type

    VAT_CODEInvoice default tax code

    PAY_GROUP_LOOKUP_CODEPayment group type

    TERMS_NAMEPayment terms name

    INVOICE_CURRENCY_CODEDefault currency unique identifier

    PAYMENT_CURRENCY_CODEDefault payment currency unique identifier

    EMAIL_ADDRESSE-mail address of the supplier contact

    PURCHASING_SITE_FLAGIndicates whether purchasing is allowed from this site

    AUTO_TAX_CALC_FLAGLevel of automatic tax calculation for supplier

    HOLD_ALL_PAYMENTS_FLAG Indicates if Oracle Payables should place payments for this supplier on hold

    AP_SUP_SITE_CONTACT_INT:

    This is the open interface table for AP Supplier Site Contacts. It holds Supplier contact data. The columns in the table map tocorresponding columns in PO_VENDOR_CONTACTS table. The Oracle Payables application uses this information to create anew Supplier Contact record when the Supplier Sites Open Interface Import program is submitted. Each row in the table will bejoined to the appropriate Supplier Site using the VENDOR_SITE_CODE and ORG_ID.Mandatory Columns:

    VENDOR_INTERFACE_IDSupplier interface record unique identifier

    VENDOR_CONTACT_INTERFACE_ID (AP_SUP_SITE_CONTACT_INT_S.NEXTVAL)Vendor Contact Interface Identifier

    VENDOR_SITE_CODESupplier Site nameOther important columns:

    FIRST_NAMEContact First name

    LAST_NAMEContact last name

    AREA_CODEArea code of contact phone number

    PHONEContact phone number

    FIRST_NAME_ALT Alternate Supplier contact first name

    LAST_NAME_ALTAlternate Supplier contact last name

    EMAIL_ADDRESSEmail address for the Supplier Site contact

    FAXFacsimile number for the Supplier Site contact

    VENDOR_IDSupplier unique identifier

  • 8/10/2019 Basics of Interfaces

    12/15

    Validations:

    Vendor Number (Check for duplicate records in ap_suppliers table)

    Vendor Name (Check for duplicate records in staging as well as in ap_suppliers table)

    Terms Name (Check for proper record in ap_terms_tl table)

    Pay Group (Check for proper record in fnd_lookup_values_vl table where lookup_type = PAY GROUP)

    Employee Id (Check for proper employee record in per_all_people_f table)

    Vendor Type (Check for proper record in po_lookup_codes table where lookup_type = VENDOR TYPE)

    Vendor Site Code (Check for duplicate records in ap_supplier_sites_all table)

    Country Code ( Check for proper country code in fnd_territories_vl table)

    Payment Method (Check for proper payment method in iby_payment_methods_vl table)

    Interface programs:

    1.

    Supplier Open Interface Import

    2. Supplier Sites Open Interface Import

    3. Supplier Site Contacts Open Interface ImportThe data inserted via these interfaces are automatically populated into TCA tables.Note: AP_SUPPLIER_INT_REJECTIONS table contains suppliers, sites, contacts rejections information.

    AP Invoice Interface

    This interface helps us to import vendor invoices into Oracle applications from external systems into Oracle Applications.

    Interface tables:

    1] AP_INVOICES_INTERFACE

    This is the open interface table for importing AP Invoices from external sources and stores header information about invoices.Invoice data comes from sources including:

    EDI invoices from suppliers that are loaded through Oracle e-Commerce Gateway

    Supplier invoices that are transferred through the Oracle XML Gateway

    Invoices that are loaded using Oracle SQL*Loader

    Lease invoices from Oracle Property Manager

    Lease payments from Oracle Assets

    Credit card transaction data that are loaded using the Credit Card Invoice Interface Summary

    Expense Report invoices from Oracle Internet Expenses

    Payment Requests from Receivables

    Invoices that are entered through the Invoice Gateway.There is one row for each invoice you import. Oracle Payables application uses this information to create invoice headerinformation when Payables Open Interface program is submitted.Data in the AP_INVOICES_INTERFACE table used in conjunction with AP_INVOICE_LINES_INTERFACE table to createPayables Invoice, Invoice lines, Distributions and Schedule payments. Data in this table can be viewed and edited using OpenInterface Invoices window.

    The Payables Open Interface program validates each record in this interface table selected for import, and if the recordcontains valid data then the program creates a Payables Invoice.

    Important columns:INVOICE_ID (Required):Unique identifier for this invoice within this batch. Same value should be populated in invoices linesin the AP_INVOICE_LINES_INTERFACE table to identify the data as belonging to the same invoice.INVOICE_NUM (Required): Enter the invoice number that needs to be assigned to the invoice created in Payables from this

    record.INVOICE_TYPE_LOOKUP_CODE (Optional) : Type of invoice: Credit or Standard.INVOICE DATE (Optional) : Date of the invoice. If you do not enter a value, the system uses the date you submit Payables

  • 8/10/2019 Basics of Interfaces

    13/15

    Open Interface Import as the invoice date.PO_NUMBER (Optional) :Purchase order number from PO_HEADERS.SEGMENT1. This column needs to be populated ifinvoice to be matched with an purchase order. VENDOR_ID & VENDOR_SITE_ID (Required):VENDOR_ID isunique identifier for a supplier and VENDOR_SITE_IDisInternal supplier site identifier. Supplier of the invoice to be derived by value in one of the following columns in this table:VENDOR_ID, VENDOR_NUM, VENDOR_NAME, VENDOR_SITE_ID or PO_NUMBER.VENDOR_NUM & VENDOR_NAME(Optional) : Supplier number and name. You must identify the supplier by entering a valuefor one of the following columns in this table: VENDOR_ID, VENDOR_NUM, VENDOR_SITE_ID, VENDOR_SITE CODE, or

    PO_NUMBER.INVOICE_AMOUNT(Required):Amount of the invoice.INVOICE_CURRENCY_CODE(Optional) : Currency code for the invoice. If you want to create foreign currency invoices, entera currency code that is different from your functional currency.EXCHANGE_RATE (Optional) : This column is required if you enter a foreign currency code in theINVOICE_CURRENCY_CODE column and you enter User as the EXCHANGE_RATE_TYPE.TERMS_ID(Optional) : Internal identifier for the payment terms.DESCRIPTION(Optional) : Enter the description that you want to assign to the invoice created from this record.SOURCE(Required) : Source of the invoice data. If you import EDI invoices from the Oracle EDI Gateway, the source is EDIGateway. For invoices you import using SQL*Loader, use a QuickCode with the type Source that you have defined in theQuickCodes window in Payables.

    2] AP_INVOICE_LINES_INTERFACE

    This is the lines interface table for the AP Invoice Open Interface and it is used in conjunction with AP_INVOICE_INTERFACEtable. AP_INVOICE_LINES_INTERFACE stores information used to create one or more invoice distributions. Note that one rowin this table may create, during the import process, more than one invoice distribution.

    Important columns:INVOICE_ID (Required) :Enter the INVOICE_ID of the corresponding invoice in the AP_INVOICES_INTERFACE table. INVOICE_LINE_ID : This value is not required. You can enter a unique number for each invoice line of an invoice.LINE_NUMBER (Optional) :You can enter a unique number to identify the line.LINE_TYPE_LOOKUP_CODE(Required) : Enter the lookup code for the type of invoice distribution that you want PayablesOpen Interface Import to create from this record. The code you enter must be ITEM, TAX, MISCELLANEOUS, or FREIGHT.These lookup codes are stored in the AP_LOOKUP_CODES table. AMOUNT(Required) : The invoice distribution amount. If you are matching to a purchase order, the AMOUNT =QUANTITY_INVOICED x UNIT PRICE. If the total amount of all the invoice distributions does not equal the amount of theinvoice that has the same INVOICE_ID, then Payables Open Interface Import will reject the invoice.

    Concurrent program:

    Payables Open Interface ImportParameters:

    Source: Choose the source of the invoices from the list of values. Use EDI Gateway, Credit Card, or a Source type QuickCodeyou defined in the Payables QuickCodes window.Group: To limit the import to invoices with a particular Group ID, enter the Group ID. The Group must exactly match theGROUP_ID in thePayables Open Interface tables.

    Batch Name: Payables groups the invoices created from the invoices you import and creates an invoice batch with the batchname you enter. You can enter a batch name only if you have enabled the Use Batch Control Payables option, and if you haveenabled the Use Batch Control Payables option, you must enter a batch name. If you use a batch name and some invoices arerejected during the import process, you can import the corrected invoices into the same batch if you enter the exact batch nameduring the subsequent import.

    Hold Name: If you want to place all invoices on hold at the time of import, enter an Invoice Hold Reason. You can define yourown hold reasons in the Invoice Approvals window.

    Hold Reason: Payables displays the Invoice Hold Reason Description.

    GL Date: If you want to assign a specific GL Date to all invoices, enter a GL Date. If you do not enter a value here, the systemwill assign a GL Date based on the GL Date Payables option.

    Purge: Enter Yes if you want Payables to delete all successfully imported invoice records that match the Source and Group IDof this import. Payables does not delete any invoice data for which it has not yet created invoices. If you want to purge later,you can use the Payables Open Interface Purge Program.

  • 8/10/2019 Basics of Interfaces

    14/15

    Steps:

    1] Firstly, lets get a unique number to be used as INVOICE_ID to the invoice to be imported. This method ensures that eachinvoice has a unique INVOICE_ID assignment.

    selectap_invoices_interface_s.nextval fromdual;

    Next Val

    2] Then, create records in the Invoice Open Interface tables through SQL queries.

    Insert intoAP_INVOICES_INTERFACE for columns :

    1. invoice_id,

    2. invoice_num,

    3. vendor_id,

    4. vendor_site_id,

    5. invoice_amount,

    6. invoice_currency_code,

    7. invoice_date,

    8. description,

    9. pay_group_lookup_code,

    10. source,

    11. org_id

    3] You can go to Payables > Invoices > Entry > Open Interface Invoices to check the details of Invoice and Invoice Lines fromthe front end. If required you can do any modifications here. Alternatively you can use these forms to put invoice data inAP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE tables.4] Go to the front end and run the concurrent program Payables Open Interface Import to submit a request for Invoice Import.

    Output:

    http://4.bp.blogspot.com/-x2WrrMUjgpE/UN01XhgU3JI/AAAAAAAAGso/YKoG6xx89Ps/s1600/4.jpghttp://4.bp.blogspot.com/-OrYj1CCSDZs/UN01NnI9nmI/AAAAAAAAGsg/5aqU_WvXUrw/s1600/3.jpghttp://4.bp.blogspot.com/-x2WrrMUjgpE/UN01XhgU3JI/AAAAAAAAGso/YKoG6xx89Ps/s1600/4.jpghttp://4.bp.blogspot.com/-OrYj1CCSDZs/UN01NnI9nmI/AAAAAAAAGsg/5aqU_WvXUrw/s1600/3.jpg
  • 8/10/2019 Basics of Interfaces

    15/15

    output of Payables Open Interface Import

    5] The imported invoice becomes available for review in Invoices Workbench.

    http://4.bp.blogspot.com/-Bb6TQTZ3U_s/UN1J_yXDrCI/AAAAAAAAGs4/fW2OsStDMhI/s1600/5.jpg