Description
Initialize a new record in class table tPosting.
Parameters
ic_ParentRowid | input | character | = tPosting.tc_ParentRowid |
BPosting | output | dataset | class dataset, containing only the newly initialized record |
oiReturnStatus | output | integer | error status |
program code (program/bposting.p)
assign oiReturnStatus = -98.
empty temp-table t_sPosting.
empty temp-table t_sPostingLine.
empty temp-table t_sPostingSaf.
empty temp-table t_sPostingVat.
empty temp-table t_sPostingVatDelay.
empty temp-table t_sPostingWHT.
empty temp-table t_sCustomTable0.
empty temp-table t_sCustomTable1.
empty temp-table t_sCustomTable2.
create tPosting.
assign tPosting.tc_Rowid = dynamic-function("GetNumberForNew":U in {&TARGETPROCEDURE})
tPosting.tc_Status = "N":U.
{ includes/bfcrun.i
&procedure = "StartPersistence"
¶meters = "output vh_persistence,
output viFcReturnSuper" }
if viFcReturnSuper <> 0
then do:
assign oiReturnStatus = viFcReturnSuper.
return.
end.
assign tPosting.Posting_ID = dynamic-function ("GetNextValue":U in vh_persistence,"ObjectNumber":U).
{ includes/bfcrun.i
&procedure = "InitialValues"
¶meters = "input 'Posting':U,
output oiReturnStatus" }
create t_sPosting.
raw-transfer tPosting to t_sPosting.