project QadFinancials > class BSharedSetMerge > method MergeValidateLoadProfDataDebtor
Parameters
iiMasterSharedSetId | input | integer | |
iiRedundantSharedSetId | input | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bsharedsetmerge.p)
/* =================================================================================================== */
/* Method : MergeValidateLoadProfDataDebtor */
/* Desc : This method reads referenced profile data from all elements of debtor shared sets. */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) MasterSharedSetId Id of the master shared set */
/* (I) RedundantSharedSetId If of the redundant shared set */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* ================================================================================== */
/* Debtor Profile */
/* ================================================================================== */
<Q-16 run DebtorForSSMProf (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (MasterSharedSetId)
input iiRedundantSharedSetId, (RedundantSharedSetId)
output dataset tqDebtorForSSMProf) in BDebtor >
for each tqCreditorForSSMProf:
create tProfileSharedSetData.
assign tProfileSharedSetData.tcKeyValue = tqDebtorForSSMProf.tcRedundantDebtorCode
tProfileSharedSetData.tcFieldName = "Profile.ProfileCode":U
tProfileSharedSetData.tcProfileCode = tqDebtorForSSMProf.tcProfileCode
tProfileSharedSetData.tcMasterFieldValue = tqDebtorForSSMProf.tcMasterDebtorCode
tProfileSharedSetData.tcRedundantFieldValue = tqDebtorForSSMProf.tcRedundantDebtorCode.
end.
/* ================================================================================== */
/* Debtor - PurchaseGLProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'CnControlGLProfile_ID':U.
<Q-1 run DebtorForSSMProfCnControlGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfCnControlGL) in BDebtor >
for each tqDebtorForSSMProfCnControlGL:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfCnControlGL.tcDebtorCode
tMasterProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfCnControlGL.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfCnControlGL.tcGLCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfCnControlGL.tiGLSharedSet_ID.
end.
<Q-2 run DebtorForSSMProfCnControlGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfCnControlGL) in BDebtor >
for each tqDebtorForSSMProfCnControlGL:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfCnControlGL.tcDebtorCode
tRedundantProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfCnControlGL.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfCnControlGL.tcGLCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfCnControlGL.tiGLSharedSet_ID.
end.
/* ================================================================================== */
/* Debtor - DivisionProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'DivisionProfile_ID':U.
<Q-3 run DebtorForSSMProfDivisionGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfDivisionGL) in BDebtor >
for each tqDebtorForSSMProfDivisionGL:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfDivisionGL.tcDebtorCode
tMasterProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfDivisionGL.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfDivisionGL.tcDivisionCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfDivisionGL.tiDivisionSharedSet_ID.
end.
<Q-4 run DebtorForSSMProfDivisionGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfDivisionGL) in BDebtor >
for each tqDebtorForSSMProfDivisionGL:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfDivisionGL.tcDebtorCode
tRedundantProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfDivisionGL.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfDivisionGL.tcDivisionCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfDivisionGL.tiDivisionSharedSet_ID.
end.
/* ================================================================================== */
/* Debtor - FinGhgGLProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'FinGhgGLProfile_ID':U.
<Q-5 run DebtorForSSMProfFinChgGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfFinChgGL) in BDebtor >
for each tqDebtorForSSMProfFinChgGL:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfFinChgGL.tcDebtorCode
tMasterProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfFinChgGL.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfFinChgGL.tcGLCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfFinChgGL.tiGLSharedSet_ID.
end.
<Q-6 run DebtorForSSMProfFinChgGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfFinChgGL) in BDebtor >
for each tqDebtorForSSMProfFinChgGL:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfFinChgGL.tcDebtorCode
tRedundantProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfFinChgGL.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfFinChgGL.tcGLCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfFinChgGL.tiGLSharedSet_ID.
end.
/* ================================================================================== */
/* Debtor - InvControlGLProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'InvControlGLProfile_ID':U.
<Q-7 run DebtorForSSMProfInvControlGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfInvControlGL) in BDebtor >
for each tqDebtorForSSMProfInvControlGL:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfInvControlGL.tcDebtorCode
tMasterProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfInvControlGL.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfInvControlGL.tcGLCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfInvControlGL.tiGLSharedSet_ID.
end.
<Q-8 run DebtorForSSMProfInvControlGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfInvControlGL) in BDebtor >
for each tqDebtorForSSMProfInvControlGL:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfInvControlGL.tcDebtorCode
tRedundantProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfInvControlGL.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfInvControlGL.tcGLCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfInvControlGL.tiGLSharedSet_ID.
end.
/* ================================================================================== */
/* Debtor - PrePayControlGLProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'PrePayControlGLProfile_ID':U.
<Q-9 run DebtorForSSMProfPrePayGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfPrePayGL) in BDebtor >
for each tqDebtorForSSMProfPrePayGL:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfPrePayGL.tcDebtorCode
tMasterProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfPrePayGL.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfPrePayGL.tcGLCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfPrePayGL.tiGLSharedSet_ID.
end.
<Q-10 run DebtorForSSMProfPrePayGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfPrePayGL) in BDebtor >
for each tqDebtorForSSMProfPrePayGL:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfPrePayGL.tcDebtorCode
tRedundantProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfPrePayGL.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfPrePayGL.tcGLCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfPrePayGL.tiGLSharedSet_ID.
end.
/* ================================================================================== */
/* Debtor - SalesAccountGLProfile */
/* ================================================================================== */
assign vcProfileFieldName = 'SalesAccountGLProfile_ID':U.
<Q-13 run DebtorForSSMProfSalesGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiMasterSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfSalesGL) in BDebtor >
for each tqDebtorForSSMProfSalesGL:
create tMasterProfileSharedSetData.
assign tMasterProfileSharedSetData.tcFieldName = vcProfileFieldName
tMasterProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfSalesGL.tcDebtorCode
tMasterProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfSalesGL.tcProfileCode
tMasterProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfSalesGL.tcGLCode
tMasterProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfSalesGL.tiGLSharedSet_ID.
end.
<Q-14 run DebtorForSSMProfSalesGL (all) (Read) (NoCache)
(input ?, (CompanyId)
input iiRedundantSharedSetId, (SharedSetId)
output dataset tqDebtorForSSMProfSalesGL) in BDebtor >
for each tqDebtorForSSMProfSalesGL:
create tRedundantProfileSharedSetData.
assign tRedundantProfileSharedSetData.tcFieldName = vcProfileFieldName
tRedundantProfileSharedSetData.tcKeyValue = tqDebtorForSSMProfSalesGL.tcDebtorCode
tRedundantProfileSharedSetData.tcProfileCode = tqDebtorForSSMProfSalesGL.tcProfileCode
tRedundantProfileSharedSetData.tcProfileTargetKeyValue = tqDebtorForSSMProfSalesGL.tcGLCode
tRedundantProfileSharedSetData.tiProfileTargetSharedSetId = tqDebtorForSSMProfSalesGL.tiGLSharedSet_ID.
end.
/* ================================================================================== */
/* Return */
/* ================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.