Wiki

Scale Your Enterprise

User Tools

Site Tools


bw2:sap_business_one_integration_using_di

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bw2:sap_business_one_integration_using_di [2021/02/11 13:16]
akoehler [Select the Desired Object Components]
bw2:sap_business_one_integration_using_di [2022/08/02 16:45] (current)
akoehler
Line 1: Line 1:
 ====== Introduction (SAP Business One Integration on SQL Server) ====== ====== Introduction (SAP Business One Integration on SQL Server) ======
  
-This page discusses the Bizweaver tools used for integration with SAP Business One (SBO) on SQL Server databases.+This page discusses the Bizweaver tools used to integrate SAP Business One (SBO) on SQL Server databases.
  
 ====== Related Documents ====== ====== Related Documents ======
Line 25: Line 25:
 ====== Overview ====== ====== Overview ======
  
-This document's discussions assume that you are using either DI Server or DI API to communicate with SAP Business One in a SQL Server environment. These tools can also be used in a HANA environment but with some limitations. New functionality beginning in SAP Business One v9.2 may not be supported with DI Server or DI API.+This document's discussions assume that you are using either DI Server or DI API to communicate with SAP Business One in a SQL Server environment. Mapping tools can be implemented by a user in a HANA environment but with some limitations. New mapping functionality beginning in SAP Business One v9.2 may not be supported with DI Server or DI API.
  
 For HANA environments, Third Wave recommends the use of the SAP Business One Service Layer. This is a web service-based set of APIs that support integration activities. Unfortunately, **this approach is only available for HANA environments**. The Service Layer is supported in Bizweaver via the Web Service tool. Information on using the Service Layer integration will be provided in a separate document. For HANA environments, Third Wave recommends the use of the SAP Business One Service Layer. This is a web service-based set of APIs that support integration activities. Unfortunately, **this approach is only available for HANA environments**. The Service Layer is supported in Bizweaver via the Web Service tool. Information on using the Service Layer integration will be provided in a separate document.
Line 37: Line 37:
 The basic process is: The basic process is:
  
-  - A SQL Command: Reader step gets a list of orders to be processed.+  - A SQL Command: The reader step gets a list of orders to be processed.
   - A Loop is started to process each order record.   - A Loop is started to process each order record.
-  - A SQL Command: Reader step gets the details for each order to be processed based.+  - A SQL Command: The reader step gets the details for each order to be processed based.
   - The detailed data is mapped to the corresponding fields in SAP Business One.   - The detailed data is mapped to the corresponding fields in SAP Business One.
   - The mapped data is passed through the SAP Business One DI Server to update the designated company database.   - The mapped data is passed through the SAP Business One DI Server to update the designated company database.
Line 46: Line 46:
 ====== Mapper Tool ====== ====== Mapper Tool ======
  
-The **Mapper** tool is used to connect the incoming data columns to the appropriate value in SAP Business One.+The **Mapper** tool connects the incoming data columns to the appropriate value in SAP Business One.
  
 ===== Define Connections ===== ===== Define Connections =====
Line 63: Line 63:
 An SAP Business One “object” is the document or transaction to be created. In this example, we will create a Sales Order. An SAP Business One “object” is the document or transaction to be created. In this example, we will create a Sales Order.
  
-The list of objects will be slightly different based on the DI connection being used. When DI API is being used, the object name starts with “o, where DI Server does not. Using Sales Orders as an example:+The list of objects will be slightly different based on the DI connection being used. When DI API is being used, the object name starts with “o,” where DI Server does not. Using Sales Orders as an example:
  
   * DI Server: OrdersService   * DI Server: OrdersService
Line 101: Line 101:
 ==== Header Mapping Example ==== ==== Header Mapping Example ====
  
-{{  :bw:sapimage6.png?384x224  }}+{{ :bw2:bizweaverdi6.png |}}
  
-==== Row Detail Mapping Example ====+==== Search Bar ====
  
