Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accpac Import Macro

Status
Not open for further replies.

MrACrowley

Programmer
Feb 10, 2011
4
AU
Hi

I'm looking to create a macro to import orders but my Accpac know-how isn't too flash.
I tried the obvious, which was to use the macro record function during an import but the resulting macro did absolutely nothing.
I figure I've missed something obvious so if someone could point me in the right direction, it would be most appreciated.

thank you for taking the time to read this request
Mr Crowley
 
Record a macro, manually add an order, then wrap your code around it to read data from your external file.
 
What tuba says, we do it all the time.
The macro recording function will not record the file, import process.
 
*reel* cheers very much for the rapid reply

unfortunately I think I'm going to have to downgrade my description of my accpac knowledge from "not too flash" to "not a clue" .... not quite sure I followed your explanation.... any chance you could elaborate some?


more detail of task if needed:
We're looking to create a program that converts our incoming orders to an accpac export format (the single file csf) so this macro's just the last little bit to import those files back into accpac. Was hoping/expecting this part to be more straight forward than it is... I mean it's not a complicated process... single file/fixed location import.. getting stumped on it is making me feel kinda slow :p.

 
re: What has your local Accpac consultant told you?

How much it's going to cost :p

Which pretty much leaves me trying to learn VBA in 2 days to impress my boss :(

 
Since you don't have any relevant programming skills, you need to export an existing order and look at the format. Just export the minimum fields: the fields marked with asterisks, plus customer number, order date, item number, quantity ordered, and location. Then create your import file in that format. The RECTYPE records are the top are required. When you test your import, if you forgot any fields, it will tell you which ones you missed.
 
re: Since you don't have any relevant programming skills, you need to export an existing order and look at the format. Just export the minimum fields: the fields marked with asterisks, plus customer number, order date, item number, quantity ordered, and location. Then create your import file in that format. The RECTYPE records are the top are required. When you test your import, if you forgot any fields, it will tell you which ones you missed.

We did all that an it manually imports fine. I'm just being stumped by the last little bit my boss wants which is a macro that imports those files again.
 
The Accpac COMAPI has an ExportImport object that could automate this, but it only uses XML format.

However, tell your boss that when you automate imports, data needs to be pre-validated, otherwise the program will stop when it gets to the errors like "Customer xxx does not exist". Since you have to pre-validate, you need code. If you have code, then the import format doesn't matter.

I think you're better off sticking with a manual import and letting a human see the results and react accordingly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top