Description
This method is used to generate prodataset for Department Report.
Parameters
ohDepartment | output | handle | Handle of Department prodataset |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/baccountinginterface.p)
assign oiReturnStatus = - 98.
/* Empty temp-tables which will be used next */
empty temp-table tReport.
empty temp-table tDepartment.
/* to create a temp table, due to EDI limitation */
create tReport.
assign tReport.tiReportID = 1.
<Q-1 run CostCentreByIDAllInfo (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
output dataset tqCostCentreByIDAllInfo) in BCostCentre >
for each tqCostCentreByIDAllInfo:
create tDepartment.
assign
tDepartment.tcCostCentreCode = tqCostCentreByIDAllInfo.tcCostCentreCode
tDepartment.tcCostCentreDescription = tqCostCentreByIDAllInfo.tcCostCentreDescription
tDepartment.tiReportID = 1.
end. /* for each tqCostCentreByIDAllInfo: */
/* Use prodataset to encapsulat the temp-table */
create dataset ohDepartment in widget-pool "non-persistent".
create buffer vhReport for table buffer tReport:handle in widget-pool "non-persistent".
create buffer vhDepartment for table buffer tDepartment:handle in widget-pool "non-persistent".
ohDepartment:set-buffers(vhReport, vhDepartment).
ohDepartment:add-relation(vhReport, vhDepartment, 'tiReportID,tiReportID', ?, true).
ohDepartment:name = {&EXPORTREPORTCODE-BMXX}.
if oiReturnStatus = -98
then assign oiReturnStatus = 0.