project QadFinancials > class TConvertInstalNETXML > method CreatetFcDynRelForCInvoice

Description

Fill the tfcdynrel for the export


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method TConvertInstalNETXML.Convert


program code (program1/tconvertinstalnetxml.p)

/* Tables Name is define with 3 prefix characters as the Std dump routine takes the table name starting with the 4th char */

&scoped ATTR-GET-DYNREL     create tNETDynRel.    assign tNETDynRel.tcFcFrom    = "~{~&ATTR-FROM~}":U           tNETDynRel.tcFcTo      = "~{~&ATTR-TO~}":U           tNETDynRel.tcFcRel     = "~{~&ATTR-REL~}":U           tNETDynRel.thFcBuffer  = temp-table ~{~&ATTR-TO~}:default-buffer-handle           tNETDynRel.thFcIBuffer = ?           tNETDynRel.thFcSBuffer = ?.

assign oiReturnStatus = -98.
empty temp-table tNETDynRel.

&scoped ATTR-FROM
&scoped ATTR-TO t_oCInvoice
&scoped ATTR-REL for each t_oCInvoice where true
{&ATTR-GET-DYNREL}

&scoped ATTR-FROM t_oCInvoice
&scoped ATTR-TO t_oCInvoiceBank
&scoped ATTR-REL for each t_oCInvoiceBank where t_oCInvoiceBank.CInvoice_ID = t_oCInvoice.CInvoice_ID
{&ATTR-GET-DYNREL}

&scoped ATTR-TO t_oCInvoiceVat
&scoped ATTR-REL for each t_oCInvoiceVat where t_oCInvoiceVat.CInvoice_ID = t_oCInvoice.CInvoice_ID
{&ATTR-GET-DYNREL}

&scoped ATTR-TO t_oCInvoiceMovement
&scoped ATTR-REL for each t_oCInvoiceMovement where t_oCInvoiceMovement.CInvoice_ID = t_oCInvoice.CInvoice_ID
{&ATTR-GET-DYNREL}

&scoped ATTR-TO t_oCInvoicePosting
&scoped ATTR-REL for each t_oCInvoicePosting where t_oCInvoicePosting.CInvoice_ID = t_oCInvoice.CInvoice_ID
{&ATTR-GET-DYNREL}

&scoped ATTR-TO t_oCInvoicePO
&scoped ATTR-REL for each t_oCInvoicePO where t_oCInvoicePO.CInvoice_ID = t_oCInvoice.CInvoice_ID
{&ATTR-GET-DYNREL}

&scoped ATTR-TO t_oCInvoiceStage
&scoped ATTR-REL for each t_oCInvoiceStage where t_oCInvoiceStage.CInvoice_ID = t_oCInvoice.CInvoice_ID
{&ATTR-GET-DYNREL}

&undefine ATTR-FROM
&undefine ATTR-TO
&undefine ATTR-REL  

if oiReturnStatus = -98
then assign oiReturnStatus = 0.