project QadFinancials > class BSharedSetMerge > method MergeValidateLoadProfDataCostCentre
Parameters
iiMasterSharedSetId | input | integer | |
iiRedundantSharedSetId | input | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bsharedsetmerge.p)
/* =================================================================================================== */
/* Method : MergeValidateLoadProfDataCreditor */
/* Desc : This method reads referenced profile data from all elements of creditor shared sets. */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) MasterSharedSetId Id of the master shared set */
/* (I) RedundantSharedSetId If of the redundant shared set */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* ================================================================================== */
/* CostCentre Profile */
/* ================================================================================== */
<Q-4 run CostCentreForSSMProf (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (MasterSharedSetId)
input iiRedundantSharedSetId, (RedundantSharedSetId)
output dataset tqCostCentreForSSMProf) in BCostCentre >
for each tqCostCentreForSSMProf:
create tProfileSharedSetData.
assign tProfileSharedSetData.tcKeyValue = tqCostCentreForSSMProf.tcRedundantCostCentreCode
tProfileSharedSetData.tcFieldName = "Profile.ProfileCode":U
tProfileSharedSetData.tcProfileCode = tqCostCentreForSSMProf.tcProfileCode
tProfileSharedSetData.tcMasterFieldValue = tqCostCentreForSSMProf.tcMasterCostCentreCode
tProfileSharedSetData.tcRedundantFieldValue = tqCostCentreForSSMProf.tcRedundantCostCentreCode.
end.
/* ================================================================================== */
/* Cost centre - DivisionProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'DivisionProfile_ID':U.
<Q-1 run CostCentreForSSMValProfDiv (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqCostCentreForSSMValProfDiv) in BCostCentre >
for each tqCostCentreForSSMValProfDiv:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqCostCentreForSSMValProfDiv.tcCostCentreCode
tMasterProfileSharedSetData.tcProfileCode = tqCostCentreForSSMValProfDiv.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqCostCentreForSSMValProfDiv.tcDivisionCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqCostCentreForSSMValProfDiv.tiDivisionSharedSet_ID.
end.
<Q-2 run CostCentreForSSMValProfDiv (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqCostCentreForSSMValProfDiv) in BCostCentre >
for each tqCostCentreForSSMValProfDiv:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqCostCentreForSSMValProfDiv.tcCostCentreCode
tRedundantProfileSharedSetData.tcProfileCode = tqCostCentreForSSMValProfDiv.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqCostCentreForSSMValProfDiv.tcDivisionCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqCostCentreForSSMValProfDiv.tiDivisionSharedSet_ID.
end.
/* ================================================================================== */
/* Return */
/* ================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.