project QadFinancials > class TConvertInstalNETXML > method ConvertXmlToTable


Parameters


ihComponentinputhandle
ihParentNodeinputhandle
icTablesinputcharacter
tNETTableRefoutputtemp-tableOutput the table ref.
This table gives the relation between records in the tables that are read from the XML document.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method TConvertInstalNETXML.LoadXMLRepresentation


program code (program1/tconvertinstalnetxml.p)

assign oiReturnStatus = -98.

empty temp-table tNETKnownTable.
empty temp-table tNETTableRef.

do viCnt = 1 to num-entries (icTables) by 2:

    assign vhTableHandle = widget-handle (entry (viCnt, icTables))
           vcTableName   = entry (viCnt + 1, icTables) 
           no-error.
    if not valid-handle (vhTableHandle)
    then next.
    
    create tNETKnownTable.
    assign tNETKnownTable.tcTableName   = if vcTableName = "":U
                                       then if vhTableHandle:table begins "t_o":U
                                            or vhTableHandle:table begins "t_s":U
                                            or vhTableHandle:table begins "t_i":U
                                            then substr (vhTableHandle:table, 4,-1,'CHARACTER':U)
                                            else substr (vhTableHandle:table, 2,-1,'CHARACTER':U)
                                       else vcTableName
           tNETKnownTable.thTableHandle = vhTableHandle.
end.

<M-1 run ConvertXmlToTableDetail (input  ihComponent (ihComponent), 
                                  input  ihParentNode (ihStartNode), 
                                  input  ? (ihCurrentTable), 
                                  input  ? (irParentRowid), 
                                  output viFcReturnSuper (oiReturnStatus)) in TConvertInstalNETXML>
                                  
assign oiReturnStatus = viFcReturnSuper.