project QadFinancials > class BFRWChart > method GetDomainSharedSetsByDomain
Description
Get domain shared sets by domain code
Parameters
icDomainCode | input | character | Domain code |
ocReturnValue | output | character | Return a string value contain expected result. |
oiDomainId | output | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bfrwchart.p)
/****************************************************************************************************/
/* This method will get all shared sets code (GL, Division, CostCenter, Project) for a given domian */
/****************************************************************************************************/
MainBlock:
do on error undo, throw:
assign vcGLSharedSet = '':U
vcDivSharedSet = '':U
vcCCSharedSet = '':U
vcProSharedSet = '':U
vcDomainDesc = '':U
ocReturnValue = vcDomainDesc + ",":U + vcGLSharedSet + ",":U + vcDivSharedSet + ",":U + vcCCSharedSet + ",":U + vcProSharedSet
oiDomainId = 0.
if icDomainCode = ? or icDomainCode = "":U
then return.
<Q-94 run DomainPropertyByDomainCodeID (all) (Read) (NoCache)
(input icDomainCode, (DomainCode)
input ?, (DomainID)
output dataset tqDomainPropertyByDomainCodeID) in BDomainProperty>
find first tqDomainPropertyByDomainCodeID no-error.
if available tqDomainPropertyByDomainCodeID
then do:
assign vcDomainDesc = tqDomainPropertyByDomainCodeID.tcDomainPropertyName
oiDomainId = tqDomainPropertyByDomainCodeID.tiDomain_ID.
end.
<Q-4 run DomainForSharedSet (all) (Read) (NoCache)
(input ?, (DomainID)
input icDomainCode, (DomainCode)
output dataset tqDomainForSharedSet) in BDomain>
for each tqDomainForSharedSet where tlSharedSetIsActive = yes:
if tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-GL}
then assign vcGLSharedSet = tqDomainForSharedSet.tcSharedSetCode + chr(2) + tqDomainForSharedSet.tcSharedSetDescription + chr(2) + string(tqDomainForSharedSet.tiSharedSet_ID).
else if tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-DIVISION}
then assign vcDivSharedSet = tqDomainForSharedSet.tcSharedSetCode + chr(2) + tqDomainForSharedSet.tcSharedSetDescription + chr(2) + string(tqDomainForSharedSet.tiSharedSet_ID).
else if tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-COSTCENTRE}
then assign vcCCSharedSet = tqDomainForSharedSet.tcSharedSetCode + chr(2) + tqDomainForSharedSet.tcSharedSetDescription + chr(2) + string(tqDomainForSharedSet.tiSharedSet_ID).
else if tqDomainForSharedSet.tcSharedSetTypeCode = {&SHAREDSETTYPE-PROJECT}
then assign vcProSharedSet = tqDomainForSharedSet.tcSharedSetCode + chr(2) + tqDomainForSharedSet.tcSharedSetDescription + chr(2) + string(tqDomainForSharedSet.tiSharedSet_ID).
end.
assign ocReturnValue = vcDomainDesc + ",":U + vcGLSharedSet + ",":U + vcDivSharedSet + ",":U + vcCCSharedSet + ",":U + vcProSharedSet.
end. /* do on error undo, throw: */