Salesforce

SAPB1 - Methods (Magic xpi 4.6)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

SAPB1 – Methods (Magic xpi 4.6)

To configure the SAPB1 connector with a method interface:

  1. Drag the SAPB1 connector into a flow. When you do this, the Properties pane for the connector opens.

  2. In the Properties pane, select the Method interface.

  3. Double-click or right-click on the connector and select Configuration from the context menu to open the SAPB1 Configuration dialog box. This is a preliminary dialog box that lets you select the object type that you want to use. It contains the following fields:

Name

Description

Connection

Resource Name

This read-only field displays the name of the SAPB1 resource or dynamic resource that you defined in the Settings dialog box's Resources section and selected for this connector.

Object

Object Type

Select one of the following object types from the drop-down list:

  • None

  • Data Object: Click to open the Data Object List, and select the required object.

  • User Table: Click to open the User Tables List, and select the required user table. The available methods for this option are Query, Add, Update and Delete.

XML Export Type

This is only available when you select Data Object, above. Select one of the following from the drop-down list to enter the XML Export Type used in the transaction:

  • AllNodes

  • ValidNodesOnly

  • NodesAsProperties

  • ExportImportMode

The default is 3.ExportImportMode, which only supports read/write fields.

Note:

You can click Refresh XSD to refresh the current object's schema. This is available only when you select a data object.

  1. Click OK to open the Direct Access Method: SAPB1 dialog box. Here, you can define the parameters for the method interface.

  2. Click Add to add a new method. The available methods are governed by the object type that you selected in the SAPB1 Configuration dialog box, above. The following Direct Access Methods can be used with SAPB1:

Note:

  • When you choose a specific object, only the methods that are relevant to that object appear in the Direct Access Method Configuration dialog box.

  • During Add or Update operations in User Table systems, fields — such as Object, UserSign, Series, Period, Transfered, CreateDate, CreateTime and DataSource — that are maintained by the SAPB1 application are read-only (not updateable) by the user.

The following table lists the methods and parameters that can be used. Parameters in bold are mandatory.

Name

Parameters

Description

Add method adds an XML (single record) to an SAP Business One data object.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

XML Source

Enter the location of the source XML.

The XML source should be in XML format in a BLOB-type format.

New Object Key

When you add a new object to SAPB1, a new object key is created. With some objects, SAPB1 sets this key internally. This can be problematic if you want to query or update the new object, and you do not have its object key. Click to select an Alpha variable that can hold the last object key added to SAPB1.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Cancel method cancels an SAP Business One object instance.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

Object Key

The actual name of this parameter is determined by the object type that you select, above.

Click to open the Expression Editor. You can use the Expression Editor or enter the required information.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Close method closes an SAP Business One object instance.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

Object Key

The actual name of this parameter is determined by the object type that you select, above.

Click to open the Expression Editor. You can use the Expression Editor or enter the required information.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Commit method calls the SAP Business One Commit operation.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Delete method deletes an SAP Business One object instance.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

Object Key

The actual name of this parameter is determined by the object type that you select, above.

Click to open the Expression Editor. You can use the Expression Editor or enter the required information.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Delete Document Line method allows you to delete a specific line in a document.

Connection Name

Enter the connection name (alias). The connection must be created in the Component Connections dialog box. You can select a connection by doing one of the following:

  • Click to open the Expression Editor to enter an expression or condition that will locate the connection you want to use in this step. This allows you to define a dynamic connection for the step.

  • Type the name of a defined connection into the field. This will create a connection that will always be used by this step.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

Data Object

From the drop-down list, select the SAP Business One data object on which to execute the operation:

  • CreditNotes

  • DeliveryNotes

  • DownPayments

  • Drafts

  • InventoryGenEntry

  • InventoryGenExit

  • Invoices

  • Orders

  • PurchaseCreditNotes

  • PurchaseDeliveryNotes

  • PurchaseDownPayments

  • PurchaseInvoices

  • PurchaseOrders

  • PurchaseReturns

  • Quotations

  • Returns

Document Entry

Click to open the Expression Editor to enter the document's object key value.

Line Number

Click to open the Expression Editor to enter the document's object key value.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Disconnect method disconnects an open connection to the SAP Business One company database.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Get Currency Rate gets a currency's exchange rate from the company database.

Currency

Indicate which currency's exchange rate to get. For example, U.S. Dollar (USD) or Euro (EUR). Be sure to check for the correct abbreviation for the currency you are using.

You can also click to open the Expression Editor to enter an expression or condition that will create a dynamic definition of the currency you are using.

Date

Indicate the valid date for the exchange rate. The date must be in DD/MM/YYYY format.

You can also click to open the Expression Editor to enter an expression or condition that will create a dynamic definition for the date.

Exchange Rate

Returns the exchange rate for the currency specified in the Currency parameter.

Click to open the Variables List. Select a variable where the exchange rate value is to be stored.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Query method queries an SAP Business One object instance.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

Object Key

The actual name of this parameter is determined by the object type that you select, above.

Click to open the Expression Editor. You can use the Expression Editor or enter the required information.

Store Result In

Select where you want to store the results from the drop-down list:

  • File

  • Variable (default)

Variable Name (appears when you select Variable in the Store Result In parameter.)

This variable holds the object data that is returned by SAPB1.

Click to open the Variables List. Select a variable where this information is to be stored.

File Name (appears when you select File in the Store Result In parameter.)

This file holds the object data that is returned by SAPB1.

Click to open the Expression Editor. Enter the file path where this information is to be stored.

Query Status

Select one of the following from the drop-down list:

  • Empty XML

  • Variable

  • As Error

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Rollback method calls the SAP Business One Rollback operation.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Set Currency Rate sets a currency's exchange rate for a specified date in the company database.

Currency

Indicate which currency's exchange rate to enter into the company database. For example, U.S. Dollar (USD) or Euro (EUR). Be sure to check for the correct abbreviation for the currency you are using.

You can also click to open the Expression Editor to enter an expression or condition that will create a dynamic definition of the currency you are using.

Date

Indicate the valid date for the exchange rate. The date must be in DD/MM/YYYY format.

You can also click to open the Expression Editor to enter an expression or condition that will create a dynamic definition for the date.

Exchange Rate

Indicate the exchange rate for the currency specified in the Currency parameter.

You can also click to open the Expression Editor to enter an expression or condition that will create a dynamic definition of the currency specified in the Currency parameter.

Update?

Select Yes or No to indicate whether to update the currency's exchange rate in the company database with the rate entered in the Exchange Rate parameter.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Start Transaction method starts a transaction in the SAP Business One company database.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Update method updates an SAP Business One object instance.

Keep Session Open

Select Yes or No from the drop-down list to indicate whether you want the connection to the SAP Business One database to remain open after the operation is completed.

Object Key

The actual name of this parameter is determined by the object type that you select, above.

Click to open the Expression Editor. You can use the Expression Editor or enter the required information.

XML Source

Enter the location of the source XML.

The XML source should be in XML format in a BLOB-type format.

Error Code

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

  1. You can add and define additional methods by clicking Add.

  2. When you have added and defined the required methods, click OK to close the Direct Access Method: SAPB1 dialog box.

Related Topics

How to Use Direct Access Methods

Updating the Object Schema

Reference
Attachment 
Attachment