‎2007 Mar 13 10:05 PM
Hi Folks
I need to write a batch program that will run once a day and create and send a File formatted according to requirements to a third party on their FTP server
I need to query ZTABLE(KUNNR, VBELN, ERDAT, ERZET, FLAG) for all records where FLAG = space. After the records are written into the file, then I need to update FLAG = 'X'. Can someone please help me get started on this. Any help is greatly appreciated
The file contains Name/Address Record, Credit Order Record, Credit Order Sub Total Record and Credit Order Total Record. Each record is separated by carriage return and line feed.
<b>The Name/Address Record contains</b>
Client Number (4)= 9999
Record Type (1)= 'A'
Customer Number (15, left justified, keep leading zeroes, right fill with spaces)= VRKPA-KUNNR
Customer Name = ADRC-NAME1
<b>Credit Order Record</b>
Client Number (4) = 9999
Client Order Number (22, first 14 characters) = VBAK-VBELN
Order Amount (8) = VBAK-NETWR (use whole dollars only, no cents)
<b>Credit Order Sub Total Record</b>
Client Number(4) = 9999
Number of Order Records (6) = no of order detail records for this client number
Filler (6) = spaces
Total Order Amount (12) = use whole dollars, no cents
<b>Credit Order Total Record</b>
Client Number(4) = 9999
Total Order Amount (12) = use whole dollars only
‎2007 Mar 14 12:16 AM
Hi Megan
first you create work areas of the type of records mentioned .
After fetching the whole data in some intrenal table you can use these work areas to write tha data into the file using open dataset and transfer command .
after succesful uploading the file you can write update query to update the records to set the flag 'X'
Then you can schedule the program using SM36
Let me know if you were looking something else.
Best Regards
Naresh
‎2007 Mar 14 12:16 AM
Hi Megan
first you create work areas of the type of records mentioned .
After fetching the whole data in some intrenal table you can use these work areas to write tha data into the file using open dataset and transfer command .
after succesful uploading the file you can write update query to update the records to set the flag 'X'
Then you can schedule the program using SM36
Let me know if you were looking something else.
Best Regards
Naresh