Automating EDI Imports with SYSPRO e.Net
Note: The following is in beta as of 5/3/2020 and requires a base Cadacus release of 3/10/2020 or later and document updates which may be requested.
All the EDI document imports and exports can be called as a SYSPRO business object. SYSPRO's e.Net system manager is required. The business object to call is the standard import/export program name. This name can be found by starting the program in SYSPRO and pressing shift-F7 to get the information screen. For example the program and business object for the 850 import is EDI850.
Each call to the business object can only process a single set of information at a time.
Type - Transaction, Post
XMLParameter
Elements | Examples | Notes |
EDIImport | Root element. | |
Parameters | Start if import parameters | |
TestMode | Yes | Sets the value of the input test option. The default will be the default as defined in the system setup. |
DuplicatePOCheck | No | Sets the value of the duplicate purchase order check option. The default will be the default as defined in the system setup. |
Triggers | Yes | Enables or disabled the execution of SYSPRO triggers during import. The default will be as set in the system setup. |
Sample XMLParameter
<EDIImport> <Parameters> <TestMode>Yes</TestMode> </Parameters> </EDIImport>
XMLIn
Elements | Examples | Notes |
EDIImport | Root element. | |
Import | Start of an import | |
TradingPartner | PARTNERCODE | The trading partner code for which the import should be performed. This is the only required element. |
File | c:\EDI\EDI850.edit | Sets the name of the file to import. This will default to the file name as defined in the document setup. |
EmailCode | 850GROUP | Sets the email group to send any emails regarding this import to. The default will |
Report | No | Enables or disables the creation of a report. Default is Yes |
ReportFile | Sends the report to the specified file name | |
ReportLocation | Server | Indicates the ReportFile name is based on the Server or Client. Server is the default. |
ReportIfNoActivity | Yes | Allows the report to be disabled if there is no activity. I.E. The import file does not exist. |
Sample XMLIn
<EDIImport> <Import> <TradingPartner>XXX</TradingPartner> </Import> </EDIImport>
XMLOut
Elements | Notes |
EDIImport | Root element. |
Import | Start of the imports returned information. |
TradingPartner | The trading partner code for which the import was performed. |
ArchivedReportFile | The name of the archived report is report history is enabled in the system setup. |
Errors | A count of the errors on the report. |
Warnings | A count of the warnings on the report. |
BatchNumber | The batch number for followup processing. This is currently used internally for the immediate processing of exports such as the 855. This feature is not supported by the business objects at this time. |
ReportNumber | The report number of the report in the SQL tables if saving of the report to SQL is enabled. |
DocumentType | Import Only - The document type imported (Orders, Invoices, etc.) |
DocumentProcess | Import Only - Standard action on the documents (Created, Updated, etc.) |
DocumentCount | Import Only - The number of documents processed. |
SkippedDueToDuplicatePO | Sales Order Import Only - The count of any purchases orders skipped due to a sales order with the same PO already in the system. |
SkippedDueToOrderType | |
SkippedDueToOrderStatus | |
SkippedDueToTestMode | |
DocumentsCancelled | |
ForecastsWritten |
Sample XMLOut
<EDIImport> <Import> <TradingPartner>P1</TradingPartner> <DocumentType>Order(s)</DocumentType> <DocumentProcess>created</DocumentProcess> <DocumentCount>1</DocumentCount> <SkippedDueToDuplicatePO>0</SkippedDueToDuplicatePO> <SkippedDueToOrderType>0</SkippedDueToOrderType> <SkippedDueToOrderStatus>0</SkippedDueToOrderStatus> <SkippedDueToTestMode>0</SkippedDueToTestMode> <DocumentsCancelled>0</DocumentsCancelled> <ForecastsWritten>0</ForecastsWritten> <ArchivedReportFile>c:\EDI\Reports\P1\EDI850-08234034.txt</ArchivedReportFile> <Errors>0</Errors> <Warnings>0</Warnings> <BatchNumber>1104</BatchNumber> </Import> </EDIImport>