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!

Invoice Import Routine

Status
Not open for further replies.

pellj001

Programmer
Feb 24, 2010
17
MT
I have a routine which generates xml and dbf files. These are manually imported in ACCPAC 5.5A. I would like to automate this process.
I have tried using Macros in ACCPAC and the idea was to record a macro while inputting an invoice. From my application I would then generate the same code, (changing only the values), and run this macro using a scheduler. However, it seems that the avb file generated by ACCPAC is compiled. Is there a way to compile my .bas or .mac file to .AVB?
 
Thanks for the quick reply. is there an alternative though to what i am trying to achieve?
 
Thanks again. But I need to automate the task of import without manual intervention. I thought may be there is a way to execute the avb code using a command line compiler or an application which accecpts the avb code as a parameter.
 
Thanks but this still does not solve the problem, since I would still need to create the AVB manually using Visual Basic Editor. As I am seeing it, the AVB files cannot be created or edited using a normal text editor, since when created using visual basic editor, will contain garbage data in them. I can only create the .bas source files automatically.

Please note that this is a routine which is done at least 3 times a day.

Another solution would be to write a vba which simulates an xml import but unfortunately I do not how to do that.
 
From the Accpac desktop, select Macro/Edit, and select the AVB. What's so hard about that?
 
I am sorry but I do not understand.

So I go in ACCPAC desktop, select macro, start recording, go in the invoicing module, import my xml file and stop recording. This creates an invoice batch depending on the import files (in my test case it is one invoice line value 100). It will then open the visual basic editor with the created macro. If I run this macro, it will recreate an empty invoice batch with no lines in it. It will not redo the process of importing the batch again.

So my question is, is it possible to automate invoice imports in ACCPAC? If so, how?
 
Yes, it's very possible, I (and lots of others on this forum) do it for a living. But I never use XML. You should record a macro where you manually add lines to a batch. Then from that, wrap the code with loops that read your input file.
 
Other people can do it...
VBA macros (that's the AVB file you see) cannot be scheduled, you need to either write a VB6 app or use VBS or something like that before you can schedule it, or purchase a product that allows you to schedule VBA macros, or write a program that you can schedule to run a VBA macro, or...
There are a million possibilities, it all depends on your skill levels.
 
Yes, it's very possible, I (and lots of others on this forum) do it for a living"

Do you do this for your own company or you do it for other companies as we would be interested in contracting someone to develop this for us?
 
I would say 90% of people who respond to questions here are Accpac consultants and programmers that contract with companies to provide services.
 
Contact your Accpac dealer. If they can't do it then they'll be able to find someone to contract to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top