-{{  :bw:sapimage7.png?384x255  }}+A search function is available in the Mapper to assist with looking for fields if the source or target lists are too long.
  
 +{{ :bw2:sapsearch.png |}}
 +
 +==== Row Detail Mapping Example ====
 +
 +{{ :bw2:bizweaverdi7.png |}}
  
   - Tabs indicating selected object components are shown at the top of the mapping section.   - Tabs indicating selected object components are shown at the top of the mapping section.
Line 130: Line 135:
 The **SBO Update** tool handles the communication between Bizweaver and the SAP Business One DI. This is the step that updates SAP Business One. The **SBO Update** tool handles the communication between Bizweaver and the SAP Business One DI. This is the step that updates SAP Business One.
  
-{{  :bw:sapimage8.png?475x166  }} +{{ :bw2:bizweaverdi8.png |}}
 Select a **Mapper** workflow step from the drop-down list. Select a **Mapper** workflow step from the drop-down list.
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
 New in v2.4 New in v2.4
-Only the appropriate Mapper step must be selected.  The associated DI connection is selected automatically.+in the SBO Update step, a user must only select the appropriate Mapper step must be selected.  The associated DI connection is selected automatically.
 </WRAP> </WRAP>
  
Line 144: Line 148:
 ===== Adding Activities ===== ===== Adding Activities =====
  
-When adding activities in the mapper tool, if you are using the DI API or DI Server, you will choose different options+When adding activities in the mapper tool, you will choose different options if you are using the DI API or DI Server. 
  
   * DI API - oContacts in Mapper tool    * DI API - oContacts in Mapper tool 
Line 155: Line 159:
 <code sql>Convert(varchar,DateFieldName,112) as [AliasName] </code> <code sql>Convert(varchar,DateFieldName,112) as [AliasName] </code>
  
-where FieldName is the column to be converted, and AliasName is the name to be used on output.+FieldName is the column to be converted, and AliasName is the name to be used on output.
  
 For example: <code sql> convert(varchar,DocDate,112) as [DocDate] </code> For example: <code sql> convert(varchar,DocDate,112) as [DocDate] </code>
Line 165: Line 169:
 This is where the ‘Create new record for …” options come into play. Assume you have ten records for an order, each representing an order row. This means that the source record ID, customer code, etc., are presented ten times, once on each row. This is where the ‘Create new record for …” options come into play. Assume you have ten records for an order, each representing an order row. This means that the source record ID, customer code, etc., are presented ten times, once on each row.
  
-To avoid creating ten orders, one for each row, we use the “Change of value” option. This option ensures that a header record is created only when the specified key record value in the incoming data changes.+To avoid creating ten orders, one for each row, we use the “Change of value” option. This option ensures that a header record is created only when the specified key records value incoming data changes.
  
 At the same time, the rows typically use the “Every record” option. This means that a row record is created for each incoming row but within the designated header value. Note, however, that the “Change on value” option for rows may use a specific value in some cases. See Appendix D for an example of this type of usage. At the same time, the rows typically use the “Every record” option. This means that a row record is created for each incoming row but within the designated header value. Note, however, that the “Change on value” option for rows may use a specific value in some cases. See Appendix D for an example of this type of usage.
Line 189: Line 193:
 ====== SAP Business One Data Schemas ====== ====== SAP Business One Data Schemas ======
  
-The information **DI Server** uses in the Bizweaver Mapper and SBO Update tools are obtained from SAP Business One schema files. These files contain information about the various data objects available, what actions can be performed on each object, and the data elements of each object. Bizweaver DI Server connections interact with SAP Business One to create its own version of these files.+The information **DI Server** uses in the Bizweaver Mapperand SBO Update tools are obtained from SAP Business One schema files. These files contain information about the various data objects available, what actions can be performed on each object, and the data elements of each object. Bizweaver DI Server connections interact with SAP Business One to create its own version of these files.
  
