project QadFinancials > class BMFGInvoiceHistoryLC > API query SelectInvoiceHistoryLC (optimised)


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
tidhlc_hist.idhlc__qadc01c=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc__qadc02c=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_acctc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_ccc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_charge_categoryc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_charge_typec=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_descc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_desc1c=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_desc2c=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_domainc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_fr_classc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_fr_wtd=,>=,>,<>,<=,<
tidhlc_hist.idhlc_fr_wt_umc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_inv_nbrc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_linei=,>=,>,<>,<=,<
tidhlc_hist.idhlc_mod_datet=,>=,>,<>,<=,<
tidhlc_hist.idhlc_mod_useridc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_nbrc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_partc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_priced=,>=,>,<>,<=,<
tidhlc_hist.idhlc_prodlinec=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_projectc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_qty_invd=,>=,>,<>,<=,<
tidhlc_hist.idhlc_subc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_sub_linei=,>=,>,<>,<=,<
tidhlc_hist.idhlc_tax_envc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_tax_usagec=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_taxablel=,<>
tidhlc_hist.idhlc_taxcc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_trlc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_umc=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_userc01c=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.idhlc_userc02c=,>=,>,<>,<=,<,begins,can-do,matches
tidhlc_hist.oid_idhlc_histd=,>=,>,<>,<=,<


query condition


  each idhlc_hist where


query resultset tqSelectInvoiceHistoryLC


field namedata typedb fielddescription
tcidhlc__qadc01characteridhlc_hist.idhlc__qadc01
tcidhlc__qadc02characteridhlc_hist.idhlc__qadc02
tcidhlc_acctcharacteridhlc_hist.idhlc_acctSales Acct
tcidhlc_cccharacteridhlc_hist.idhlc_ccCost Ctr
tcidhlc_charge_categorycharacteridhlc_hist.idhlc_charge_categoryCategory
tcidhlc_charge_typecharacteridhlc_hist.idhlc_charge_typeCharge Type
tcidhlc_desccharacteridhlc_hist.idhlc_descDescription
tcidhlc_desc1characteridhlc_hist.idhlc_desc1Description
tcidhlc_desc2characteridhlc_hist.idhlc_desc2Description
tcidhlc_domaincharacteridhlc_hist.idhlc_domainDomain
tcidhlc_fr_classcharacteridhlc_hist.idhlc_fr_classFreight Class
tdidhlc_fr_wtdecimalidhlc_hist.idhlc_fr_wtUnit Ship Weight
tcidhlc_fr_wt_umcharacteridhlc_hist.idhlc_fr_wt_umUM
tcidhlc_inv_nbrcharacteridhlc_hist.idhlc_inv_nbrInvoice
tiidhlc_lineintegeridhlc_hist.idhlc_lineSO Line
ttidhlc_mod_datedateidhlc_hist.idhlc_mod_dateModified Date
tcidhlc_mod_useridcharacteridhlc_hist.idhlc_mod_useridUser ID
tcidhlc_nbrcharacteridhlc_hist.idhlc_nbrSales Order
tcidhlc_partcharacteridhlc_hist.idhlc_partItem Number
tdidhlc_pricedecimalidhlc_hist.idhlc_pricePrice
tcidhlc_prodlinecharacteridhlc_hist.idhlc_prodlineProduct Line
tcidhlc_projectcharacteridhlc_hist.idhlc_projectProject
tdidhlc_qty_invdecimalidhlc_hist.idhlc_qty_invQty Invoiced
tcidhlc_subcharacteridhlc_hist.idhlc_subSales Sub-Acct
tiidhlc_sub_lineintegeridhlc_hist.idhlc_sub_lineCharge Line
tcidhlc_tax_envcharacteridhlc_hist.idhlc_tax_envTax Environment
tcidhlc_tax_usagecharacteridhlc_hist.idhlc_tax_usageTax Usage
tlidhlc_taxablelogicalidhlc_hist.idhlc_taxableTaxable
tcidhlc_taxccharacteridhlc_hist.idhlc_taxcTax Class
tcidhlc_trlcharacteridhlc_hist.idhlc_trlTrailer
tcidhlc_umcharacteridhlc_hist.idhlc_umUM
tcidhlc_userc01characteridhlc_hist.idhlc_userc01User Field Character 1
tcidhlc_userc02characteridhlc_hist.idhlc_userc02User Field Character 2
tdoid_idhlc_histdecimalidhlc_hist.oid_idhlc_hist
idhlc_histCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(idhlc_hist)


