The SAP B1 ERP and MRP application could be easily integrated with your electronic document interchange channel, either for output (when you order products from your suppliers) or input (when your customers place their orders in EDI code). In this short article, we would like to bring you the highlights of SB1 EDI programming and deployment:

1. EDI as a fixed-length field format. This is the traditional IDE, when you have the header, lines, and document trailer. All fields have a fixed default length and position

2. EDI as XML. This is a new trend, where XML does the same job as the fixed-length format, mentioned above. If your EDI channel requires XML, you are probably more flexible in the selection of encoding tools and methods.

3. Outbound EDI. You should investigate the SB1 table structure, which is described in the SAP Business One SDK. Another option is to enable system information in SB: View -> System Information. If enabled, open your Purchase Order and hover over the field you want to export in EDI code; in the bottom left corner you should now see the table and the names of the fields. To format your records as a fixed field length, use the CAST or CONVERT SQL clauses. Save your EDI export to the text file; you should consider implementing the DTS (Data Transformation) package to extract records and save the file. For XML, it has strong support in MS SQL Server 2005 or 2000

4. Incoming EDI. Here we recommend DTW or SAP Business One Data Transfer Workbench. However, you don’t use CSV files (also known as Excel templates) here. Here you implement the ODBC source in MS SQL Server. From the MS SQL side, you have to prepare SQL views or stored procedures. Again, implement the DTS package, which will first move your EDI file into the SQL staging tables. Then, from these tables, use View to prepare the results for the Workbench. To avoid binding and configuration issues, in your SQL view, make the field names the same as in the Excel Workbench template for the same object you intend to embed.