project QadFinancials > class BMfgPO > API query SelectPurchaseOrder

Description

SelectPurchaseOrder: Select Mfg Purchase Orders


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
icDomainCodec=
tpo_mstr.oid_po_mstrd=,>=,>,<>,<=,<
tpo_mstr.po_ap_acctc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_ap_ccc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_ap_subc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_app_ownerc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_bankc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_billc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_blanketc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_buyerc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_cls_datet=,>=,>,<>,<=,<
tpo_mstr.po_cmtindxi=,>=,>,<>,<=,<
tpo_mstr.po_confirml=,<>
tpo_mstr.po_consign_cost_pointc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_consignmentl=,<>
tpo_mstr.po_contactc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_contractc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_cr_termsc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_crt_intd=,>=,>,<>,<=,<
tpo_mstr.po_currc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_cyclc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_del_toc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_disc_pctd=,>=,>,<>,<=,<
tpo_mstr.po_domainc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_due_datet=,>=,>,<>,<=,<
tpo_mstr.po_duty_typec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_eff_strtt=,>=,>,<>,<=,<
tpo_mstr.po_eff_tot=,>=,>,<>,<=,<
tpo_mstr.po_ent_exd=,>=,>,<>,<=,<
tpo_mstr.po_ers_optc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_est_valued=,>=,>,<>,<=,<
tpo_mstr.po_ex_rated=,>=,>,<>,<=,<
tpo_mstr.po_ex_rate2d=,>=,>,<>,<=,<
tpo_mstr.po_ex_ratetypec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_exru_seqi=,>=,>,<>,<=,<
tpo_mstr.po_fix_prl=,<>
tpo_mstr.po_fix_ratel=,<>
tpo_mstr.po_fobc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_frtd=,>=,>,<>,<=,<
tpo_mstr.po_fsm_typec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_fst_idc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_incl_issl=,<>
tpo_mstr.po_inv_mthdc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_is_btbl=,<>
tpo_mstr.po_langc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_max_aging_daysi=,>=,>,<>,<=,<
tpo_mstr.po_nbrc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_ord_datet=,>=,>,<>,<=,<
tpo_mstr.po_partiall=,<>
tpo_mstr.po_pr_listc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_pr_list2c=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_pr_lst_tpi=,>=,>,<>,<=,<
tpo_mstr.po_prepaidd=,>=,>,<>,<=,<
tpo_mstr.po_priced_dtt=,>=,>,<>,<=,<
tpo_mstr.po_pricing_dtt=,>=,>,<>,<=,<
tpo_mstr.po_printl=,<>
tpo_mstr.po_projectc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_pstl=,<>
tpo_mstr.po_pst_idc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_recurrl=,<>
tpo_mstr.po_rel_nbri=,>=,>,<>,<=,<
tpo_mstr.po_releasel=,<>
tpo_mstr.po_req_idc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_revd=,>=,>,<>,<=,<
tpo_mstr.po_rev_datet=,>=,>,<>,<=,<
tpo_mstr.po_rmksc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_sch_mthdc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_schedl=,<>
tpo_mstr.po_serv_chgd=,>=,>,<>,<=,<
tpo_mstr.po_shipc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_shipviac=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_sitec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_so_holdl=,<>
tpo_mstr.po_so_nbrc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_spec_chgd=,>=,>,<>,<=,<
tpo_mstr.po_statc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_tax_datet=,>=,>,<>,<=,<
tpo_mstr.po_tax_envc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_tax_usagec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_taxablel=,<>
tpo_mstr.po_taxcc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_tot_terms_codec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_trade_salel=,<>
tpo_mstr.po_trade_sale_soc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_translt_daysd=,>=,>,<>,<=,<
tpo_mstr.po_typec=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_user_idc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_user1c=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_user2c=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_vendc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_xmitc=,>=,>,<>,<=,<,begins,can-do,matches
tpo_mstr.po_zero_schedi=,>=,>,<>,<=,<


