Description
This procedure retrieves any entity, that uses certain Shared Set
Parameters
iiGLSharedSet_ID | input | integer | |
oiGLSSCompany_ID | output | integer | |
iiDivisionSharedSet_ID | input | integer | |
oiDivisionSSCompany_ID | output | integer | |
iiCostCentreSharedSet_ID | input | integer | |
oiCostCentreSSCompany_ID | output | integer | |
iiProjectSharedSet_ID | input | integer | |
oiProjectCompany_ID | output | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bfrwanalysiscode.p)
./* ========================================================================================= *
* Method: GetEntityForSharedSet *
* Desc: This procedure retrieves any entity, that uses certain Shared Set *
* ----------------------------------------------------------------------------------------- *
* Params: (I) GLSharedSet_ID *
* (O) GLSSCompany_ID *
* (I) DivisionSharedSet_ID *
* (O) DivisionSSCompany_ID *
* (I) CostCentreSharedSet_ID *
* (O) CostCentreSSCompany_ID *
* (I) ProjectSharedSet_ID *
* (O) ProjectCompany_ID *
* ========================================================================================= */
assign oiGLSSCompany_ID = ?
oiDivisionSSCompany_ID = ?
oiCostCentreSSCompany_ID = ?
oiProjectCompany_ID = ?.
if iiGLSharedSet_ID <> 0 and
iiGLSharedSet_ID <> ?
then do:
<Q-10 run CompanySharedSetBySharedSet (all) (Read) (NoCache)
(input iiGLSharedSet_ID, (SharedSetId)
input ?, (CompanyId)
output dataset tqCompanySharedSetBySharedSet) in BCompany>
find first tqCompanySharedSetBySharedSet where
tqCompanySharedSetBySharedSet.tiSharedSet_ID = iiGLSharedSet_ID
no-error.
if available tqCompanySharedSetBySharedSet
then assign oiGLSSCompany_ID = tqCompanySharedSetBySharedSet.tiCompany_ID.
end.
if iiDivisionSharedSet_ID <> 0 and
iiDivisionSharedSet_ID <> ?
then do:
<Q-83 run CompanySharedSetBySharedSet (all) (Read) (NoCache)
(input iiDivisionSharedSet_ID, (SharedSetId)
input ?, (CompanyId)
output dataset tqCompanySharedSetBySharedSet) in BCompany>
find first tqCompanySharedSetBySharedSet where
tqCompanySharedSetBySharedSet.tiSharedSet_ID = iiDivisionSharedSet_ID
no-error.
if available tqCompanySharedSetBySharedSet
then assign oiDivisionSSCompany_ID = tqCompanySharedSetBySharedSet.tiCompany_ID.
end.
if iiCostCentreSharedSet_ID <> 0 and
iiCostCentreSharedSet_ID <> ?
then do:
<Q-85 run CompanySharedSetBySharedSet (all) (Read) (NoCache)
(input iiCostCentreSharedSet_ID, (SharedSetId)
input ?, (CompanyId)
output dataset tqCompanySharedSetBySharedSet) in BCompany>
find first tqCompanySharedSetBySharedSet where
tqCompanySharedSetBySharedSet.tiSharedSet_ID = iiCostCentreSharedSet_ID
no-error.
if available tqCompanySharedSetBySharedSet
then assign oiCostCentreSSCompany_ID = tqCompanySharedSetBySharedSet.tiCompany_ID.
end.
if iiProjectSharedSet_ID <> 0 and
iiProjectSharedSet_ID <> ?
then do:
<Q-62 run CompanySharedSetBySharedSet (all) (Read) (NoCache)
(input iiProjectSharedSet_ID, (SharedSetId)
input ?, (CompanyId)
output dataset tqCompanySharedSetBySharedSet) in BCompany>
find first tqCompanySharedSetBySharedSet where
tqCompanySharedSetBySharedSet.tiSharedSet_ID = iiProjectSharedSet_ID
no-error.
if available tqCompanySharedSetBySharedSet
then assign oiProjectCompany_ID = tqCompanySharedSetBySharedSet.tiCompany_ID.
end.