bw2:sbo_sl_v26

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:sbo_sl_v26 [2021/02/10 17:29]
akoehler
bw2:sbo_sl_v26 [2022/08/23 14:26] (current)
akoehler
Line 1: Line 1:
 ===== SAP Business One Service Layer using Bizweaver v2.6 and higher ===== ===== SAP Business One Service Layer using Bizweaver v2.6 and higher =====
  
-Accessing SAP Business One using the Service Layer is a two-step process. The first step (Login) responds with two cookies. These cookies are then used in any subsequent web service calls in the current processing cycle.+Accessing SAP Business One using the Service Layer is a two-step process. The first step (Log in) responds with two cookies. These cookies are then used in any subsequent web service calls in the current processing cycle.
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
-Accessing SAP Business One via the Service Layer is available for HANA on v9.3 only.  It is available for both HANA and SQL Server beginning with SAP Business One v10 PL02.+Accessing SAP Business One via the Service Layer is available for HANA on v9.3 only.  It is available for both HANA and SQL Serverbeginning with SAP Business One v10 PL02.
 </WRAP> </WRAP>
  
  
-The difference in Bizweaver v2.is that a Service Layer global connection can be used to manage much of the detail work.  Configuring a Service Layer global connection is described **//[[bw2:global_connections#sap_service_layer_connections|here]]//**.+The difference in Bizweaver v2.is that a Service Layer global connection can be used to manage much of the detail work.  Configuring a Service Layer global connection is described **//[[bw2:global_connections#sap_service_layer_connections|here]]//**.
  
 ==== Login Step ==== ==== Login Step ====
  
-{{  :bw:sap_sl_login.png?600  |WebService Login}}+{{ :bw2:bizweaversl26_1.png |}}
  
   * Select **SAP Service Layer** in the "Select Service" drop-down list.   * Select **SAP Service Layer** in the "Select Service" drop-down list.
Line 24: Line 24:
 Once the workflow has completed a successful login, the remaining steps will use the **Interact With Data** option. Once the workflow has completed a successful login, the remaining steps will use the **Interact With Data** option.
  
-{{  :bw:sap_sl_action_step_1.png?600  |}}+{{ :bw2:bizweaversl26_2.png |}}
  
   * Select **SAP Service Layer** in the "Select Service" drop-down list.   * Select **SAP Service Layer** in the "Select Service" drop-down list.
   * Select **Interact With Data** in the next drop-down to the right.   * Select **Interact With Data** in the next drop-down to the right.
