Sie sind auf Seite 1von 11

Integration framework

Processing Atom
Call B1 Service

Last Modified: Dezember 19, 2014

Table of Contents
1 Parameters ............................................................................................................................. 2
2 Functions ................................................................................................................................ 5
3 Accessing User-Defined Objects ............................................................................................. 7
3.1 Example for a User-Defined Object in SAP Business One ................................................ 7
3.2 Settings for the GeneralService Object .............................................................................. 8
3.3 Defining Parameters in the Predecessor Transformation Atom ......................................... 9
Copyrights, Trademarks, and Disclaimers .................................................................................11

Call B1 Service
In the process flow, use the call B1 service atom to call a service in SAP Business One.

The functional atom call B1 service is of type complex call or conversion atom. You need a
predecessor transformation, which prepares the data that the integration framework sends or
retrieves in a service call to SAP Business One.

1 Parameters
Scenario Step Identifier
This is a read-only field. It displays the name of the scenario step for which you develop the
process flow.

Atom Identifier
This is a read-only field. It displays the name of the open processing atom. The name is unique
and the integration framework generates it during creation of the atom. The atom name consists
of atom<no> where <no> is a unique number. This name is very important. It is the identifier for
subsequent atoms to access data produced by this atom using the XPath expression, for
example /vpf:Msg/vpf:Body/vpf:Payload[./@id=atom2]/*.
Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

Description
The integration framework generates the description during atom creation. It serves as a
comment describing the atom task. You can modify the description. In the graphical flow, the
framework displays it on mouse move. You can also use it to change the default label which the
integration framework displays in the atom. At the end of your description add the new label in
squared brackets. For example the framework displays the string this is my comment[my Label]
as my Label in the atom. You have 10 digits for your label.
SysId
Select the system you want call using SQL.
A leading # indicates an explicit value, for example #0010000105 calls the system that has
SysID 0010000105 in the SLD. If you use an explicit SysId from SLD, make sure that later at
runtime, the system is the same to ensure the same SysId. Using the explicit value (with leading
#), you can also use variables and properties.
For more information, click the

button to open the documentation.

You have the following options:


B1 system based on User
You can only use this option for scenario steps triggered by HTTP or Web Services which
run in a session and if the HTTP channel is associated to a B1 system using the SLD
parameter associatedSrvIP.
Sender System
You make the SQL call to the B1 sender system that you have defined in your inbound
definition as the sender system.
List of systems in your SLD
To calculate the SysId at runtime, do not use an explicit value. Enter the XPath expression
instead. In the XPath expression, pick up a value from the payload generated, for example, by
the predecessor transformation.
An example is /vpf:Msg/vpf:Body/vpf:Payload[./@id=atom2]/@sysid.
B1 Login
This parameter defines the name to login to the DI API of B1. Set the value always to
Technical User. Then the integration framework uses the B1i user for login. Only for
scenario steps that HTTP or Web Services trigger and that run in a session, there is the option
to select Session User. This gives you the option to explicitly login for example remotely
using an iPhone app under the original user name. Auditing guidelines require this or if the
particular DI operation requires the user login to do the operation, for example for the approval
process. Always prefer using the Technical User, it explicitly avoids opening a new user
session which can be time consuming in the DI API.
To display all option, click the [] button. This parameter supports variables and properties. For
more information click the
button and open the documentation. You can also define an XPath
expression to pick up the value from the sender message or from the calculation by one of the
predecessor atoms.
Stop processing if fails
With this parameter you can control the behavior of the integration framework, if an exception
occurs during the call to SAP Business One.
Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

To select a value, click the [] button.


If you set the value to false, processing continues if an exception occurs. This gives you
the possibility to introduce your own error handling in the following transformation atom or
atoms.
If you set the value to true, an exception forces the processing of your scenario step to fail.
You can display the message in the message log error section with the complete call stack
of internal processing. The default error handling of the integration framework restarts the
scenario step after one minute. The default value is true as of integration framework
version 1.20.6.
The integration framework allows you providing your own error handler as a scenario step in
your scenario package. To define an individual error handler in the integration framework,
choose Scenarios Package Design [Definitions] Error Handling. It is a prerequisite
that you have a scenario step in your scenario package that has the Internal Queue
inbound type. In this individual error scenario step, you can define what you need. Send an
e-mail, a SAP Business One alert, insert a message into a table, and so on.
You can only use explicit values for this parameter. The parameter does not support XPath,
variables and properties.
Service Identifier
Select the service identifier or name from the list.
Service Method Type
Select the service method type. You have the following options:
Get method
To retrieve data
GetList method
To retrieve a list
Add method
To add information
Update method
To update information
Remove method
To delete information
Get Method Identifier
Define the name of the get method call. This is necessary because the integration framework
performs each data hand over using a select with a subsequent data merge and storage. For
more information, see the SAP Business One DI API documentation.
Request Method
Define the request method.

Request Structure
Define the name of the request structure. For more information, see the SAP Business One DI
API documentation.

Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

Request Keys
Define the key names of the request method. For more information, see the SAP Business One
DI API documentation.
Payload
Enter the identifier of the XSL transformation atom that contains the payload.

2 Functions
The integration framework provides context-based documentation. If documentation is available,
the integration framework displays the documentation icon. The greyed out icon indicates still
missing documentation. To open documentation, click the icon.

To open documentation that describes the concepts of variables and properties and how to use
them in the context of the process development, click the button.

[Save]
To save the current parameter definitions of the processing atom, click the [save] button. The
integration framework stores all settings in the process flow definition document (vBIU.bfd). To
open the document, click the
icon on the start atom of your flow.
[VarL]
To add, change or delete local variables, click the button. Local variables are only relevant for
the scenario step they are defined in. In the scenario step all atoms can use them. You can
assign fixed literals or an XPath which runs against the incoming message at runtime before the
system calls the process flow. In the process flow the value is fixed and you cannot change it.
You can use local variables in your XSL coding or in the parameter definition for atoms. For
more information, click the
button

[VarG]
To add, change or delete global variables, click the [VarG] button. Global variables are valid for
all scenario steps of a scenario package. In the scenario steps all atoms can use them. You can
assign fixed literals or an XPath which runs against the incoming message at runtime before the
system calls the process flow. Inside the process flow the value is fixed and you cannot change
it. You can use the global variables in your XSL coding or in the parameter definition for atoms.
For more information, click the
button

[Generate Schema]
To generate the service-specific schema into the predecessor XSL document, which is
applicable for all methods that require a request document (insert and update methods), click
the [Generate Schema] button. It is a prerequisite that you have defined the Service Identifier
and the Payload parameter. The generation is based on the schema definition in the integration
framework repository.
Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

The schema definition is not part of the integration framework installation. To generate it based
on your individual SAP Business One system, select Maintenance Cfg Metadata
[Generate Now]. Enter the reference system in the Reference B1 System field. To avoid
overwriting your coding in the XSL document of the predecessor transformation, the generation
creates an XSL template with the <xsl:template
name="B1if.object.schema.objectname"/> schema definition. In the template, you find
the complete schema. Remove parts, you do not need. The integration framework generates
information of the SAP Business One schema definition (XSD), such as type, field information,
enumeration, and so on, into the body of the elements or generates them as comments. If you
want to use the template, call the template inside your transform template using <xsl:calltemplate name="B1if.object.schema.objectname"/>.
[Help]
To display information about the services of SAP Business One, click the [Help] button. This
information is based on the metadata in the integration framework repository.

[Parameter Template]
To display the parameters structure of the method, click the button.

[Close]
To close the user interface of the atom, click the [Close] button.

Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

3 Accessing User-Defined Objects


You have defined user-defined objects in SAP Business One and you want to use them in the
integration framework.
For more information about defining user-defined objects in SAP Business One see SAP Library
for SAP Business One at http://help.sap.com SAP Business One Getting Started SAP
Business One Main Window Menu Bar Tools Menu User-Defined Objects
For more information about accessing user-defined objects, see the SAP Business One DI API
Objects Reference for the GeneralService object

3.1 Example for a User-Defined Object in SAP Business One


The descriptions in the following sections are based on the following settings for a user-defined
object in SAP Business One.
User-Defined Tables in SAP Business One
#
1
1

Table Name
MYUDOHEADER
MYUDOLINE

Description
My UDO Header
My UDO Line

Object Type
Master Data
Master Data Rows

User-Defined Object Registration Basic Settings


Field Name
Unique ID
Name
Type
Table Name

Field Value
MyUDO
MyUDOName
Master Data
MYUDOHEADER

User-Defined Object Fields for Default Form


Visible

Editable

yes
yes

yes
yes

Column Alias
Code
U_CreationDate
U_Description
Name
DocEntry
Canceled
Object

Column Description
Code
Creation Date
Description
Name
DocEntry
Canceled
Object

Linking Additional Child Tables (MYUDOLINE)


Visible
Yes
yes
yes
yes

Editable

yes
yes

Column Alias
Code
LineId
U_Address
U_Contact
Object
LogInst

Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

Column Description
Code
LineID
Address
Contact
Object
LogInst

3.2 Settings for the GeneralService Object


The GeneralService object provides access to user-defined objects. To access user-defined
objects, enter the following in the B1 Service Call user interface:
Service Identifier
Enter #GeneralService,<YourUserDefinedObjectID>
<YourUserDefinedObjectID> is the unique ID of your user-defined object in SAP Business
One.
Example: #GeneralService,MyUDO
Service Method Type
Select the service method type you want to use.
Service Method Identifier
Enter the identifier that corresponds to the service method type you have selected.
Service Method Type
Get method
Add method
Update method
Remove method

Service Method Identifier


get
add
update
delete

Request Structure
The integration framework sets the following: #???Params
Replace the question marks with the name of the user-defined object:
<YourUserDefinedObjectName>
Example: #MyUDONameParams
Request Keys
Enter the key field name that corresponds to the key for the user-defined object. For the add
method leave the field empty, or enter #x.
For the master data user-defined object type, use the #Code request key. For a document userdefined object type, use the #DocEntry request key.
Key Values
Enter the value of the request key field for which you want to get, update or delete data. For the
add method leave the field empty, or enter #x.

Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

Example for Updating Data

Addition to the Payload of the Predecessor Transformation Atom


<MyUDOName>
<U_CreationDate>2014-08-12</U_CreationDate>
<U_Description>Integration framework record update</U_Description>
<MYUDOLINECollection>
<MYUDOLINE>
<U_Address>xxx</U_Address>
<U_Contact>xxx</U_Contact>
</MYUDOLINE>
</MYUDOLINECollection>
</MyUDOName>

3.3 Defining Parameters in the Predecessor Transformation Atom


To define all parameters in the predecessor transformation atom, use the following settings in
the B1 service call atom:
Service Identifier
Enter #Payload.
Service Method Type, Service Method Identifier, Request Method, Request Structure, Request
Keys, Key Values
Enter #x.
Payload
Select the atom identifier of the XSL transformation atom that contains the parameters.
Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

In the predecessor transformation atom, provide the parameters and the payload in the
following way, for example:
<Envelope xmlns="">
<Header>
<Action DIServiceName="GeneralService" update="update"
get="getByParams" throwException="false">update</Action>
</Header>
<Body>
<BS ServiceCode="MyUDO">
<GetOrDelete>
<xsl:element name="MyUDONameParams">
<xsl:element name="Code">xxx</xsl:element>
</xsl:element>
</GetOrDelete>
<InsertOrUpdate>
<xsl:element name="MyUDONameParams">
<xsl:element name="Code">xxx</xsl:element>
<xsl:element name="Name">xxx</xsl:element>
...
</xsl:element>
</InsertOrUpdate>
</BS>
</Body>
</Envelope>

Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

10

Copyrights, Trademarks, and Disclaimers


Copyright 2014 SAP SE. All rights reserved.
The current version of the copyrights, trademarks, and disclaimers at
http://service.sap.com/smb/sbocustomer/documentation is valid for this document.

Public
2014 SAP SE or an SAP affiliate company.
All rights reserved

11

Das könnte Ihnen auch gefallen