Creating .txt file for Uploading - Vantage 8.03.409a

Approached from a different angle and think I've cracked it :)


DEFINE VARIABLE  cRecType AS CHARACTER NO-UNDO.
DEFINE VARIABLE  cIDSender1 AS CHARACTER NO-UNDO.
DEFINE VARIABLE  cInvcNum AS CHARACTER NO-UNDO.

output to "E:\Epicor\TMat Custom Info\Data Export Logs\Invoice.txt" append.

For First ttInvcHead no-lock:

If Available ttInvcHead Then DO:
cRecType = "BGM".
cInvcNum = String(ttInvcHead.InvoiceNum).

PUT UNFORMATTED
        cRecType AT 1
        cIDSender1 AT 4
        cInvcNum AT 8.

Hi


We have been requested by a customer if we can create .txt files to upload our AR Invoices.  In the past we've always done this via .csv, Excel, etc and I'm not sure how to create the file they've requested.


For example, the requested file layout is:

Field 1 - Obligatory - 3 chrs - Pos 1

Field 2 - Obligatory - 6 chrs - Pos 4

Field 3 - Obligatory - 35 chrs - Pos 10

Field 4 - Optional - 14 chrs - Pos 45

Field 5 - Optional - 4 chrs - Pos 59


Then the file would be:

INV123456TEST                                             F5  .


They don't need the . at the end but I used it to show where the data would finish... I can create a BAQ, crystal report, etc for the data but am not sure how to get it into such a format - any advice please?

#ygrps-yiv-593091145 P.ygrps-yiv-593091145b1e7fd89-0279-4ffe-a16a-1f1bcba0d537 { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-593091145 LI.ygrps-yiv-593091145b1e7fd89-0279-4ffe-a16a-1f1bcba0d537 { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-593091145 DIV.ygrps-yiv-593091145b1e7fd89-0279-4ffe-a16a-1f1bcba0d537 { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-593091145 TABLE.ygrps-yiv-593091145b1e7fd89-0279-4ffe-a16a-1f1bcba0d537Table { MARGIN:0cm 0cm 0pt;} #ygrps-yiv-593091145 DIV.ygrps-yiv-593091145Section1 { }

You best option would be a BPM to create this,

You could get that to fire when you posted the group or some other point.

 

This can then format exactly as you need it to and write out to a folder.

 

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, September 18, 2015 1:55 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Creating .txt file for Uploading - Vantage 8.03.409a

 

 

Hi

 

We have been requested by a customer if we can create .txt files to upload our AR Invoices.  In the past we've always done this via .csv, Excel, etc and I'm not sure how to create the file they've requested.

 

For example, the requested file layout is:

Field 1 - Obligatory - 3 chrs - Pos 1

Field 2 - Obligatory - 6 chrs - Pos 4

Field 3 - Obligatory - 35 chrs - Pos 10

Field 4 - Optional - 14 chrs - Pos 45

Field 5 - Optional - 4 chrs - Pos 59

 

Then the file would be:

INV123456TEST                                             F5  .

 

They don't need the . at the end but I used it to show where the data would finish... I can create a BAQ, crystal report, etc for the data but am not sure how to get it into such a format - any advice please?



Stephen Edginton (Beng) | Solutions & Technical Director

Mobile:  +44 7734 858415
DDI:  +44 121 314 1179
Main:  +44 (0) 121 314 1170
Web:  www.dotnetit.co.uk

Dot Net IT Limited, One St Kenelm Court, Steel Park Road, Halesowen, B62 8HD, United Kingdom.

DotNetIT

Epicor Platinum Partner

Epicor Alliance Partner

I agree with Stephen we've done this a lot for NACH file transfers and bank positive pay stuff. Its pretty standard, write a simple BPM that gets the data you need and out puts it in whatever format.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Fri, Sep 18, 2015 at 9:05 AM, Stephen Edginton stephene@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <p>

You best option would be a BPM to create this,

You could get that to fire when you posted the group or some other point.

Â

This can then format exactly as you need it to and write out to a folder.

Â

Â

Â

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, September 18, 2015 1:55 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Creating .txt file for Uploading - Vantage 8.03.409a

Â

Â

Hi

Â

We have been requested by a customer if we can create .txt files to upload our AR Invoices. In the past we've always done this via .csv, Excel, etc and I'm not sure how to create the file they've requested.

Â

For example, the requested file layout is:

Field 1 - Obligatory - 3 chrs - Pos 1

Field 2 - Obligatory -Â 6 chrs - Pos 4

Field 3 - Obligatory - 35 chrs - Pos 10

Field 4 - Optional - 14 chrs - Pos 45

Field 5 - Optional - 4 chrs - Pos 59

Â

Then the file would be:

INV123456TESTÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â F5Â .

Â

They don't need the . at the end but I used it to show where the data would finish... I can create a BAQ, crystal report, etc for the data but am not sure how to get it into such a format - any advice please?



Stephen Edginton (Beng) | Solutions & Technical Director

Mobile: Â +44 7734 858415
DDI: Â +44 121 314 1179
Main: Â +44 (0) 121 314 1170
Web: Â www.dotnetit.co.uk

Dot Net IT Limited, One St Kenelm Court, Steel Park Road, Halesowen, B62 8HD, United Kingdom.

DotNetIT

Epicor Platinum Partner

Epicor Alliance Partner

</div>
 


<div style="color:#fff;min-height:0;"></div>

There are any number of choices.

1. using a BAQ you can call the BAQ and take the dataset it returns using standard VB write to a text file,  Many examples on the Web on how to take a dataset and turn it in a csv file.  You can add code to either FTP or Email the file to the customer, again all standard VB.  (VB since you are on 8.03)  Example on how to run a BAQ from code are in other postings on this group.
2. using Crystal format the report so that it outputs a comma delimited format.  Examples abound on the web on how to do that.  You can combine that with Advanced Print Management if you have it.  When you "print" this customer's invoices APM would take the resulting data and email it to the customer.  Otherwise you would preview the report and then do a save as.
3. service Connect can do all or part of it.
4. BPMs can do it but you would use Progress to create and output the file.

Jim Kinneman
Encompass Solutions, Inc
Thanks everyone.  I've created.csv files before but not without a delimiter and forcing the blank spaces so I'll look through all the options and have a google now I know it's possible with what we have available.

Slightly delayed but I'm back on this project.... I decided to approach the project using a BPM and have the following:


/* Create .txt file for Invoice */

DEFINE VARIABLE  cRecType AS CHARACTER FORMAT "x(3)" NO-UNDO.
DEFINE VARIABLE  cIDSender1 AS CHARACTER FORMAT "x(4)" NO-UNDO.
DEFINE VARIABLE  cInvcNum AS CHARACTER FORMAT "x(8)" NO-UNDO.


output to "E:\Epicor\TMat Custom Info\Data Export Logs\Invoice.txt" append.


For First ttInvcHead no-lock:


If Available ttInvcHead Then DO:


cRecType = "BGM".
cInvcNum = String(ttInvcHead.InvoiceNum).


put unformatted cRecType cIDSender1 cInvcNum.


end.
output close.
END.
/* end of export */


The file is being created fine but the data is showing as:

BGM120164


When I need it to show as:

BGM____120164__  (The underlines should just be spaces!)


I'm not sure I'm googling the right response as I can't find a way to force the spaces?  Thanks in advance.