|
Blogs
In this blog we will highlight some tips on how to use the DTW so you can ensure your import/update runs as smoothly as possible. DI API Help FileThe DI API Help File is a vital resource to use when using the DTW along with the comments in the data templates delivered with the DTW. The DI API Reference lists all exposed objects with methods and properties. For each object you can find information on the Detailed Description, Field name & length, Property type and Syntax. Example: Import Manual Journal Entries
So for each field if you are unsure which value (especially enumeration fields) should go into the DTW files it is important to verify it in the DI API help file. LineNumIf you are adding new records or updating a record to add additional information (e.g. add new Warehouse or add new contact persons) you need to leave LineNum blank. LineNum column is used only during Update mode. LineNum must be an integer so if you want to update the first line/record you assign the value 0 to the LineNum field in the data file. If you wish to update the second line/record, you assign the value 1 to LineNum and so on. It is important to never remove this column even if no values are entered. Example: To import new data to an existing record you need to select the checkbox "Add all Items into Schema if can't find corresponding item when updating". Object NamesIn general, the names of objects in the DTW and SAP Business One are similar. The exceptions are as follows:
Template StructureTemplates explainedThe first row consists of the properties from the DI API. We recommend that the first line in the template is not changed as this might cause incorrect mapping. This can result in data not being imported and no error messages returned. The second row consists of the explanations of the properties. This line can be changed for a better explanation of the property. Do not use special characters or empty spaces. Un-used columnsWe strongly suggest that columns are not deleted from the templates. If a value is not required to be added or updated leave the column blank to avoid problems. Deleting columns can cause records not being imported or unexplained error messages. RecordKeyThis key identifies the header record from other records. To improve the performance, RecordKey values are sorted in order during the import. The same RecordKey for one object must be entered in both templates for the header and line templates. Special Characters in the templateSpecial characters such as double byte characters, commas, double quotation marks etc can prevent correct mapping. Microsoft excel generates a .csv/.txt file in non-unicode encoding or seperates the data in additional columns which cannot be recognised by the DTW. Its good to open a file in plain text to see if you can see any incorrect characters. Other Tips
Our next blog will cover the topic of how to send an Email with an attachment via the DI API. So catch you then :-)
Lisa Mulchinock is a senior SDK support consultant for SAP Business One. Add to: del.icio.us | Digg | Reddit
|