Parameters (internal)


icDomainCodecharacterDomainCode


query condition


  each po_mstr where
po_mstr.po_domain = icDomainCode


query sort order


po_mstr.po_domain (ascending)
po_mstr.po_vend (ascending)
po_mstr.po_nbr (ascending)


query resultset tqSelectPurchaseOrder


field namedata typedb fielddescription
tcpo_domaincharacterpo_mstr.po_domainDomain
tcpo_vendcharacterpo_mstr.po_vendSupplier
tcpo_typecharacterpo_mstr.po_typeType
tcpo_nbrcharacterpo_mstr.po_nbrPurchase Order
tcpo_currcharacterpo_mstr.po_currCurrency
tcpo_statcharacterpo_mstr.po_statStatus
tcpo_sitecharacterpo_mstr.po_siteSite
tcpo_so_nbrcharacterpo_mstr.po_so_nbrPrimary SO
tdpo_spec_chgdecimalpo_mstr.po_spec_chgSpecial Charge
ttpo_tax_datedatepo_mstr.po_tax_dateTax Date
tdpo_serv_chgdecimalpo_mstr.po_serv_chgService Charge
tcpo_shipcharacterpo_mstr.po_shipShip-To
tcpo_shipviacharacterpo_mstr.po_shipviaShip Via
tlpo_so_holdlogicalpo_mstr.po_so_holdSecondary SO Cr Hold
tcpo_taxccharacterpo_mstr.po_taxcTax Class
tcpo_tot_terms_codecharacterpo_mstr.po_tot_terms_codeTerms of Trade
tlpo_trade_salelogicalpo_mstr.po_trade_saleTrade Sales Contract
tcpo_trade_sale_socharacterpo_mstr.po_trade_sale_soTrade Sales SO
tdpo_translt_daysdecimalpo_mstr.po_translt_daysTransport Days
tcpo_user1characterpo_mstr.po_user1Ufld1
tcpo_user2characterpo_mstr.po_user2Ufld2
tcpo_user_idcharacterpo_mstr.po_user_idEntered By
tcpo_xmitcharacterpo_mstr.po_xmitTransm
tipo_zero_schedintegerpo_mstr.po_zero_schedZero Schedules
tcpo_tax_envcharacterpo_mstr.po_tax_envTax Environment
tcpo_tax_usagecharacterpo_mstr.po_tax_usageTax Usage
tlpo_taxablelogicalpo_mstr.po_taxableTaxable
tcpo_rmkscharacterpo_mstr.po_rmksRemarks
tcpo_sch_mthdcharacterpo_mstr.po_sch_mthdSchedules Via
tlpo_schedlogicalpo_mstr.po_schedScheduled
tcpo_ex_ratetypecharacterpo_mstr.po_ex_ratetypeRate Type
tipo_exru_seqintegerpo_mstr.po_exru_seqSequence
tlpo_fix_prlogicalpo_mstr.po_fix_prFixed Price
tlpo_fix_ratelogicalpo_mstr.po_fix_rateFixed Rate
tcpo_fobcharacterpo_mstr.po_fobFOB
tdpo_frtdecimalpo_mstr.po_frtFreight
tcpo_fsm_typecharacterpo_mstr.po_fsm_typeFSM Type
tcpo_fst_idcharacterpo_mstr.po_fst_idFST ID
tlpo_incl_isslogicalpo_mstr.po_incl_issInclude Saturday/Sunday
tcpo_inv_mthdcharacterpo_mstr.po_inv_mthdInvoices Via
tlpo_is_btblogicalpo_mstr.po_is_btbEMT PO
tcpo_langcharacterpo_mstr.po_langLanguage
tipo_max_aging_daysintegerpo_mstr.po_max_aging_daysMaximum Aging Days
tcpo_cr_termscharacterpo_mstr.po_cr_termsCredit Terms
tdpo_crt_intdecimalpo_mstr.po_crt_intCredit Terms Int
tcpo_cyclcharacterpo_mstr.po_cyclCycle Code
tcpo_del_tocharacterpo_mstr.po_del_toDeliver To
tdpo_disc_pctdecimalpo_mstr.po_disc_pctDisc %
ttpo_due_datedatepo_mstr.po_due_dateDue Date
tcpo_duty_typecharacterpo_mstr.po_duty_typeDuty Type
ttpo_eff_strtdatepo_mstr.po_eff_strtStart Effective
ttpo_eff_todatepo_mstr.po_eff_toEnd Effective
tdpo_ent_exdecimalpo_mstr.po_ent_exExch Rate
tcpo_ers_optcharacterpo_mstr.po_ers_optERS Option
tdpo_est_valuedecimalpo_mstr.po_est_valueEst Value
tdpo_ex_ratedecimalpo_mstr.po_ex_rateExch Rate
tdpo_ex_rate2decimalpo_mstr.po_ex_rate2Exch Rate 2
tlpo_partiallogicalpo_mstr.po_partialPartial OK
tcpo_pr_listcharacterpo_mstr.po_pr_listDisc Tbl
tcpo_pr_list2characterpo_mstr.po_pr_list2Price Tbl
tipo_pr_lst_tpintegerpo_mstr.po_pr_lst_tpERS Price List Option
tdpo_prepaiddecimalpo_mstr.po_prepaidAmount Prepaid
ttpo_priced_dtdatepo_mstr.po_priced_dtLast Price Dt
ttpo_pricing_dtdatepo_mstr.po_pricing_dtPricing Date
tlpo_printlogicalpo_mstr.po_printPrint PO
tcpo_projectcharacterpo_mstr.po_projectProject
tlpo_pstlogicalpo_mstr.po_pstPST
tcpo_pst_idcharacterpo_mstr.po_pst_idPST ID
tlpo_recurrlogicalpo_mstr.po_recurrRecurr
tipo_rel_nbrintegerpo_mstr.po_rel_nbrRel
tlpo_releaselogicalpo_mstr.po_releaseRelease
tcpo_req_idcharacterpo_mstr.po_req_idReq By
tdpo_revdecimalpo_mstr.po_revOrder Revision
ttpo_rev_datedatepo_mstr.po_rev_dateOrder Revision Date
ttpo_ord_datedatepo_mstr.po_ord_dateOrder Date
tdoid_po_mstrdecimalpo_mstr.oid_po_mstr
tcpo_ap_acctcharacterpo_mstr.po_ap_acctAP Acct
tcpo_ap_cccharacterpo_mstr.po_ap_ccCost Ctr
tcpo_ap_subcharacterpo_mstr.po_ap_subAP Sub-Acct
tcpo_app_ownercharacterpo_mstr.po_app_ownerOwner Application
tcpo_bankcharacterpo_mstr.po_bankBank
tcpo_billcharacterpo_mstr.po_billBill-To
tcpo_blanketcharacterpo_mstr.po_blanketBlanket Order
tcpo_buyercharacterpo_mstr.po_buyerBuyer
ttpo_cls_datedatepo_mstr.po_cls_dateClose Date
tipo_cmtindxintegerpo_mstr.po_cmtindxComment Index
tlpo_confirmlogicalpo_mstr.po_confirmConfirming
tcpo_consign_cost_pointcharacterpo_mstr.po_consign_cost_pointPO Cost Point
tlpo_consignmentlogicalpo_mstr.po_consignmentConsignment
tcpo_contactcharacterpo_mstr.po_contactContact
tcpo_contractcharacterpo_mstr.po_contractContract
po_mstrCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(po_mstr)


Internal usage


QadFinancials
lookup query on tCInvoice.CInvoicePoNbr
lookup query on tCInvoicePO.CInvoicePOPoNbr


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 = "BMfgPO".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "SelectPurchaseOrder".
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/bmfgpo.selectpurchaseorder.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.