project QadFinancials > class BCOACrossRef > method GetTargetSharedSets

Description

This remoting method will be called from UI to provide the shared sets that are needed for the lookup of the Target GL, Division, CostCentre and Project.


Parameters


icTargetDomainCodeinputcharacterTarget Domain Code
oiGLSharedSetIDoutputintegerGL Shared Set ID
oiDivisionSharedSetIDoutputintegerDivision Shared Set ID
oiCostCentreSharedSetIDoutputintegerCost Centre Shared Set ID
oiProjectSharedSetIDoutputintegerProject Shared Set ID
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCOACrossRef.DefaultValuesTypeSeperate
method BCOACrossRef.ValidateComponentPost


program code (program6/bcoacrossref.p)

/* Check if the input parameter Target Domain Code was filled */
if icTargetDomainCode = ? or
   icTargetDomainCode = ''
then return.

assign oiReturnStatus = -98.

/* Retrieve the shared sets for the target domain */
<Q-1 run DomainForSharedSet (all) (Read) (NoCache)
   (input ?, (DomainID)
    input icTargetDomainCode, (DomainCode)
    output dataset tqDomainForSharedSet) in BDomain >

/* GL */
find tqDomainForSharedSet where
     tqDomainForSharedSet.tcDomainCode        = icTargetDomainCode and 
     tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-GL}
     no-error.
if available tqDomainForSharedSet
then assign oiGLSharedSetID = tqDomainForSharedSet.tiSharedSet_ID.

/* Division */
find tqDomainForSharedSet where
     tqDomainForSharedSet.tcDomainCode        = icTargetDomainCode and 
     tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-DIVISION}
     no-error.
if available tqDomainForSharedSet
then assign oiDivisionSharedSetID = tqDomainForSharedSet.tiSharedSet_ID.

/* Cost Centre */
find tqDomainForSharedSet where
     tqDomainForSharedSet.tcDomainCode        = icTargetDomainCode and 
     tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-COSTCENTRE}
     no-error.
if available tqDomainForSharedSet
then assign oiCostCentreSharedSetID = tqDomainForSharedSet.tiSharedSet_ID.

/* Project */
find tqDomainForSharedSet where
     tqDomainForSharedSet.tcDomainCode        = icTargetDomainCode and 
     tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-PROJECT}
     no-error.
if available tqDomainForSharedSet
then assign oiProjectSharedSetID = tqDomainForSharedSet.tiSharedSet_ID.

assign oiReturnStatus = 0.