HiFinance 5


 

SECTION 3.5.5.2 - SPECIAL PRICING MASTER-FILE ASCII IMPORT

 

USAGE: To import a file containing, all or a subset, of new or changed information to be posted to the Inventory Special Pricing master-file. The input file is required to be in a very strictly stylised format so that HiFinance can allocate data to the correct fields on the correct Inventory records.

 

DISCUSSION: Make sure that you have a good backup of your data and that no-one is using HiFinance during the update. HiFinance may not update the files as you expected and the only completely safe way to correct the mistake is to restore your data from backup.

 

Note: Unlike other ASCII Import programs, this program requires that all fields must be present. This is because the information must be validated and crosschecked. The validation is the same as that in the SPECIAL PRICING MAINTENANCE (see SECTION 3.5.1).

 

The import file required must be called spricemf.csv, although case is not important in Windows. This file must reside in your data directory, eg \HF5DATA\COMP1. Also, the file must not be in use. This is important because if you have created the file from a spreadsheet and have saved it but not closed it, the file will still be locked by the spreadsheet program and HiFinance will not be able to open it.

 

The input file must be in CSV format. This is a comma-delimited file (without quotes) with one record per line. Exporting from Excel, choosing the CVS format, will produce the correct format automatically. Each alphanumeric field must be left justified. HiFinance will make no attempt to remove leading spaces (for names, etc.). Numeric fields should not have any dollar signs or commas. Do not use commas in any alpha fields. These will be treated as a field break and HiFinance will not import the row correctly. A blank cell will be treated as a valid entry, thus a blank alpha cell will clear the corresponding field in the master-file and a blank numeric cell will reset the corresponding field in the master-file to zero. Thus if you do not wish to change a field, either delete the row, delete the column or make sure that the cell contains the same information as the field in the master-file currently has.

 

The first line of the input file must contain only field names. These fields are mostly identical to those exported using SPECIAL PRICING ASCII EXPORT (see SECTION 3.5.4.2). In fact the easiest way to create the initial file is to export it first using this program with the headings option turned on. This also has the advantage of accurately exporting the current information. There are some fields available in the Export program that are not required in the Import program. These must be removed before importing. The full list is detailed below. Note the use of the underscore character instead of spaces. This format must be copied exactly.

 

INVENTORY_CODE

DEBTOR_CODE

SPECIAL_PRICE

START-ON

STOP-ON

NORMAL_PRICE

 

Notes:

1)                 The order of the columns is not important but they must not appear more than once.

2)                 All columns must be present.

3)                 If you try to import the raw file form the ASCII EXPORT program, it will not read in successfully unless you choose to export with comma delimiters between fields and without quotes around fields (numeric and alphanumeric). This can be set in the options part of the export program. Normally this is not the way this function is used, the purpose of this function being to manipulate the file in a spreadsheet program and importing the result.

4)                 All  fields are verified on import. You must enter valid information. For the field that are validated, invalid data will be ignored.

5)                 Dates must be in the format dd/mm/yyyy, which is the default export for Excel. Leading zeros are ignored, eg 1/1/2005 will work just as well as 01/01/2005 or 1/01/2005 but not 01012005.

6)                 A Debtor code * will be taken as meaning all Debtors to get the special price for the chosen Inventory code.

 

When the program starts, it will firstly check whether the import file exists and is accessible. Having established this, HiFinance will read the first line of the file and check for its correctness. If no obvious errors are found, you will be asked to confirm that you have made a backup and then you will be asked to confirm that you wish to proceed.

 

You will be asked if you wish to clear the current file. If you wish to just update a few entries or add to the existing file, answer NO. Otherwise, if you wish to completely replace the current SPECICAL PRICING file with the new data, answer YES.

 

HiFinance will then read import lines one at a time confirming firstly that the INVENTORY_CODE field corresponds to an Inventory code and that the DEBTOR-CODE refers to a Debtor and write or relace the fields and records, as defined by the columns you have chosen. If an invalid or blank row is encountered, it will be skipped. HiFinance will continue processing until it reaches the end of the import program. Finally the import file will be renamed to spricemf.old (to stop you from accidentally rerunning the program with used data) before returning you the MAIN MENU.

 

Return to Table of Contents  Return to Table of Contents