Description
Add ERS Line records
Parameters
tERSLineRef | input | temp-table | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bersline.p)
/* =================================================================================================== */
/* Method : AddErsLines */
/* Desc : Add ersline records */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (I) tERSLineRef Temporary table with list of ERSLine records to be created */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* =================================================================================================== */
/* Validate input parameters */
/* =================================================================================================== */
if not can-find(first tERSLineRef)
then do:
assign oiReturnStatus = 0.
return.
end.
/* =================================================================================================== */
/* Create new records */
/* =================================================================================================== */
for each tERSLineRef:
<M-1 run AddDetailLine
(input 'ERSLine':U (icTable),
input '':U (icParentRowid),
output viFcReturnSuper (oiReturnStatus)) in BERSLine>
assign tERSLine.ERS_ID = tERSLineRef.tiERSId
tERSLine.APMatchingLn_ID = tERSLineRef.tiAPMatchingLnId
tERSLine.PvodLineID = tERSLineRef.tiPvodLineId.
end.
/* =================================================================================================== */
/* Return */
/* =================================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.