project QadFinancials > class BAPMatching > method CreateAPMatchingCost

Description

Initialize a new record in class table tAPMatchingCost.


Parameters


ic_ParentRowidinputcharacter= tAPMatchingCost.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 tAPMatchingCost.
    assign tAPMatchingCost.tc_Rowid  = dynamic-function("GetNumberForNew":U in {&TARGETPROCEDURE})
           tAPMatchingCost.tc_Status = "N":U.
    assign tAPMatchingCost.tc_ParentRowid = ic_ParentRowid.
    { includes/bfcrun.i
      &procedure  = "InitialValues"
      &parameters = "input 'APMatchingCost':U,
                     output oiReturnStatus" }

    create t_sAPMatchingCost.
    raw-transfer tAPMatchingCost to t_sAPMatchingCost.