popeye
13th October 2003, 19:59
Hi ... This is not my script.
I just picked it up from a colleague.
Hence did not go thru it.
He is calling a BOI in this script.
Check it out.
Hope this helps.
Cheers,
Popeye!
|****************************** DECLARATION SECTION ***************************
extern long handle.container.StructError
extern long handle.container.Structpurord
extern long handle.container.StructpurordKeyFields2
extern long Structpurord
extern long StructError
extern string SetComplete(1)
extern long CallId
extern long error.code
domain tcorno pono
long corg
domain tcsuno suno
domain tccotp otyp
domain tcccor ccor | Postal add
domain tcncmp comp | Company
domain tccono prno | Contract
domain trtoc.ctrj ctrj |Routeplan
string odat(8), ddat(8), ddtc(8) |ord,del,conf del dates
domain tcrefa refa | Ref A
domain tccwar cwar | Warehouse
domain tcrefb refb | Ref B
domain tcdisc odis | Order disc
domain tccdec cdec | Terms of Del
domain tccpay cpay | Terms of payment
domain tcemno ccon | Buyer
domain tcccty ccty | Country
domain tcclan clan | Lang
domain tcccur ccur | Currency
domain tcratp ratp | Purchase rate
domain tcratf ratf | Rate factor
domain tcccrs ccrs | Late paymt Surch
domain tccplt cplp | Purcs price lst
domain tcsuno pspr | Supplier prices
domain tcsuno pstx | suppl text
domain tccfrw cfrw | forwading agent
domain tccreg creg | area
domain tccbrn cbrn | line of business
domain tfacp.ragr ragr | Rem agrmt
domain tclogn akln | acklogin
domain tfacp.fisu cfsg | fin sup grp
domain tctxtn txta,txtb
string user(16)
string ackm(8)
long no.of.sequence,I
string mcode(10)
string mesg(100)
long hcode
#include<bic_xma>
|******************** FUNCTION SECTION ***************************
function main()
{
ccpurtstpurord.init.object()
handle.container.Structpurord = type.define(
tlong ,"PurchaseOrder",
tlong ,"Origin",
tstring ,"Name",
tstring ,"POStatus",
tstring ,"Supplier",
tstring ,"SearchKey",
tstring ,"OrderType",
tstring ,"Description",
tlong ,"Code",
tstring ,"PostalAddress",
tlong ,"Company",
tstring ,"CompanyName",
tstring ,"Cty",
tstring ,"Desc",
tlong ,"Contract",
tstring ,"Description1",
tstring ,"Name1",
tstring ,"RoutePlan",
tstring ,"Description2",
tstring ,"Address",
tstring ,"OrderDate",
tstring ,"City",
tstring ,"DeliveryDate",
tstring ,"DelDate",
tstring ,"City2",
tstring ,"ConfirmedDeliveryDate",
tstring ,"ReferenceA",
tlong ,"DeliveryAddress",
tstring ,"Warehouse",
tstring ,"ReferenceB",
tstring ,"Cty1",
tstring ,"Desc1",
tdouble ,"OrderDiscount",
tstring ,"Name2",
tstring ,"TermofDelivery",
tstring ,"Description3",
tstring ,"Address1",
tstring ,"TermsofPayment",
tstring ,"Description4",
tstring ,"City1",
tlong ,"Buyer",
tstring ,"Name3",
tstring ,"City3",
tlong ,"T",
tstring ,"Country",
tstring ,"Description5",
tstring ,"Language",
tstring ,"Description6",
tstring ,"Currency",
tstring ,"Description7",
tdouble ,"PurchaseRate",
tlong ,"Ratefactor",
tstring ,"LatePaymentSurcharge",
tstring ,"Description8",
tstring ,"PurchasePriceList",
tstring ,"Description9",
tstring ,"SupplierPrices",
tstring ,"SupplierTexts",
tstring ,"ForwardingAgent",
tstring ,"Description10",
tstring ,"Area",
tstring ,"Description11",
tstring ,"LineofBusiness",
tstring ,"Description12",
tlong ,"Tax",
tstring ,"RemittanceAgreement",
tstring ,"WorkDescription",
tlong ,"GeneratedforEDI",
tstring ,"AcknowlegmentDate",
tstring ,"Ack By",
tstring ,"FinancialSupplierGroup",
tstring ,"POComment",
tlong ,"POSource",
tstring, "RecordStatus")
handle.container.StructpurordKeyFields2 = type.define(
tlong,"PurchaseOrder")
Structpurord = container.create(handle.container.Structpurord,1)
pono = 900691
corg = 2
suno = "100000"
akln= "rbasava12"
error.code=container.set.nfields(Structpurord,1,"PurchaseOrder",201674,
"Ack By",akln,"AcknowlegmentDate","20000724")
error.code = ccpurtstpurord.Change(Structpurord,"69,70",100,StructError)
container.get.fields(StructError,1,mcode,mesg,no.of.sequence,hcode)
if error.code <> 0 then
message("errordesc %s", mesg)
else
message("Updated")
endif
}