Module sap.businessone.purchasing

ballerinax/sap.businessone.purchasing Ballerina library

1.0.2

Overview

SAP Business One is an enterprise resource planning (ERP) solution designed for small and midsize businesses by SAP SE.

The SAP Business One Purchasing (A/P) connector provides APIs for the purchasing (A/P) documents of SAP Business One: purchase requests, quotations, orders, goods receipts, returns, invoices, and landed costs, exposed through the SAP Business One Service Layer (OData).

Key Features

  • Create, read, update, close, and cancel purchasing documents
  • Process goods receipt POs and A/P invoices
  • Manage landed costs and import postings

Setup guide

The connector requires an SAP Business One installation with the Service Layer component enabled.

To connect, you need three values from the SAP Business One desktop client's login screen: the company database, your user name, and your password.

Click the company name at the top of the SAP Business One desktop application, or contact your administrator.

SAP Business One Choose Company window showing the User ID, Password, and Database fields used to configure the connection

The Service Layer endpoint follows the pattern https://<host>:50000/b1s/v1.

Quickstart

To use the sap.businessone.purchasing connector in your Ballerina application, modify the .bal file as follows:

Step 1: Import the module

Copy
import ballerinax/sap.businessone.purchasing;

Step 2: Instantiate a new connector

The connector authenticates with the Service Layer session protocol: it logs in with the configured company database, user name, and password, tracks the B1SESSION/ROUTEID cookies, and transparently re-logs in once when the session expires. Place the credentials in a Config.toml (never commit credentials to source control):

Copy
serviceUrl = "https://<host>:50000/b1s/v1"
companyDb = "<COMPANY_DB>"
username = "<USER>"
password = "<PASSWORD>"
Copy
configurable string serviceUrl = ?;
configurable string companyDb = ?;
configurable string username = ?;
configurable string password = ?;

purchasing:Client b1Client = check new (
    {companyDb, username, password},
    serviceUrl = serviceUrl
);

Step 3: Invoke the connector operation

Copy
purchasing:PurchaseOrders_CollectionResponse response = check b1Client->purchaseOrdersList();

Step 4: Run the Ballerina application

Copy
bal run

Examples

The SAP Business One connectors provide practical examples illustrating usage in various scenarios. Explore these examples, covering use cases like listing open sales orders, reporting inventory stock, and logging CRM activities.

Import

import ballerinax/sap.businessone.purchasing;Copy

Other versions

Metadata

Released date: 6 days ago

Version: 1.0.2

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.13.0

GraalVM compatible: Yes


Pull count

Total: 1

Current verison: 1


Weekly downloads


Source repository


Keywords

Name/SAP Business One Purchasing

Area/ERP & Business Operations

Vendor/SAP

Cost/Paid

Type/Connector

SAP Business One

Purchasing

ERP


Contributors