-    * No other information is needed in this section as the Login step has provided the needed credentials. +    * No other information is needed in this section as the log-in step has provided the needed credentials. 
-  * Enter the SAP Business One //Object// with which you want to work in the **Construct URI** field.  Enter this information at the end of the pre-populated string, __including the "/before the object as shown in the image above__+  * Select an action from the four options 
-  * Select the desired interaction method from the **Method** drop-down list.  The most common methods used in SAP Business One will be GetPostPatch, and Delete+===Query=== 
 +    * **Query** - This will only select (read) data from the selected object 
 +      In the **Record ID** field, you can enter the primary key for the Object for **Orders** it would be **DocNum** 
 +      * Selecting any of the Feilds in the "Name Columnwill filter results to select only those fields when querying. The Feilds can be seen in the textbox below **Text in the box can be modified**.  
 +      * When you select fields and save when the tool is reentered, it will only show the selected fields. 
 +        * To select more fields, refresh the object list and select or remove fields as needed. 
 +      * **When Query is selected, and fields are selected to limit the query, and you switch to another option, it will clear the query limitations, and the fields need to be unselected and reselected to limit the query again.** 
 +===Add Record=== 
 +    * **Add Record** - This will add new records to SAP. 
 +      * Select **Refresh Object List** to populate the object list. 
 +      * Select the desired object from the list 
 +      Enter the relevant variable or data in the "Value" field 
 +      * **Lines** when adding lines, you have to select the relevant option in the field list for **Orders** it is **DocumentLines** 
 +        * To add lines, the databuilder is needed to format the data into JSON. Once the data is built, it can be entered into the **Value** column for the lines. See example below 
 +Note the lack of array name. The service layer tool will add the array name, so the only thing needed is the array data. 
 +{{ :bw2:bizweaversl26_3.png |}} 
 +**Add Cumulative data from the data builder step to Values field** 
 +{{ :bw2:bizweaversl26_4.png |}} 
 +       * When you select fields and save when the tool is reentered, it will only show the selected fields. 
 +       * To select more fields, refresh the object list and select or remove fields as needed 
 + 
 +===Patch=== 
 +  * **Patch** is used to update a record in SAP
 +    * Enter the record id that needs updating. 
 +    * Select the fields that need to be updated. 
 +    * Enter the values for the selected fields. 
 +  * **When updating records in SAPit is best to update the whole record instead of doing a target update. As in most casesSAP Service Layer will overwrite data in the record instead of adding it to the end.** 
 +===Delete=== 
 +  * **Delete** will delete the indicated record id.
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
-More information on the various objects and methods is available on your HANA server by using this URL in a browser on your network.  <file>https://<YourServerName>:50000</file>+More information on the various objects and methods is available on your HANA server using this URL in a browser on your network.  <file>https://<YourServerName>:50000</file>
 </WRAP> </WRAP>
  
-  * Enter the **Content Type** as <code>application/json</code> for all Service Layer transactions.+==== Working with the Service Layer ==== 
 +Information on sending data through the Service Layer including attachments is found **//[[bw2:Sending Data to the Service Layer|here]]//**.
  
-{{  :bw:sap_sl_action_step_2.png?600  |}}+====== Sample Building JSON for SAP Business One Service Layer ======
  
-The above image is shown for information only.  It illustrates the //cookies// variables that used as credentials to interact with SAP Business One.  The cookies will created in the initial Login step.+===== Workflow ===== 
 +This workflow builds one section of a JSON structure for an SAP Business One sales order.  The section is just the rows as the header information will be entered into the Web Service step.  Each section consists of a SQL statement to gather the needed information and the DataBuilder to format it.  Once the pieces are constructed, the output is sent to the SAP Service Layer API in the WebService step.  Other APIs will work similarly.
  
-==== Working with the Service Layer ====+{{ :bw2:bizweaversl26_5.png |}} 
 + 
 +===== Gather Header Information  ===== 
 + 
 +In this example, we are using the SQL/Tool to gather all the relevant header information. This will be entered directly into the WebService step using the SAP Service Layer Connector. 
 + 
 +===== Create the Lower-Level DataBuilder Step(s) ===== 
 + 
 +{{ :bw2:bizweaversl26_6.png |}} 
 + 
 +This will be the next section in the expected data structure needed by the SAP Service layer. The object name will not be entered as the SAP Service Layer Connector will provide when submitting the data. 
 + 
 +===== Reference Lower-level Objects in the WebServices Step ===== 
 + 
 +Once the DataBuilder steps for the lower-level objects have been created, they can be referenced in the WebServices step. This is what causes the entire data structure to be created when the workflow is executed. 
 + 
 +  * Press F4 to select the Cumulative data variable from the databuilder step. 
 +{{ :bw2:bizweaversl26_7.png |}} 
 + 
 +  * Once the basic structure is there, you can test run the workflow and check to ensure it runs successfully. 
 + 
 +==== Sending Data to the Service Layer ====
 Information on sending data through the Service Layer is found **//[[bw2:Sending Data to the Service Layer|here]]//**. Information on sending data through the Service Layer is found **//[[bw2:Sending Data to the Service Layer|here]]//**.
 +
  
  
bw2/sbo_sl_v26.1612996195.txt.gz · Last modified: 2021/02/10 17:29 by akoehler