-From time to time, it may be necessary to update these files. This generally happens automatically when a Mapper step is opened. If the files need to be updated, Bizweaver will appear to “pause” for several seconds. A progress bar is displayed while the update is executing. When the progress bar disappears, you will be able to continue working.+From time to time, when using the DI Server, it may be necessary to update these files. This generally happens automatically when a Mapper step is opened. If the files need to be updated, Bizweaver will appear to “pause” for several seconds. A progress bar is displayed while the update is executing. When the progress bar disappears, you will be able to continue working.
  
 See **//[[bw2:SBOSchemas|SBO Schemas]]//** for more information. See **//[[bw2:SBOSchemas|SBO Schemas]]//** for more information.
Line 224: Line 228:
 ====== Error Handling Using File Writer ====== ====== Error Handling Using File Writer ======
  
-The Bizweaver File Writer tool can create a file to be used for the transaction processing track. A common use of this type of file is to capture error information when SAP Business One transaction is being created.+The Bizweaver File Writer tool can create a file to be used for the transaction processing track. A common use of this type of file is to capture error information when an SAP Business One transaction is created.
  
 The Custom Output File Writer option must be used to create this type of file. In this example, we are using all three sections of the custom output. The Body section of the file contains the response from the SAP Business One DI. The Custom Output File Writer option must be used to create this type of file. In this example, we are using all three sections of the custom output. The Body section of the file contains the response from the SAP Business One DI.
  
-{{  :bw:sapimage14.png?346x360  }}+{{ :bw2:bizweaverdi9.png |}}
  
 The values that are used in the Body section are shown below. Press F4 to get a list of all available variables. The values that are used in the Body section are shown below. Press F4 to get a list of all available variables.
Line 241: Line 245:
   * **Value** indicates whether the SAP Business One posting was successful. Values returned will be either “Y” for success or “N” for fail. In most cases, this variable will be used in a decision step.   * **Value** indicates whether the SAP Business One posting was successful. Values returned will be either “Y” for success or “N” for fail. In most cases, this variable will be used in a decision step.
   * **RetType** is the SAP Business One object ID for the document that was created.   * **RetType** is the SAP Business One object ID for the document that was created.
-  * **Message** is the response returned from the SAP Business One ID if the posting was unsuccessful. This will generally provide some information as to the problem. No message information is returned if the posting was successful.+  * **Message** The response returned from the SAP Business One ID if the posting was unsuccessful. This will generally provide some information as to the problem. No message information is returned if the posting was successful.
  
 Following is the output to the file based on the setup described here. The mapping was deliberately done incorrectly to illustrate the output from SAP Business One. Note that {RetKey} is blank, {Value} is “N” and {Type} is blank since the posting failed. {Message} describes the issue as it came from the SAP Business One DI. Following is the output to the file based on the setup described here. The mapping was deliberately done incorrectly to illustrate the output from SAP Business One. Note that {RetKey} is blank, {Value} is “N” and {Type} is blank since the posting failed. {Message} describes the issue as it came from the SAP Business One DI.
Line 281: Line 285:
 There are three columns in the table that are key to retrieving the file data and passing it to SAP Business One. These columns are: FormId, RecordId, FileName, and FileContent. There are three columns in the table that are key to retrieving the file data and passing it to SAP Business One. These columns are: FormId, RecordId, FileName, and FileContent.
  
-**FileName** is the name of the file when it was uploaded. No references to the source folder are captured since they are not relevant.+**FileName** was the name of the file when it was uploaded. No references to the source folder are captured since they are not relevant.
  
 **FileContent** is the actual data from the file, stored as a binary record. This field's information cannot be used without some process to convert it back to its original format. **FileContent** is the actual data from the file, stored as a binary record. This field's information cannot be used without some process to convert it back to its original format.
Line 287: Line 291:
 FileName and FileContent are used in the mapping into SAP Business One. FileName and FileContent are used in the mapping into SAP Business One.
  
