Do we really need to manually add the reference numbers in the source file when we planning to importing data through the Data import export framework ? No we don't need to do that anymore :)
In this article i will show you how we can Configure DIXF to automatically generate unique key using number sequence during the importing process.
The following example illustrate how to generate vendor accounts automatically during the importing process. However we can use the same approach to generate the unique key for any entities.
Note: This example assume that you know how to set up the DIXF Parameters, Source file and Processing Group, So if you don't know how to configure any of these please read any of my previous articles about the DIXF.
To generate the vendor accounts automatically do the following :
1- I will use the same CSV file that we created when we discussed how to import vendors master data. The CSV file contain the AccountNum Field which represent the Vendor Account.
2- Delete the AccountNum (Vendor Account) since we are going to generate the values of these this filed automatically.
3- This is how the CSV file looks after we delete AccountNum (Vendor Account). Save and close the SCV.
4-Go to the DIXF > Processing Group > Select the vendor processing group then click the entities button.
5- In the entities form make sure that the vendor entitiy is selected, and SCV file path is correct then click generate source mapping.
6- Then click the modify source mapping button
7- Click Mapping Details button.
8- Click New to create new record, then make sure to select the Auto-generated check box ( This is the trick), go to the staging field and select the AccountNum field. click Ctrl + S to save then close the form and go back to the entities form.
9- Click preview source file button to see the data. note that AccountNum values was generated automatically. Close the form.
10- Now we are ready to start the importing process. However let's go and check the next free number in the vendor number sequence. go to Accounts payable > Setup > Accounts payable parameters > number sequences > select the vendor number Sequence code > Right click > View Details.
11- Note that the next free number is Vend-000001. Close the form.
12- Go back to the DIXF > processing group > Select the vendor group then click Get staging data button.
13- Click Ok to create job.
14- Click Run in the staging data execution form.
15- Click Ok.
16- The records will be inserted in the staging. close the infolog.
17- Next, In the processing group select the group name then click Copy Data to target button.
18- Select the Job ID that we created in step 13 then click OK
19- Click run to import
20- Click Ok.
21- The data will be written to target
22- Go to the Vendor List form, note that vendors codes was imported successfully.
Cool isn't it
See Also
No comments:
Post a Comment