countnikon
22nd March 2006, 16:35
Hi all,
Hopefully this will be an easy question for you guys. I'm exporting data from an Oracle database to an Excel document that will be uploaded to a web server. The thing is that the particular table does not have a specific field that is required for the document. Instead of making the users input the data and modify the table structure and session, I want to dynamically add it in based on the description. I was wondering if there is a function that is already out there to do this? Thanks all.
|******************************************************************************
|* tdinv9240 0 VRC B40C c4 csi0
|* Export CSV and Upload to Site
|* General_User_Unix
|* 2006-03-21
|******************************************************************************
|* Main table tdinv001 Item Data by Warehouse, Form Type 4
|******************************************************************************
|****************************** declaration section ***************************
declaration:
table ttdinv001 | Item Data by Warehouse
table ttiitm001 | Items
table ttccom010 | Customers
table ttccom013 | Customer Addresses
|****************************** form section **********************************
|****************************** choice section ********************************
|****************************** field section *********************************
|****************************** function section ******************************
functions:
function read.main.table()
{
serverfilename = "/baan/parts/inventbycwar.txt"
select *
from tdinv001
where tdinv001.item > "JAA000"
and tdinv001.item < "JGZ999"
selectdo
output.line( """"&tdinv001.item
&"|"&tdinv001.seab
&"|"&tdinv001.dsca
&"|"&tdinv001.pric
&"|"&tdinv001.stoc
&"|"&getcatagory()
&"""")
endselect
templong = run.prog("/usr/local/bin/baan.parts_upload", hold.datestring,RP_WAIT)
}
function domain tcnama getcatagory()
{
domain tcnama ret.val
return(ret.val)
}
Hopefully this will be an easy question for you guys. I'm exporting data from an Oracle database to an Excel document that will be uploaded to a web server. The thing is that the particular table does not have a specific field that is required for the document. Instead of making the users input the data and modify the table structure and session, I want to dynamically add it in based on the description. I was wondering if there is a function that is already out there to do this? Thanks all.
|******************************************************************************
|* tdinv9240 0 VRC B40C c4 csi0
|* Export CSV and Upload to Site
|* General_User_Unix
|* 2006-03-21
|******************************************************************************
|* Main table tdinv001 Item Data by Warehouse, Form Type 4
|******************************************************************************
|****************************** declaration section ***************************
declaration:
table ttdinv001 | Item Data by Warehouse
table ttiitm001 | Items
table ttccom010 | Customers
table ttccom013 | Customer Addresses
|****************************** form section **********************************
|****************************** choice section ********************************
|****************************** field section *********************************
|****************************** function section ******************************
functions:
function read.main.table()
{
serverfilename = "/baan/parts/inventbycwar.txt"
select *
from tdinv001
where tdinv001.item > "JAA000"
and tdinv001.item < "JGZ999"
selectdo
output.line( """"&tdinv001.item
&"|"&tdinv001.seab
&"|"&tdinv001.dsca
&"|"&tdinv001.pric
&"|"&tdinv001.stoc
&"|"&getcatagory()
&"""")
endselect
templong = run.prog("/usr/local/bin/baan.parts_upload", hold.datestring,RP_WAIT)
}
function domain tcnama getcatagory()
{
domain tcnama ret.val
return(ret.val)
}