-**FormId** is the identifying number of the Versago form. You can find this information on the “Form Creation”tab on the form maintenance function is Versago.+**FormId** is the identifying number of the Versago form. You can find this information on the “Form Creation” tab on the form maintenance function is Versago.
  
-**RecordId** is the primary key value (record ID) of the record in Versago that was created when the file was uploaded. There may be multiple records in TWBS_VGO_FormAttachments for each RecordId.+**RecordId** is the primary key value (record ID) of the record in Versago created when the file was uploaded. There may be multiple records in TWBS_VGO_FormAttachments for each RecordId.
  
 ===== Versago Record Information ===== ===== Versago Record Information =====
Line 304: Line 308:
  
 <WRAP center round info> <WRAP center round info>
-This is a very simple example to illustrate the process. In most cases, you will need to add additional logic to obtain the correct recordset.+This is a straightforward example to illustrate the process. In most cases, you will need to add additional logic to obtain the correct record set.
 </WRAP> </WRAP>
  
  
-{{  :bw:sapimage15.png?576x87  }} +{{ :bw2:bizweaverdi10.png |}}
   - A list of unique file upload records (column “Id”) is obtained. In this example, the Versago form ID (ObjectId) is 11. \\ <code sql>select    - A list of unique file upload records (column “Id”) is obtained. In this example, the Versago form ID (ObjectId) is 11. \\ <code sql>select 
 t0.Id  t0.Id 
Line 323: Line 326:
       - In this case, the SAP Business One object receiving the attachment is a Business Partner.       - In this case, the SAP Business One object receiving the attachment is a Business Partner.
       - The transaction for attachment will always be an UPDATE.       - The transaction for attachment will always be an UPDATE.
-      - The FileName and FileContent values are both mapped to the “AttachmentEntry” (AtcEntry) value in SAP Business One. \\ {{  :bw:sapimage16.png?564x239  }}+      - The FileName and FileContent values are both mapped to the “AttachmentEntry” (AtcEntry) value in SAP Business One. \\ {{ :bw2:bizweaverdi11.png |}}
   - The mapped information is passed into the SAP Business One update tool for processing.   - The mapped information is passed into the SAP Business One update tool for processing.
  
Line 330: Line 333:
 In this example, a Versago form is used to capture information to create a Purchase Order in SAP Business One. The order is created in SAP Business One, and then the attachments are associated with the new order. In this example, a Versago form is used to capture information to create a Purchase Order in SAP Business One. The order is created in SAP Business One, and then the attachments are associated with the new order.
  
-{{  :bw:sapimage17.png?576x212  }}+{{ :bw2:bizweaverdi13.png |}}
  
   - A list of records created from the Versago form is created, and an SAP Business One purchase document is created for each one.   - A list of records created from the Versago form is created, and an SAP Business One purchase document is created for each one.
Line 346: Line 349:
       - In this case, the SAP Business One object receiving the attachment is the purchase order created previously in the process and defined by the “DocEntry” value from step 2.       - In this case, the SAP Business One object receiving the attachment is the purchase order created previously in the process and defined by the “DocEntry” value from step 2.
       - The transaction for attachment will always be an UPDATE.       - The transaction for attachment will always be an UPDATE.
-      - The FileName and FileContent values are both mapped to the “AttachmentEntry” (AtcEntry) value in SAP Business One. \\ {{  :bw:sapimage18.png?384x202  }}+      - The FileName and FileContent values are both mapped to the “AttachmentEntry” (AtcEntry) value in SAP Business One. \\ {{ :bw2:bizweaverdi12.png |}}
   - The mapped information is passed into the SAP Business One update tool for processing.   - The mapped information is passed into the SAP Business One update tool for processing.
  