Internal usage


unused


Sample code: how to call this query through RPCRequestService (QXtend Inbound)

define temp-table ttContext no-undo
    field propertyQualifier as character
    field propertyName as character
    field propertyValue as character
    index entityContext is primary unique
        propertyQualifier
        propertyName
    index propertyQualifier
        propertyQualifier.

define dataset dsContext for ttContext.

define variable vhContextDS as handle no-undo.
define variable vhExceptionDS as handle no-undo.
define variable vhServer as handle no-undo.
define variable vhInputDS as handle no-undo.
define variable vhInputOutputDS as handle no-undo.
define variable vhOutputDS as handle no-undo.
define variable vhParameter as handle no-undo.

/* Create context */
create ttContext.
assign ttContext.propertyName = "programName"
       ttContext.propertyValue = "BMFGInvoiceHistoryLC".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "SelectInvoiceHistoryLC".
create ttContext.
assign ttContext.propertyName = "applicationId"
       ttContext.propertyValue = "fin".
create ttContext.
assign ttContext.propertyName = "entity"
       ttContext.propertyValue = "1000".
create ttContext.
assign ttContext.propertyName = "userName"
       ttContext.propertyValue = "mfg".
create ttContext.
assign ttContext.propertyName = "password"
       ttContext.propertyValue = "".

/* Create input dataset */
create dataset vhInputDS.
vhInputDS:read-xmlschema("file", "xml/bmfginvoicehistorylc.selectinvoicehistorylc.i.xsd", ?).
vhParameter = vhInputDS:get-buffer-handle("tParameterI").
vhParameter:buffer-create().

assign vhParameter::icRange = "A"
       vhParameter::icRowid = ""
       vhParameter::iiRownum = 0
       vhParameter::iiNumber = 5 /* Number of records to read */
       vhParameter::icSortColumns = ""
       vhParameter::ilCountOnly = false
       vhParameter::ilForwardRead = true
       vhParameter::iiMaximumBrowseRecordsToCount = 0.

vhParameter = vhInputDS:get-buffer-handle("tFilter").
vhParameter:buffer-create().

assign vhParameter::<field-name-1> = <field-value-1>
       vhParameter::<field-name-2> = <field-value-2>
       ...

/* Connect the AppServer */
create server vhServer.
vhServer:connect("-URL <appserver-url>").

if not vhServer:connected()
then do:
    message "Could not connect AppServer" view-as alert-box error title "Error".
    return.
end.

/* Run */
assign vhContextDS = dataset dsContext:handle.

run program/rpcrequestservice.p on vhServer
    (input-output dataset-handle vhContextDS by-reference,
           output dataset-handle vhExceptionDS,
     input        dataset-handle vhInputDS by-reference,
     input-output dataset-handle vhInputOutputDS by-reference,
           output dataset-handle vhOutputDS).

/* Handle output however you want, in this example, we dump it to xml */
if valid-handle(vhExceptionDS)
then vhExceptionDS:write-xml("file", "Exceptions.xml", true).

if valid-handle(vhOutputDS)
then vhOutputDS:write-xml("file", "Output.xml", true).

/* Cleanup */
vhServer:disconnect().
assign vhServer = ?.

if valid-handle(vhInputDS)
then delete object vhInputDS.

if valid-handle(vhOutputDS)
then delete object vhOutputDS.

if valid-handle(vhExceptionDS)
then delete object vhExceptionDS.