ilHeaderOnly | input | logical | indicates whether only the main table should be used in the generated XML representation. |
ilSuppressEmptyFields | input | logical | When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value. When false, no fields will be removed. When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed. |
iiPriority | input | integer | If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string. |
ilWriteXMLSchema | input | logical | Also include the metaschema in the XML file |
icObjectRowId | input | character | If you want to restrict dumped data to a single object, pass the rowid of the object. Otherwise leave blanc, and all objects in memory will be dumped. |
ilExportForInput | input | logical | When exporting an XML file to be used for direct input, some fields should be suppressed in the output: tContextInfo.tcInvolvedCompanyCodes tContextInfo.tcCorrelationId tContextInfo.tcObjectIdentifier all '*_ID' fields all 'tc_Status' fields (BLF-1908) |
opXmlRepresentation | output | longchar | |
oiReturnStatus | output | integer | Return status of the method. |
create x-document vhDocument in widget-pool "non-persistent". <M-40 run PopulateXDocument (input icObjectRowId (icObjectRowId), input ilHeaderOnly (ilHeaderOnly), input ilSuppressEmptyFields (ilSuppressEmptyFields), input iiPriority (iiPriority), input ilWriteXMLSchema (ilWriteXMLSchema), input ilExportForInput (ilExportForInput), input vhDocument (ihDocument), output viFcReturnSuper (oiReturnStatus)) in database> if viFcReturnSuper <> 0 then oiReturnStatus = viFcReturnSuper. if viFcReturnSuper < 0 then return. assign vlFcOk = vhDocument:save("longchar", opXmlRepresentation) no-error. if not vlFcOk or error-status:error or error-status:num-messages > 0 then do: assign vcErrors = "". do viCount1 = 1 to error-status:num-messages: if vcErrors <> "" then assign vcErrors = vcErrors + chr(2). assign vcErrors = vcErrors + error-status:get-message(viCount1). end. <M-55 run SetMessage (input #T-31'Unable to Save XML as Longchar':255(778664708)T-31# (icMessage), input '' (icArguments), input '' (icFieldName), input '' (icFieldValue), input 'E' (icType), input 3 (iiSeverity), input '' (icRowid), input 'blf-129673':U (icFcMsgNumber), input '' (icFcExplanation), input '' (icFcIdentification), input '' (icFcContext), output viFcReturnSuper (oiReturnStatus)) in database> if vcErrors <> "" then do viCount1 = 1 to num-entries(vcErrors, chr(2)): <M-43 run SetMessage (input entry(viCount1, vcErrors, chr(2)) (icMessage), input '' (icArguments), input '' (icFieldName), input '' (icFieldValue), input 'E' (icType), input 3 (iiSeverity), input '' (icRowid), input 'blf-597100':U (icFcMsgNumber), input '' (icFcExplanation), input '' (icFcIdentification), input '' (icFcContext), output viFcReturnSuper (oiReturnStatus)) in database> end. assign oiReturnStatus = -1. end. finally: if vhDocument <> ? then delete object vhDocument. end finally.