Line 362: Line 365:
 The attached file must be identified as a Bizweaver //Variable// in the workflow. This will typically be done using a File Operations-Get step. The results of the “get” are then identified in a subsequent Variable step. The attached file must be identified as a Bizweaver //Variable// in the workflow. This will typically be done using a File Operations-Get step. The results of the “get” are then identified in a subsequent Variable step.
  
-  - File Operations – Get step to get file information. \\ {{  :bw:sapimage19.png?384x192  }} \\ In this example we are getting one file (TestFile.txt) from C:\Shared\Infiles. +  - File Operations – Get step to get file information. \\ {{ :bw2:bizweaverdi14.png |}} \\ In this example we are getting one file (TestFile.txt) from C:\Shared\Infiles. 
-  - Set variable to the value from the “get” step. \\ {{  :bw:sapimage20.png?384x338  }} \\ Note that the “FileName” value is used from the “get” step. This value includes the folder path, file name, and file extension. +  - Set the variable to the value from the “get” step. \\ {{ :bw2:bizweaverdi15.png |}} \\ Note that the “FileName” value is used from the “get” step. This value includes the folder path, file name, and file extension. 
-  - Map the needed information in a Mapper step. \\ {{  :bw:sapimage21.png?384x197  }} \\ In this example we are adding an attachment to a Business Partner. The only values needed are the BP Code (CardCode) and the variable set earlier with the file information. +  - Map the needed information in a Mapper step. \\ {{ :bw2:bizweaverdi16.png |}} \\ In this example we are adding an attachment to a Business Partner. The only values needed are the BP Code (CardCode) and the variable set earlier with the file information. 
-  - A subsequent SBOUpdate tool step is used to post the information to SAP Business One. \\ Any object in SAP Business One that supports attachments can be updated using the above process. You only need to provide the key value for the object and the file information. The two most common objects for attachments are Business Partners where the key value is //CardCode//, and Marketing documents (e.g., Orders, Deliveries/Receipts, Invoices) the key value is //DocEntry//.+  - A subsequent SBOUpdate tool step is used to post the information to SAP Business One. \\ Any object in SAP Business One that supports attachments can be updated using the above process. You only need to provide the key value for the object and the file information. The two most common objects for attachments are Business Partnerswhere the key value is //CardCode//, and Marketing documents (e.g., Orders, Deliveries/Receipts, Invoices). The key value is //DocEntry//. 
 + 
 +====SAP Update Variables==== 
 + 
 +^Name ^Description^ 
 +|Message|This indicates the message returned from the DI API/DI Server interaction| 
 +|RetKey|This indicates the DocNum that is returned from the DI API/DI Server when a record is created| 
 +|RetType|This indicates the Document Type returned from the DI API/DI Server| 
 +|VALUE|This indicates if adding, updating, deleting etc. The record in SAP via the DI API/DI Server was successful with a Y = Yes and N = No| 
 +|Command|Command is type of operation, Add/Update/Delete/Getbykey etc| 
 +|FieldName|The indicates the Primary field name used for that object | 
 +|Input|This is for legacy versions of Bizweaver and no longer displays any data| 
 +|Output|This is for legacy versions of Bizweaver and no longer displays any data| 
 +|ProcessedCount|If performing bulk operations ex multiple records, then a number of processed records will be this. If we are looping through records| 
 +|ProcessInput|Currently processing record.| 
 +|ServiceName|This indicates the service name used in the mapper tool| 
 +|ServiceType|In the case of DI Server/ DIAPI, specify whether the object currently in process is a System object or User defined object| 
 +|ThrowErrorOnFail|True or False, When bulk operations are processing if one record fails this will stop all further processing if continue on error is selected it will process all other records that are left to process| 
 +|TotalCount Total|count of all records if there is a bulk operation| 
 +|StepMessage|During a failure the reason for failure will be populated here| 
 +|StepStatus|True or False|
bw2/sap_business_one_integration_using_di.1613067398.txt.gz · Last modified: 2021/02/11 13:16 by akoehler