project QadFinancials > class BCInvoiceAPMatching > method CreateAPMatchingLcChargeCIAPM

Description

Initialize a new record in class table tAPMatchingLcChargeCIAPM.


Parameters


ic_ParentRowidinputcharacter= tAPMatchingLcChargeCIAPM.tc_ParentRowid
BCInvoiceAPMatchingoutputdatasetclass dataset, containing only the newly initialized record
oiReturnStatusoutputintegererror status


program code (program/bcinvoiceapmatching.p)

    assign oiReturnStatus = -98.

    empty temp-table t_sAPMatchingCIAPM.
    empty temp-table t_sAPMatchingCostCIAPM.
    empty temp-table t_sAPMatchingCostSafCIAPM.
    empty temp-table t_sAPMatchingLcChargeCIAPM.
    empty temp-table t_sCInvoiceCIAPM.
    empty temp-table t_sCustomTable0.
    empty temp-table t_sCustomTable1.
    empty temp-table t_sCustomTable2.
    create tAPMatchingLcChargeCIAPM.
    assign tAPMatchingLcChargeCIAPM.tc_Rowid  = dynamic-function("GetNumberForNew":U in {&TARGETPROCEDURE})
           tAPMatchingLcChargeCIAPM.tc_Status = "N":U.
    assign tAPMatchingLcChargeCIAPM.tc_ParentRowid = ic_ParentRowid.
    { includes/bfcrun.i
      &procedure  = "InitialValues"
      &parameters = "input 'APMatchingLcChargeCIAPM':U,
                     output oiReturnStatus" }

    create t_sAPMatchingLcChargeCIAPM.
    raw-transfer tAPMatchingLcChargeCIAPM to t_sAPMatchingLcChargeCIAPM.