Upload
mohamed-rizk
View
68
Download
0
Embed Size (px)
Citation preview
Government Financial Management Information Systems (GFMIS) Supplier Data MigrationPrepared By Mohammed Rizk Ibrahim Oracle Technical Consultant
Main Topics
- Part I1. What's data migration? 2. Most common Tools used for data uploading 3. APIs used 4. Testing the API script : Uploading One supplier 5. Validating of supplier data after uploading 6. Creating custom Objects a) Custom Table b) Custom Package c) Custom Concurrent Program 7. Importing suppliers data into custom table 8. Filtering Data to avoid the duplicate suppliers
2
Main Topics
- Part II1. Whats concurrent program 2. Types of concurrent program 3. Creating concurrent program 4. Uploading data process 5. Exercises on uploading the suppliers
3
Main Topics
Part I4
Data Migration Definition & phases
Data Migration ,its the process of transferring data from a
system to another ,data migration is necessary when an organization decides to use a new system to use any data that was used in the old system
Data Migration phases 1. Data should be collected by MOF Technical Team 2. TRANSFER(MAP) : transfer or map data from the old format to the new format 3. LOAD : upload the mapped data to the new system and test it to check if it is fully functional . 4. Oracle Base Tables AP_SUPPLIERS,AP_SUPPLIER_SITES_ALL and PER_ALL_PEOPLE_F.5
Main Tools used for data upload Oracle Data LoaderIts a tool is used by functional consultants to upload data through filling in an excel sheet, But Data loader is form-based i.e. Used only with forms or you can only enter the data from a certain form .
Interface TableIts a tool used by functional consultants through importing data excel sheets into interface tables .after that through oracle application you can run a program that is responsible for transferring data from the interface tables to oracle base table.
APIApplication Program Interfaces are standard stored procedure packages or functions created for performing specific activities in the Oracle Apps EBusiness Suite. One of these activities is inserting the data into the a certain table ( like supplier or customer tables ) while insuring the integrity of the application .
6
Data Migration phases
Our Action Plan : 1. EXTRACT : define Format of the extracted files , whats the file format that will be extracted from PACI system : Excel, Textetc? Creation of a custom table (A temp table for suppliers mapping data provided by PACI ) Addition of constraints ,Checking for UNIQUE columns and NOT NULL columns like original tables for customers and suppliers in oracle apps.
2.3.
7
Data Migration Definition & phases
Data Migration phases4. Running Loading utility & Creation of LOG file ,Load these data from temp table by using TOAD tool after which a log file is created, the log file will contain data about the uninserted row . Verify Data, Review invalid rows and fix it, use TOAD to re import the rows again
5.
8
Data migration example :Supplier data
Following Supplier data will be migrated: Supplier Header Supplier Site
9
APIS usedThe Following APIs are used to upload supplier data :o o API Header POS_VENDOR_PUB_PKG.CREATE_VENDOR ( parameters ) API Sites POS_VENDOR_PUB_PKG.CREATE_VENDOR_SITE( parameters )
10
API Header ExampleDECLARE l_vendor_rec ap_vendor_pub_pkg.r_vendor_rec_type; l_return_status VARCHAR2(10); l_msg_count NUMBER; l_msg_data VARCHAR2(1000); l_vendor_id NUMBER; l_party_id NUMBER; BEGIN -- Required l_vendor_rec.segment1 := '00002359'; -- Civil ID l_vendor_rec.vendor_name := 'ABC'; -- Supplier Name -- Optional l_vendor_rec.match_option:='R' ;pos_vendor_pub_pkg.create_vendor( p_vendor_rec => l_vendor_rec, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data, x_vendor_id => l_vendor_id, x_party_id => l_party_id); COMMIT; dbms_output.put_line('return_status: '||l_return_status); dbms_output.put_line('msg_data: '||l_msg_data); dbms_output.put_line('vendor_id: '||l_vendor_id); dbms_output.put_line('party_id: '||l_party_id); END;
11
API Header Example
12
API Sites Example
DECLARE l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type; l_return_status VARCHAR2(10); l_msg_count NUMBER; l_msg_data VARCHAR2(1000); l_vendor_site_id NUMBER; l_party_site_id NUMBER; l_location_id NUMBER; BEGIN -- Required l_vendor_site_rec.vendor_id :=57023 l_vendor_site_rec.vendor_site_code := 'MOF'; l_vendor_site_rec.address_line1 := '; l_vendor_site_rec.country := 'KW'; l_vendor_site_rec.org_id := 85; -- Optional l_vendor_site_rec.purchasing_site_flag:='Y'; l_vendor_site_rec.pay_site_flag :='Y'; l_vendor_site_rec.rfq_only_site_flag :='N'; l_vendor_site_rec.phone := '67615006'; pos_vendor_pub_pkg.create_vendor_site( p_vendor_site_rec => l_vendor_site_rec, x_return_status => l_return_status,
13
API Sites Example
x_msg_count
=> l_msg_count, x_msg_data => l_msg_data, x_vendor_site_id => l_vendor_site_id, x_party_site_id => l_party_site_id, x_location_id => l_location_id);
COMMIT; dbms_output.put_line('return_status: '||l_return_status); dbms_output.put_line('msg_data: '||l_msg_data); dbms_output.put_line('vendor_site_id: '||l_vendor_site_id); dbms_output.put_line('party_site_id: '||l_party_site_id); dbms_output.put_line('location_id: '||l_location_id); END;
14
API Sites Example
15
Search For Supplier
16
Search For Supplier
17
Create Custom Objects
Why are we using custom tables ? We are using custom table to import all supplier data from excel sheet into this table . After that we are using a Procedure that uses the API to upload all the suppliers to oracle database table . For creating custom table & procedure see the attached file (Supplier Migration Scripts.txt). . After that define Custom Concurrent Programs to use them for uploading data
18
Import supplier data into custom table
We can import the data supplier into custom table as the following: Fill in an excel sheet with the data supplier. Column name of excel sheet have to be the same column name of table data base .
19
Import supplier data into custom table After that will import the supplier data into custom table by using TOAD. From TODA menu Database -> Import ->Import Table Data
20
Import supplier data into custom table
A screen will appear that included the following : Schema name
Custom table name
21
Press Execute Wizard button
Import supplier data into custom table
The next screen will appear ,then we select Excel File (*.xls) and press Next button
22
Import supplier data into custom table Here will request from you to select an excel file that contains on the supplier data .
23
Import supplier data into custom table Figure shows rejected record output file name and also the file path
24
Import supplier data into custom table
As we shown in figure we start first row from 2 and we didn't mention number for last row which means we want to get all data in excel file then Next
25
Import supplier data into custom table
As shown in figure we've retrieve data but we have to make sure that the column name of source (excel table) match the column name in destination (oracle table) type by using AutoMap the Next
26
Import supplier data into custom table
This figure shows us the mapping of field in source and destination then Next
27
Import supplier data into custom table
Figure shows data after mapping Done then Next
28
Import supplier data into custom table
Here TOAD raises error message to show duplicate data for supplier.
29
Import supplier data into custom table
After process import data to custom table finished will show summary for this process as the following
30
Import supplier data into custom table
We can display data that we already imported from excel file after we complete the import data process (load) by press on Show Data after we check the data we should commit data by press on red arrow button
Commit Icon
After that click commit icon
31
Main Topics
- Part II1. Whats concurrent program 2. Types of concurrent program 3. Creating concurrent program 4. Uploading data process 5. Exercises on uploading the suppliers
32
concurrent program
Concurrent program is an executable file that runs simultaneously with other concurrent programs and with online operations. Typically, a concurrent program is a long-running, data-intensive task, such as posting a journal or generating a report. Types of concurrent program 1. A SQL script 2. A SQL * Loader program 3. Java program 4. Oracle Report 5. Pl/SQL program ( or call it a stored procedure/package procedure)
33
Creating concurrent ProgramNavigate to Responsibility Application Developer (M) Concurrent Executable Notice that execution file name is name of stored procedure
34
Creating concurrent Program(M) Concurrent Program
Reference the executable file name that defined in the previous step
35
Request Group
How can access and run this concurrent program ? to run this concurrent program have to assign it to specific request group. Whats Request Group ? Request Group is the collection of requests, request sets, and concurrent programs that a user, operating under a given responsibility, can select from the Submit Requests window
36
Whats Request Group
Navigate to Responsibility System administrator (M)Security Responsibility Define
37
Assign Request GroupNavigate to Responsibility System administrator(M)Security Responsibility Define
38
Employee Data MigrationThe same scenario will repeat for uploading the employees and define them as suppliers but will use different Custom concurrent Programs
The same scenario will repeat for uploading the employees and define them as suppliers but will use different Custom concurrent Programs as the following : 1. Upload Employees 2. Update Employees Assignment 3. Define the Suppliers as Employees
39
Upload Employees
40
Update Employees Assignment (Department)
41
Define Employee As Supplier
42
Notes
Kindly note that every time after loading data from excel to custom table by TOAD have to update flag is called ACTIVE_ROW=Y.
43