project QadFinancials > class BMirroringGL > API query SelectMirroringGL

Description

This query returns the key fields for the company id and domain id.


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIdi
iiDomainIdi=
tCompany.CompanyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCostCentre1.CostCentreCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCostCentre2.CostCentreCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCostCentre3.CostCentreCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCostCentre4.CostCentreCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision2.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision3.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision4.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision1.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDomains.DomainCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL1.GLCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL2.GLCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL3.GLCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL4.GLCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL1.GLSystemTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL2.GLSystemTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL1.GLTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tGL2.GLTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tMirroringGL.MirroringGLSplitGLTypec=,>=,>,<>,<=,<,begins,can-do,matches
tMirroringGL.MirroringGLTrans1Journalc=,>=,>,<>,<=,<,begins,can-do,matches
tMirroringGL.MirroringGLTrans2Journalc=,>=,>,<>,<=,<,begins,can-do,matches
tProject3.ProjectCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProject2.ProjectCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProject1.ProjectCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProject4.ProjectCodec=,>=,>,<>,<=,<,begins,can-do,matches


Parameters (internal)


iiCompanyIdintegerCompany id
iiDomainIdinteger


query condition


  each MirroringGL where
MirroringGL.Company_Id = iiCompanyId AND
MirroringGL.Domain_ID = iiDomainId

      first Company (conditional-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = MirroringGL.Company_ID AND

      first CostCentre1 (conditional-join) where
CostCentre1.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre1.CostCentre_ID = MirroringGL.Source2CostCentre_ID AND

      first CostCentre2 (conditional-join) where
CostCentre2.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre2.CostCentre_ID = MirroringGL.Mirror2CostCentre_ID AND

      first CostCentre3 (conditional-join) where
CostCentre3.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre3.CostCentre_ID = MirroringGL.Mirror1CostCentre_ID AND

      first CostCentre4 (conditional-join) where
CostCentre4.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre4.CostCentre_ID = MirroringGL.Source1CostCentre_ID AND

      first Division1 (conditional-join) where
Division1.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division1.Division_ID = MirroringGL.Source1Division_ID AND

      first Division2 (conditional-join) where
Division2.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division2.Division_ID = MirroringGL.Source2Division_ID AND

      first Division3 (conditional-join) where
Division3.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division3.Division_ID = MirroringGL.Mirror1Division_ID AND

      first Division4 (conditional-join) where
Division4.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division4.Division_ID = MirroringGL.Mirror2Division_ID AND

      first Domains (inner-join) where
Domains.Domain_ID = MirroringGL.Domain_ID AND

      first GL1 (inner-join) where
GL1.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL1.GL_ID = MirroringGL.Source1GL_ID AND

      first GL2 (inner-join) where
GL2.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL2.GL_ID = MirroringGL.Source2GL_ID AND

      first GL3 (inner-join) where
GL3.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL3.GL_ID = MirroringGL.Mirror2GL_ID AND

      first GL4 (inner-join) where
GL4.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL4.GL_ID = MirroringGL.Mirror1GL_ID AND

      first Project1 (conditional-join) where
Project1.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project1.Project_ID = MirroringGL.Source1Project_ID AND

      first Project2 (conditional-join) where
Project2.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project2.Project_ID = MirroringGL.Source2Project_ID AND

      first Project3 (conditional-join) where
Project3.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project3.Project_ID = MirroringGL.Mirror1Project_ID AND

      first Project4 (conditional-join) where
Project4.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project4.Project_ID = MirroringGL.Mirror2Project_ID AND


query sort order


Domains.DomainCode (ascending)
Company.CompanyCode (ascending)
GL1.Source1GLCode (ascending)


query resultset tqSelectMirroringGL


field namedata typedb fielddescription
tcDomainCodecharacterDomains.DomainCodeDomain
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tcSource1GLCodecharacterGL1.GLCodeA code identifying the GL account.
tcSource1GLTypeCodecharacterGL1.GLTypeCodeA code identifying the type of account.
tcSource1GLSystemTypecharacterGL1.GLSystemTypeCodeSystem Type: A code identifying the type of system account.
tcSource1GLTypeCodeTrcharactercalculated
tcSource1GLSystemTypeTrcharactercalculated
tcSource2GLCodecharacterGL2.GLCodeA code identifying the GL account.
tcSource2GLTypeCodecharacterGL2.GLTypeCodeA code identifying the type of account.
tcSource2GLSystemTypecharacterGL2.GLSystemTypeCodeSystem Type: A code identifying the type of system account.
tcSource2GLTypeCodeTrcharactercalculated
tcSource2GLSystemTypeTrcharactercalculated
tcMirror1GLCodecharacterGL4.GLCodeA code identifying the GL account.
tcMirror2GLcodecharacterGL3.GLCodeA code identifying the GL account.
tcMirroringGLSplitGLTypecharacterMirroringGL.MirroringGLSplitGLTypeAccount Split Type
tcMirroringGLTrans1JournalcharacterMirroringGL.MirroringGLTrans1JournalTransaction 1 Daybook
tcMirroringGLTrans2JournalcharacterMirroringGL.MirroringGLTrans2JournalTransaction 2 Daybook
tcSource1CostCentreCodecharacterCostCentre4.CostCentreCodeCost Center: A code that identifies the cost center.
tcSource1ProjetCodecharacterProject1.ProjectCodeProject
tcSource1DivisionCodecharacterDivision1.DivisionCodeSub-Account
tcSource2CostCentreCodecharacterCostCentre1.CostCentreCodeCost Center: A code that identifies the cost center.
tcSource2ProjectCodecharacterProject2.ProjectCodeProject
tcSource2DivisionCodecharacterDivision2.DivisionCodeSub-Account
tcMirror1CostCentreCodecharacterCostCentre3.CostCentreCodeCost Center: A code that identifies the cost center.
tcMirror1ProjectCodecharacterProject3.ProjectCodeProject
tcMirror1DivisionCodecharacterDivision3.DivisionCodeSub-Account
tcMirror2CostCentreCodecharacterCostCentre2.CostCentreCodeCost Center: A code that identifies the cost center.
tcMirror2ProjectCodecharacterProject4.ProjectCodeProject
tcMirror2DivisionCodecharacterDivision4.DivisionCodeSub-Account
tcMirroringGLSplitGLTypeTrcharactercalculated
tcMirroringGLTrans1JournalTrcharactercalculated
tcMirroringGLTrans2JournalTrcharactercalculated
ttLastModifiedDatedateMirroringGL.LastModifiedDateLast Modified Date
tiLastModifiedTimeintegerMirroringGL.LastModifiedTimeLast Modified Time
tcLastModifiedUsercharacterMirroringGL.LastModifiedUserLast Modified User
tiSource2GL_IDintegerMirroringGL.Source2GL_IDSource 2 Account Type
tiSource1GL_IDintegerMirroringGL.Source1GL_IDSource 1 Account Type
tiDomain_IDintegerMirroringGL.Domain_IDDomain
tiCompany_IDintegerMirroringGL.Company_IDEntity
tiMirror1CostCentre_IDintegerMirroringGL.Mirror1CostCentre_IDMirror 1 Cost Center
tiMirror1Division_IDintegerMirroringGL.Mirror1Division_IDMirror 1 Sub-Account
tiMirror1GL_IDintegerMirroringGL.Mirror1GL_IDMirror 1 Account
tiMirror1Project_IDintegerMirroringGL.Mirror1Project_IDMirror 1 Project
tiMirror2CostCentre_IDintegerMirroringGL.Mirror2CostCentre_IDMirror 2 Cost Center
tiMirror2Division_IDintegerMirroringGL.Mirror2Division_IDMirror 2 Sub-Account
tiMirror2GL_IDintegerMirroringGL.Mirror2GL_IDMirror 2 Account
tiMirror2Project_IDintegerMirroringGL.Mirror2Project_IDMirror 2 Project
tiMirroringGL_IDintegerMirroringGL.MirroringGL_IDRecord ID
tiSource1CostCentre_IDintegerMirroringGL.Source1CostCentre_IDSource 1 Cost Center
tiSource1Division_IDintegerMirroringGL.Source1Division_IDSource 1 Sub-Account
tiSource1Project_IDintegerMirroringGL.Source1Project_IDSource 1 Project
tiSource2CostCentre_IDintegerMirroringGL.Source2CostCentre_IDSource 2 Cost Center
tiSource2Division_IDintegerMirroringGL.Source2Division_IDSource 2 Sub-Account
tiSource2Project_IDintegerMirroringGL.Source2Project_IDSource 2 Project
MirroringGLCustomcharactercalculatedcustom fields
CompanyCustomcharactercalculatedcustom fields
CostCentre1Customcharactercalculatedcustom fields
CostCentre2Customcharactercalculatedcustom fields
CostCentre3Customcharactercalculatedcustom fields
CostCentre4Customcharactercalculatedcustom fields
Division1Customcharactercalculatedcustom fields
Division2Customcharactercalculatedcustom fields
Division3Customcharactercalculatedcustom fields
Division4Customcharactercalculatedcustom fields
DomainsCustomcharactercalculatedcustom fields
GL1Customcharactercalculatedcustom fields
GL2Customcharactercalculatedcustom fields
GL3Customcharactercalculatedcustom fields
GL4Customcharactercalculatedcustom fields
Project1Customcharactercalculatedcustom fields
Project2Customcharactercalculatedcustom fields
Project3Customcharactercalculatedcustom fields
Project4Customcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(MirroringGL),rowid(Company),rowid(CostCentre1),rowid(CostCentre2),rowid(CostCentre3),rowid(CostCentre4),rowid(Division1),rowid(Division2),rowid(Division3),rowid(Division4),rowid(Domains),rowid(GL1),rowid(GL2),rowid(GL3),rowid(GL4),rowid(Project1),rowid(Project2),rowid(Project3),rowid(Project4)


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 = "BMirroringGL".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "SelectMirroringGL".
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/bmirroringgl.selectmirroringgl.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.