project QadFinancials > class BAPMatching > method CreateAPMatchingCostSaf

Description

Initialize a new record in class table tAPMatchingCostSaf.


Parameters


ic_ParentRowidinputcharacter= tAPMatchingCostSaf.tc_ParentRowid
BAPMatchingoutputdatasetclass dataset, containing only the newly initialized record
oiReturnStatusoutputintegererror status


program code (program/bapmatching.p)

    assign oiReturnStatus = -98.

    empty temp-table t_sAPMatching.
    empty temp-table t_sAPMatchingLn.
    empty temp-table t_sAPMatchingLnRevTax.
    empty temp-table t_sAPMatchingLnTax.
    empty temp-table t_sAPMatchingLnWHT.
    empty temp-table t_sAPMatchingCost.
    empty temp-table t_sAPMatchingCostSaf.
    empty temp-table t_sCustomTable0.
    empty temp-table t_sCustomTable1.
    empty temp-table t_sCustomTable2.
    create tAPMatchingCostSaf.
    assign tAPMatchingCostSaf.tc_Rowid  = dynamic-function("GetNumberForNew":U in {&TARGETPROCEDURE})
           tAPMatchingCostSaf.tc_Status = "N":U.
    assign tAPMatchingCostSaf.tc_ParentRowid = ic_ParentRowid.
    { includes/bfcrun.i
      &procedure  = "InitialValues"
      &parameters = "input 'APMatchingCostSaf':U,
                     output oiReturnStatus" }

    create t_sAPMatchingCostSaf.
    raw-transfer tAPMatchingCostSaf to t_sAPMatchingCostSaf.