supplier data migration

43
Government Financial Management Information Systems (GFMIS) Supplier Data Migration Prepared By Mohammed Rizk Ibrahim Oracle Technical Consultant

Upload: mohamed-rizk

Post on 24-Oct-2014

138 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Supplier Data Migration

Government Financial Management Information Systems (GFMIS)

Supplier Data MigrationPrepared By

Mohammed Rizk Ibrahim

Oracle Technical Consultant

Page 2: Supplier Data Migration

2

Main Topics

- Part I1.What's data migration?2.Most common Tools used for data uploading3.API’s used4.Testing the API script : Uploading One supplier5.Validating of supplier data after uploading6.Creating custom Objectsa) Custom Table b) Custom Package c) Custom Concurrent Program

7.Importing suppliers data into custom table 8.Filtering Data to avoid the duplicate suppliers

Page 3: Supplier Data Migration

3

Main Topics

- Part II1.What’s concurrent program2.Types of concurrent program3.Creating concurrent program4.Uploading data process5.Exercises on uploading the suppliers

Page 4: Supplier Data Migration

4

Part I

Main Topics

Page 5: Supplier Data Migration

Data Migration Definition & phases

Data Migration ,it’s 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 phases1. Data should be collected by MOF Technical Team2. 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

Page 6: Supplier Data Migration

6

Oracle Data Loader It’s 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 Table It’s 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.

API Application Program Interfaces are standard stored procedure packages

or functions created for performing specific activities in the Oracle Apps E-Business 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 .

Main Tools used for data upload

Page 7: Supplier Data Migration

Data Migration phases

Our Action Plan :

1. EXTRACT : define Format of the extracted files , what’s the file format that will be extracted from PACI system : Excel, Text…etc?

2. Creation of a custom table (A temp table for suppliers mapping data provided by PACI )

3. Addition of constraints ,Checking for UNIQUE columns and NOT NULL columns like original tables for customers and suppliers in oracle apps.

7

Page 8: Supplier Data Migration

Data Migration Definition & phases

Data Migration phases

4. 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 .

5. Verify Data, Review invalid rows and fix it, use TOAD to re import the rows again

8

Page 9: Supplier Data Migration

Data migration example :Supplier data

Following Supplier data will be migrated:

Supplier Header Supplier Site

9

Page 10: Supplier Data Migration

API’S used

The Following API’s are used to upload supplier data :

o API Header POS_VENDOR_PUB_PKG.CREATE_VENDOR ( parameters )o API Sites POS_VENDOR_PUB_PKG.CREATE_VENDOR_SITE( parameters )

10

Page 11: Supplier Data Migration

API Header Example

DECLARE 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

Page 12: Supplier Data Migration

API Header Example

12

Page 13: Supplier Data Migration

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

Page 14: Supplier Data Migration

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

Page 15: Supplier Data Migration

API Sites Example

15

Page 16: Supplier Data Migration

Search For Supplier

16

Page 17: Supplier Data Migration

Search For Supplier

17

Page 18: Supplier Data Migration

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

Page 19: Supplier Data Migration

Import supplier data into custom table

19

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 .

Page 20: Supplier Data Migration

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

Page 21: Supplier Data Migration

Import supplier data into custom table

• A screen will appear that included the following :

• Press Execute Wizard button

21

Schema name

Custom table name

Page 22: Supplier Data Migration

Import supplier data into custom table

22

• The next screen will appear ,then we select Excel File (*.xls) and press Next button

Page 23: Supplier Data Migration

Import supplier data into custom table

23

• Here will request from you to select an excel file that contains on the supplier data .

Page 24: Supplier Data Migration

Import supplier data into custom table

24

• Figure shows rejected record output file name and also the file path

Page 25: Supplier Data Migration

Import supplier data into custom table

25

• 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

Page 26: Supplier Data Migration

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

Page 27: Supplier Data Migration

Import supplier data into custom table

• This figure shows us the mapping of field in source and destination then Next

27

Page 28: Supplier Data Migration

Import supplier data into custom table

• Figure shows data after mapping Done then Next

28

Page 29: Supplier Data Migration

Import supplier data into custom table

29

• Here TOAD raises error message to show duplicate data for supplier.

Page 30: Supplier Data Migration

Import supplier data into custom table

30

• After process import data to custom table finished will show summary for this process as the following

Page 31: Supplier Data Migration

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

• After that click commit icon

31

Commit Icon

Page 32: Supplier Data Migration

Main Topics

- Part II1.What’s concurrent program2.Types of concurrent program3.Creating concurrent program4.Uploading data process5.Exercises on uploading the suppliers

32

Page 33: Supplier Data Migration

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 script2.A SQL * Loader program3.Java program4.Oracle Report5.Pl/SQL program ( or call it a stored procedure/package procedure)

33

Page 34: Supplier Data Migration

Creating concurrent Program

34

Navigate to Responsibility Application Developer (M) Concurrent Executable

Notice that execution file name is name

of stored procedure

Page 35: Supplier Data Migration

35

Creating concurrent Program

(M) Concurrent Program Reference the executable file

name that defined in the previous step

Page 36: Supplier Data Migration

Request Group

• How can access and run this concurrent program ? to run this concurrent program have to assign it to specific request group.

• What’s 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

Page 37: Supplier Data Migration

What’s Request Group

Navigate to Responsibility System administrator

(M)Security Responsibility Define

37

Page 38: Supplier Data Migration

Assign Request Group

38

Navigate to Responsibility System administrator

(M)Security Responsibility Define

Page 39: Supplier Data Migration

Employee Data Migration

39

The 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 Employees2. Update Employees Assignment3. Define the Suppliers as Employees

Page 40: Supplier Data Migration

Upload Employees

40

Page 41: Supplier Data Migration

Update Employees Assignment (Department)

41

Page 42: Supplier Data Migration

Define Employee As Supplier

42

Page 43: Supplier Data Migration

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