project QadFinancials > class BDInvoice > method CreateCustomTable2

Description

Initialize a new record in class table tCustomTable2.


Parameters


ic_ParentRowidinputcharacter= tCustomTable2.tc_ParentRowid
BDInvoiceoutputdatasetclass dataset, containing only the newly initialized record
oiReturnStatusoutputintegererror status


program code (program/bdinvoice.p)

    assign oiReturnStatus = -98.

    empty temp-table t_sDInvoice.
    empty temp-table t_sDInvoiceBank.
    empty temp-table t_sDInvoiceBankPayCode.
    empty temp-table t_sDInvoiceDeduction.
    empty temp-table t_sDInvoiceMovement.
    empty temp-table t_sDInvoiceOpInfo.
    empty temp-table t_sDInvoicePosting.
    empty temp-table t_sDInvoiceStage.
    empty temp-table t_sDInvoiceVat.
    empty temp-table t_sCustomTable0.
    empty temp-table t_sCustomTable1.
    empty temp-table t_sCustomTable2.
    create tCustomTable2.
    assign tCustomTable2.tc_Rowid  = dynamic-function("GetNumberForNew":U in {&TARGETPROCEDURE})
           tCustomTable2.tc_Status = "N":U.
    assign tCustomTable2.tc_ParentRowid = ic_ParentRowid.
    { includes/bfcrun.i
      &procedure  = "InitialValues"
      &parameters = "input 'CustomTable2':U,
                     output oiReturnStatus" }

    create t_sCustomTable2.
    raw-transfer tCustomTable2 to t_sCustomTable2.