Description
MyDataLoad
Parameters
iiCompanyId | input | integer | |
iiPeriodYear | input | integer | PeriodYear |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bposting.p)
assign oiReturnStatus = -98.
/* Normalize input parameters */
if iiCompanyId = 0 or iiCompanyId = ? then assign iiCompanyId = viCompanyId.
empty temp-table tFcDynRel.
/* Get all periods of the year */
<Q-4 run PeriodByYearPeriod (all) (Read) (NoCache)
(input iiCompanyId, (CompanyId)
input iiPeriodYear, (PeriodYear)
input ?, (PeriodPeriod)
input ?, (PeriodId)
output dataset tqPeriodByYearPeriod) in BPeriod >
for each tqPeriodByYearPeriod:
create tFcDynRel.
assign tFcDynRel.tcFcFrom = "":U
tFcDynRel.tcFcTo = "Posting":U
tFcDynRel.tcFcRel = "for each Posting where "
+ "Posting.Company_ID = ":U + string(iiCompanyId) + " "
+ "Posting.Period_ID = ":U + string(tqPeriodByYearPeriod.tiPeriod_ID)
tFcDynRel.thFcBuffer = buffer t_oPosting:handle
tFcDynRel.thFcIBuffer = buffer t_iPosting:handle.
end.
/* Load the generated temp-tables t<x> */
<M-2 run StartPersistence (output vhFcComponent (ohPersistence),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then do:
assign oiReturnStatus = viFcReturnSuper.
return.
end.
<M-3 run ReadData
(input tFcDynRel (tDynRel),
input {&TARGETPROCEDURE} (ihClass),
output viFcReturnSuper (oiReturnStatus)) in persistence>
if viFcReturnSuper <> 0
then do:
assign oiReturnStatus = viFcReturnSuper.
return.
end.
<M-1 run Calculate (output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then do:
assign oiReturnStatus = viFcReturnSuper.
return.
end.
assign oiReturnStatus = 0.