Documentation() /* Created By Balaji Created On 15th May 2009 Revision History Sr No Defect Number Trigger Modified Modified By Modified On Reason For Modification */ OnRun() // Get - Set Import File Path IF NVSetup.GET() = TRUE THEN BEGIN ImpFlPth := NVSetup."Import File Path" + '\' + 'PurchaseOrderImportXMLFile.xml'; END ELSE BEGIN NVLogPrvdr.WriteLog('',Err0004); EXIT; END; // Check Whether The File Exists IF NOT EXISTS(ImpFlPth) THEN BEGIN NVLogPrvdr.WriteLog('',STRSUBSTNO(Err0001,ImpFlPth)); EXIT; END; // Try To Open The Import File IF POXMLFl.OPEN(ImpFlPth) = TRUE THEN BEGIN // Create Instream For The Vendor XML File POXMLFl.CREATEINSTREAM(POFlStrm); //Import The XML File Using XMLPort IF XMLPORT.IMPORT(50003,POFlStrm) = TRUE THEN BEGIN // Import Is Successful. Close The XML File. POXMLFl.CLOSE; END ELSE BEGIN NVLogPrvdr.WriteLog('',STRSUBSTNO(Err0003,ImpFlPth,Tit0001)); END; END ELSE BEGIN NVLogPrvdr.WriteLog('',STRSUBSTNO(Err0002,ImpFlPth)); END;
Answers