SAP DI API

sap-sdk

 

Working with SAP Business One SDK - Data Interface API

 

The SAP Business One DI API provides a programmatic interface to SAP Business One through a set of fully functional business objects. The DI API provides access to the business logic and data-access layers of SAP Business One.

 

A BeasScript object allow you to use most of functions and methods from SAP SDK - Data Interface API

Note: Please use Beas Service Layer if possible. This is the new interface for creating documents and support all Beas Rules.

 

The complete interface to the SAP DI-API is inside BeasScript object ue_di_api

 

BeasScript: declare=[objektname]=ue_api_sbo

 

Now you can access the DI-API directly via Object Names.

See Additional examples

 

You can access almost any Property with api_sbo. api_sbo will not perform any checks.

More information can be found within the SAP SDK Documentation.

 

hmtoggle_plus1Important: Only one DI-API Object  a time is allowed.

 

Error handling

 

beasscript-logo-small

The Object return values in the return object

Return code: <objectname.ret_code>   -1 = error, 1 = ok

Return Text: <objectname.ret_text>     Return last error

Additional information about error you can read with <objectname.getlasterror>.

vdoc.add
if <vdoc.ret_code> = -then
  message=fehler$error create Order: <vdoc.getlasterror>
end if

 

Functions like add, getbusinessobject, update, getbykey and so on will return "value"

vdoc.ret_code = 1  = ok

vdoc.ret_code = -1 = error

 

Additional examples

DI-API Methods

DI-API Properties

DI-API: Objects

DI-API: Service Types