Parameters
iiMasterSharedSetId | input | integer | |
iiRedundantSharedSetId | input | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bsharedsetmerge.p)
/* =================================================================================================== */
/* Method : MergeValidateLoadProfDataGL */
/* Desc : This method reads referenced profile data from all elements of gl shared sets. */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) MasterSharedSetId Id of the master shared set */
/* (I) RedundantSharedSetId If of the redundant shared set */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* ================================================================================== */
/* GL Profile */
/* ================================================================================== */
<Q-24 run GLForSSMProf (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (MasterSharedSetId)
input iiRedundantSharedSetId, (RedundantSharedSetId)
output dataset tqGLForSSMProf) in BGL >
for each tqGLForSSMProf:
create tProfileSharedSetData.
assign tProfileSharedSetData.tcKeyValue = tqGLForSSMProf.tcRedundantGLCode
tProfileSharedSetData.tcFieldName = "Profile.ProfileCode":U
tProfileSharedSetData.tcProfileCode = tqGLForSSMProf.tcProfileCode
tProfileSharedSetData.tcMasterFieldValue = tqGLForSSMProf.tcMasterGLCode
tProfileSharedSetData.tcRedundantFieldValue = tqGLForSSMProf.tcRedundantGLCode.
end.
/* ================================================================================== */
/* GL - BankJournal */
/* ================================================================================== */
assign vcProfileFieldName = 'BankJournalProfile_ID':U.
<Q-1 run GLForSSMProfProfBankJournal (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfBankJournal) in BGL >
for each tqGLForSSMProfProfBankJournal:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfBankJournal.tcGLCode
tMasterProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfBankJournal.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfBankJournal.tcJournalCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfBankJournal.tiJournalSharedSet_ID.
end.
<Q-2 run GLForSSMProfProfBankJournal (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfBankJournal) in BGL >
for each tqGLForSSMProfProfBankJournal:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfBankJournal.tcGLCode
tRedundantProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfBankJournal.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfBankJournal.tcJournalCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfBankJournal.tiJournalSharedSet_ID.
end.
/* ================================================================================== */
/* GL - CashInJournal */
/* ================================================================================== */
assign vcProfileFieldName = 'CashInJournalProfile_ID':U.
<Q-5 run GLForSSMProfProfCashInJournal (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfCashInJournal) in BGL >
for each tqGLForSSMProfProfCashInJournal:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfCashInJournal.tcGLCode
tMasterProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfCashInJournal.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfCashInJournal.tcJournalCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfCashInJournal.tiJournalSharedSet_ID.
end.
<Q-6 run GLForSSMProfProfCashInJournal (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfCashInJournal) in BGL >
for each tqGLForSSMProfProfCashInJournal:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfCashInJournal.tcGLCode
tRedundantProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfCashInJournal.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfCashInJournal.tcJournalCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfCashInJournal.tiJournalSharedSet_ID.
end.
/* ================================================================================== */
/* GL - CashOutJournal */
/* ================================================================================== */
assign vcProfileFieldName = 'CashOutJournalProfile_ID':U.
<Q-9 run GLForSSMProfProfCashOutJournal (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfCashOutJournal) in BGL >
for each tqGLForSSMProfProfCashOutJournal:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfCashOutJournal.tcGLCode
tMasterProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfCashOutJournal.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfCashOutJournal.tcJournalCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfCashOutJournal.tiJournalSharedSet_ID.
end.
<Q-10 run GLForSSMProfProfCashOutJournal (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfCashOutJournal) in BGL >
for each tqGLForSSMProfProfCashOutJournal:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfCashOutJournal.tcGLCode
tRedundantProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfCashOutJournal.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfCashOutJournal.tcJournalCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfCashOutJournal.tiJournalSharedSet_ID.
end.
/* ================================================================================== */
/* GL - CostCentre */
/* ================================================================================== */
assign vcProfileFieldName = 'CostCentreProfile_ID':U.
<Q-13 run GLForSSMProfProfCostCentre (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfCostCentre) in BGL >
for each tqGLForSSMProfProfCostCentre:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfCostCentre.tcGLCode
tMasterProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfCostCentre.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfCostCentre.tcCostCentreCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfCostCentre.tiCostCentreSharedSet_ID.
end.
<Q-14 run GLForSSMProfProfCostCentre (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfCostCentre) in BGL >
for each tqGLForSSMProfProfCostCentre:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfCostCentre.tcGLCode
tRedundantProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfCostCentre.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfCostCentre.tcCostCentreCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfCostCentre.tiCostCentreSharedSet_ID.
end.
/* ================================================================================== */
/* GL - Division */
/* ================================================================================== */
assign vcProfileFieldName = 'DivisionProfile_ID':U.
<Q-17 run GLForSSMProfProfDivision (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfDivision) in BGL >
for each tqGLForSSMProfProfDivision:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfDivision.tcGLCode
tMasterProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfDivision.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfDivision.tcDivisionCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfDivision.tiDivisionSharedSet_ID.
end.
<Q-18 run GLForSSMProfProfDivision (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfDivision) in BGL >
for each tqGLForSSMProfProfDivision:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfDivision.tcGLCode
tRedundantProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfDivision.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfDivision.tcDivisionCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfDivision.tiDivisionSharedSet_ID.
end.
/* ================================================================================== */
/* GL - Project */
/* ================================================================================== */
assign vcProfileFieldName = 'ProjectProfile_ID':U.
<Q-21 run GLForSSMProfProfProject (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfProject) in BGL >
for each tqGLForSSMProfProfProject:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfProject.tcGLCode
tMasterProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfProject.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfProject.tcProjectCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfProject.tiProjectSharedSet_ID.
end.
<Q-22 run GLForSSMProfProfProject (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqGLForSSMProfProfProject) in BGL >
for each tqGLForSSMProfProfProject:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqGLForSSMProfProfProject.tcGLCode
tRedundantProfileSharedSetData.tcProfileCode = tqGLForSSMProfProfProject.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqGLForSSMProfProfProject.tcProjectCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqGLForSSMProfProfProject.tiProjectSharedSet_ID.
end.
/* ================================================================================== */
/* Return */
/* ================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.