Compartir a través de


SAP

SAP Application Server and Message Server messages

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Enterprise All Logic Apps regions and Integration Service Environments (ISEs) except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Contact
Name Microsoft
URL https://support.microsoft.com/
Email abapi@microsoft.com
Connector Metadata
Publisher Microsoft
Website https://www.sap.com/index.html
Privacy policy https://www.sap.com/about/legal/privacy.html
Categories IT Operations

Connector in-depth

This article contains the reference API specification and general limits. For detailed documentation about the connector, including prerequisites, how-to steps, request parameters schema, and samples, review Connect to SAP systems from Azure Logic Apps.

General Limits

Name Value
The maximum request body size in KB for the send message operation when using the on-premises data gateway 2560
The maximum request body size in KB for the send message operation when using the integration service environment (ISE) without the on-premises data gateway 102400
The request timeout in seconds for requests when using the on-premises data gateway 118
The request timeout in seconds for requests when using the integration service environment (ISE) without the on-premises data gateway 225

For larger-sized request XML parameters, put the XML parameters document in an Azure Storage blob. Then, rather than directly putting the XML parameters in the request body, put the fully-qualified Shared Access Signature (SAS) URI for the Storage blob in the request body instead. The blob is then downloaded at runtime. Make sure that the blob is accessible from the download location, for example, the on-premises data gateway or ISE connector subnet.

For requests with longer timeouts, use a long-running action whenever available. Long-running actions are based on Azure Logic Apps long-running tasks with the webhook action pattern.

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Shareable

Default

Applicable: All regions

Parameters for creating connection.

This is shareable connection. If the power app is shared with another user, connection is shared as well. For more information, please see the Connectors overview for canvas apps - Power Apps | Microsoft Docs

Name Type Description Required
Gateway gatewaySetting On-prem gateway (see https://docs.microsoft.com/data-integration/gateway for more details True
Client int The SAP client ID to connect to the SAP system. True
Authentication Type string Authentication type to connect to the SAP System. Must be basic (username and password). True
SAP Username securestring The username to be used for log in to the SAP System.
SAP Password securestring The password to be used for log in to the SAP System.
Logon Type string The type of logon to the SAP System, either Application Server Logon (Type A) or Group Logon (Type B aka Message Server). True
AS Host string The hostname of the SAP Application Server.
AS Service string The service name or port number of the SAP Application Server.
AS System Number int The SAP System's System Number. It is a number ranging from 00 to 99.
MS Server Host string The hostname of the SAP Message Server aka R3 System Name.
MS Service Name or Port Number string The service name or port number of the Message Server.
MS System ID string The System ID of the SAP system.
MS Logon Group string The Logon Group for the SAP System.
Safe Typing bool Use strong types if false, otherwise use string as safe type.
Use SNC bool When selected, the connections will be secured with SNC.
SNC Library string Name or path of the SNC library to be used.
SNC SSO string The SNC SSO specifies whether to use SNC identity or credentials provided on RFC level.
SNC My Name string Identity to be used for this particular destination/server (optional).
SNC Partner Name string The backend's SNC name.
SNC Quality of Protection string Quality of Service to be used for SNC communication of this particular destination/server.
SNC Certificate string Base64 encoded X.509 certificate.
PSE securestring Base64 encoded PSE (Personal Security Environment).

Throttling Limits

Name Calls Renewal Period
API calls per connection 2500 60 seconds

Actions

[BAPI - RFC] Close stateful session

Closes an existing stateful connection session to the SAP system.

[BAPI - RFC] Create stateful session

Creates a stateful connection session to the SAP system.

[BAPI] Call method in SAP (Preview)

Calls the BAPI method on the SAP system.

[BAPI] Commit transaction

Commits the BAPI transaction for the given session.

[BAPI] Roll back transaction (Preview)

Rolls back the BAPI transaction for the given session.

[IDOC - RFC] Confirm transaction Id

Sends transaction Id confirmation to SAP.

[IDOC] Get IDOC list for transaction

Gets the list of IDOCs for the transaction identified by either session identifier GUID or transaction identifier (TID).

[IDOC] Get IDOC status

[IDOC] Get IDOC status.

[IDOC] Send document to SAP

Sends IDOC message to SAP.

[IDOC] Send document to SAP (deprecated) (Preview)

Sends IDOC message to SAP (deprecated).

[RFC] Add RFC to transaction (Preview)

Adds an RFC call to a transaction identified by tId and-or queue name, creating a new transaction if none exists.

[RFC] Call function in SAP (Preview)

Calls an sRFC, tRFC or qRFC on the SAP system.

[RFC] Call function in SAP (V2) [DEPRECATED]

Calls an sRFC, tRFC or qRFC on the SAP system.

[RFC] Call function in SAP (V3) (Preview)

Calls an sRFC, tRFC or qRFC on the SAP system in a culturually-independent manner.

[RFC] Call long-running function in SAP (Preview)

Calls a long-running sRFC on the SAP system and waits for the system to respond back.

[RFC] Commit transaction (Preview)

Commits the RFC transaction for the given session and-or queue.

[RFC] Create transaction

Creates a new transaction if none exists, using the provided transaction Id and-or queue name. If the transaction exists, gets the details of the existing transaction. The transaction Id can be provided in either GUID or 24-character string format.

[RFC] Get transaction

Gets the details of a transaction identified by transaction Id and-or queue name, creating a new transaction if none exists. The transaction Id can be provided in either GUID or 24-character string format. Both the queue name and the transaction Id must be provided to find an existing qRFC transaction.

Generate schemas

Generates XML schemas for the provided SAP action or URI.

Read SAP table (obsolete) [DEPRECATED]

This action requires that the user has access to 'BBP_RFC_READ_TABLE' or 'RFC_READ_TABLE' RFC.

Read SAP table (Preview)

This action requires that the user has access to 'BBP_RFC_READ_TABLE' or 'RFC_READ_TABLE' RFC.

Send message to SAP

Sends any message type RFC, BAPI, IDOC to SAP.

[BAPI - RFC] Close stateful session

Closes an existing stateful connection session to the SAP system.

Parameters

Name Key Required Type Description
Session Id
sessionId True string

The stateful session Id as a string.

Returns

response
object

[BAPI - RFC] Create stateful session

Creates a stateful connection session to the SAP system.

Returns

Result for Create Session operation.

[BAPI] Call method in SAP (Preview)

Calls the BAPI method on the SAP system.

Parameters

Name Key Required Type Description
Business Object
businessObject True string

The Business object type, such as 'BANKDETAIL'.

Method
method True string

The method to be called, e.g. 'CREATE', followed by the implementing BAPI method, separated by ':' character.

Auto commit
autoCommit boolean

Automatically commits the BAPI transaction if SAP BAPI response has no error. Automatically rollback the BAPI transaction if SAP BAPI response has an error.

Session Id
sessionId string

The optional stateful session Id as a string. If none is provided, the call is made on a stateless connection.

Input BAPI parameters
body True binary

Input BAPI parameters to call SAP or URI to storage blob containing the BAPI parameters.

Content-Type
Content-Type string

Specify content-type of the request payload.

Returns

Result for Call BAPI operation

[BAPI] Commit transaction

Commits the BAPI transaction for the given session.

Parameters

Name Key Required Type Description
Session Id
sessionId True string

The stateful session Id as a string.

Wait for synchronous update
wait boolean

Wait for synchronous updating completion.

Close the session
closeSession boolean

Closes the stateful connection session.

Returns

SAP BAPI return structure version 2 aka BAPIRET2

Body
BapiRet2

[BAPI] Roll back transaction (Preview)

Rolls back the BAPI transaction for the given session.

Parameters

Name Key Required Type Description
Session Id
sessionId True string

The stateful session Id as a string.

Close the session
closeSession boolean

Closes the stateful connection session.

Returns

SAP BAPI return structure version 2 aka BAPIRET2

Body
BapiRet2

[IDOC - RFC] Confirm transaction Id

Sends transaction Id confirmation to SAP.

Parameters

Name Key Required Type Description
Transaction Id
tid True string

The transaction Id in GUID string format.

Returns

response
object

[IDOC] Get IDOC list for transaction

Gets the list of IDOCs for the transaction identified by either session identifier GUID or transaction identifier (TID).

Parameters

Name Key Required Type Description
Direction
direction True string

Whether the IDOC to find was sent or received by SAP.

Transaction Id
tId True string

The transaction Id formatted as either GUID or 24-character string.

Returns

List of IDOC numbers.

[IDOC] Get IDOC status

[IDOC] Get IDOC status.

Parameters

Name Key Required Type Description
IDOC number
idocNumber True integer

The IDOC number for which to fetch the status.

Returns

Result for get status for IDOC operation.

[IDOC] Send document to SAP

Sends IDOC message to SAP.

Parameters

Name Key Required Type Description
Parameters list
dynamicParameters True dynamic

Dynamic input parameters depending on the IDOC format.

IDOC format
idocFormat string

The format of the IDOC payload: XML, Flat File or Json.

Confirm TID
confirmTid boolean

Confirm the Transaction Id automatically, 'true' or 'false'.

Transaction Id GUID
tid string

The optional Transaction Id GUID as a string. If none is provided, a new GUID will be generated.

Returns

Result for Send IDOC operation.

[IDOC] Send document to SAP (deprecated) (Preview)

Sends IDOC message to SAP (deprecated).

Parameters

Name Key Required Type Description
IDOC type with optional extension
idocType True string

The IDOC (basic) type, such as 'DELVRY01', and the optional IDOC type extension (enhancement or CIM type).

SAP release version
releaseVersion string

The SAP release version, e.g. 720. If none is provided, the current system version will be selected.

Record types version
recordTypesVersion string

The IDOC record types version, '2' or '3'.

Confirm TID
confirmTid boolean

Confirm the Transaction Id automatically, 'true' or 'false'.

Transaction Id GUID
tid string

The optional Transaction Id GUID as a string. If none is provided, a new GUID will be generated.

Input IDOC message
body True binary

Input IDOC message to SAP or URI to storage blob containing the IDOC message.

Content-Type
Content-Type string

Specify content-type of the request payload.

Returns

Result for Send IDOC operation.

[RFC] Add RFC to transaction (Preview)

Adds an RFC call to a transaction identified by tId and-or queue name, creating a new transaction if none exists.

Parameters

Name Key Required Type Description
RFC name
rfcName True string

The RFC to be called, e.g. 'STFC_CONNECTION'.

RFC Group filter
rfcGroupFilter string

The optional RFC group filter, such as 'STFC', to filter the RFCs.

Auto commit
autoCommit boolean

Automatically commits the RFC transaction if adding the RFC to the transaction has no error.

Transaction Id
tId string

The transaction Id formatted as either GUID or 24-character string.

Queue name
queueName string

The queue name for qRFC.

Input RFC parameters
body True binary

Input RFC parameters to call SAP or URI to storage blob containing the RFC parameters.

Content-Type
Content-Type string

Specify content-type of the request payload.

Returns

RFC transaction details

[RFC] Call function in SAP (Preview)

Calls an sRFC, tRFC or qRFC on the SAP system.

Parameters

Name Key Required Type Description
RFC name
rfcName True string

The RFC to be called, e.g. 'STFC_CONNECTION'.

RFC Group filter
rfcGroupFilter string

The optional RFC group filter, such as 'STFC', to filter the RFCs.

Auto commit
autoCommit boolean

Automatically commits the RFC transaction if adding the qRFC/tRFC to the transaction has no error. Auto-commit only takes effect if either {tId} or {queueName} is provided.

Session Id
sessionId string

The optional stateful session Id as a string for stateful RFC. If no session Id is provided, the call is made on a stateless connection.

Transaction Id
tId string

The optional transaction Id formatted as either GUID or 24-character string for tRFC and qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Queue name
queueName string

The optional stateful queue name for qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Input RFC parameters
body True binary

Input RFC parameters to call SAP or URI to storage blob containing the RFC parameters.

Content-Type
Content-Type string

Specify content-type of the request payload.

Returns

Result for Call RFC operation

[RFC] Call function in SAP (V2) [DEPRECATED]

Calls an sRFC, tRFC or qRFC on the SAP system.

Parameters

Name Key Required Type Description
RFC name
rfcName True string

The RFC to be called, e.g. 'STFC_CONNECTION'.

SAP function input
rfcInputs True dynamic

The SAP function inputs.

RFC Group filter
rfcGroupFilter string

The optional RFC group filter, such as 'STFC', to filter the RFCs.

Auto commit
autoCommit boolean

Automatically commits the RFC transaction if adding the qRFC/tRFC to the transaction has no error. Auto-commit only takes effect if either {tId} or {queueName} is provided.

Session Id
sessionId string

The optional stateful session Id as a string for stateful RFC. If no session Id is provided, the call is made on a stateless connection.

Transaction Id
tId string

The optional transaction Id formatted as either GUID or 24-character string for tRFC and qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Queue name
queueName string

The optional stateful queue name for qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Input format
inputFormat string

The input format (XML or JSON) - When JSON is chosen, the schema is generated and supplied to the designer.

Return format
returnFormat string

The output format (XML or JSON) - When JSON is chosen, the schema is generated and supplied to the designer.

Returns

The outputs of this operation are dynamic.

[RFC] Call function in SAP (V3) (Preview)

Calls an sRFC, tRFC or qRFC on the SAP system in a culturually-independent manner.

Parameters

Name Key Required Type Description
RFC name
rfcName True string

The RFC to be called, e.g. 'STFC_CONNECTION'.

SAP function input
rfcInputs True dynamic

The SAP function inputs.

RFC Group filter
rfcGroupFilter string

The optional RFC group filter, such as 'STFC', to filter the RFCs.

Auto commit
autoCommit boolean

Automatically commits the RFC transaction if adding the qRFC/tRFC to the transaction has no error. Auto-commit only takes effect if either {tId} or {queueName} is provided.

Session Id
sessionId string

The optional stateful session Id as a string for stateful RFC. If no session Id is provided, the call is made on a stateless connection.

Transaction Id
tId string

The optional transaction Id formatted as either GUID or 24-character string for tRFC and qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Queue name
queueName string

The optional stateful queue name for qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Input format
inputFormat string

The input format (XML or JSON) - When JSON is chosen, the schema is generated and supplied to the designer.

Return format
returnFormat string

The output format (XML or JSON) - When JSON is chosen, the schema is generated and supplied to the designer.

Returns

The outputs of this operation are dynamic.

[RFC] Call long-running function in SAP (Preview)

Calls a long-running sRFC on the SAP system and waits for the system to respond back.

Parameters

Name Key Required Type Description
RFC name
RfcName True string

The RFC to be called, e.g. 'STFC_CONNECTION'

Input RFC parameters (inline)
Payload string

Input RFC parameters to call SAP

Input RFC parameters (reference)
PayloadReference string

URI to storage blob containing the RFC parameters

RFC Group filter
RfcGroupFilter string

The optional RFC group filter, such as 'STFC', to filter the RFCs

Auto commit
AutoCommit boolean

Automatically commits the RFC transaction if adding the qRFC/tRFC to the transaction has no error. Auto-commit only takes effect if either transaction Id or queue name is provided.

Queue name
QueueName string

The optional stateful queue name for qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Session Id
sessionId string

The optional stateful session Id as a string for stateful RFC. If no session Id is provided, the call is made on a stateless connection.

Transaction Id
tId string

The optional transaction Id formatted as either GUID or 24-character string for tRFC and qRFC. If no transaction Id and no queue name are provided, the call is made synchronously (sRFC).

Returns

Result for Call RFC operation

[RFC] Commit transaction (Preview)

Commits the RFC transaction for the given session and-or queue.

Parameters

Name Key Required Type Description
Transaction Id
tId string

The transaction Id formatted as either GUID or 24-character string.

Queue name
queueName string

The stateful queue name.

Returns

response
object

[RFC] Create transaction

Creates a new transaction if none exists, using the provided transaction Id and-or queue name. If the transaction exists, gets the details of the existing transaction. The transaction Id can be provided in either GUID or 24-character string format.

Parameters

Name Key Required Type Description
Transaction Id
tId string

The transaction Id formatted as either GUID or 24-character string.

Queue name
queueName string

The queue name for qRFC.

Returns

RFC transaction details

[RFC] Get transaction

Gets the details of a transaction identified by transaction Id and-or queue name, creating a new transaction if none exists. The transaction Id can be provided in either GUID or 24-character string format. Both the queue name and the transaction Id must be provided to find an existing qRFC transaction.

Parameters

Name Key Required Type Description
Transaction Id
tId string

The transaction Id formatted as either GUID or 24-character string.

Queue name
queueName string

The queue name for qRFC.

Returns

RFC transaction details

Generate schemas

Generates XML schemas for the provided SAP action or URI.

Parameters

Name Key Required Type Description
sapActionUris
sapActionUris True array of string
File name prefix
fileNamePrefix string

Prefix for the schema file names.

Returns

Generate Schemas Response

Read SAP table (obsolete) [DEPRECATED]

This action requires that the user has access to 'BBP_RFC_READ_TABLE' or 'RFC_READ_TABLE' RFC.

Parameters

Name Key Required Type Description
Table name
tableName True string

The name of the SAP table to read.

Fields to read
fieldNames array

The field to read - obsolete, use action version 2 instead.

Where filters
whereFilters array

The where filter clause - obsolete, use action version 2 instead.

Starting row index
startIndex integer

Starting row index, e.g. 0.

Count of rows to read
rowCount integer

The count of rows to read, e.g. 10. Use 0 if you only want to get the fields metadata.

Field delimiter
delimiter string

The optional delimiter to insert between row fields data.

Returns

Result for Read Table operation.

Read SAP table (Preview)

This action requires that the user has access to 'BBP_RFC_READ_TABLE' or 'RFC_READ_TABLE' RFC.

Parameters

Name Key Required Type Description
Table name
tableName True string

The name of the SAP table to read

Fields to read
FieldNames array of string

The list of fields to read

Where filters
WhereFilters array of string

The list of where filter clauses, e.g. "MTART = 'ROH' AND MEINS = 'PAK'"

Starting row index
StartIndex integer

Starting row index, e.g. 0

Count of rows to read
RowCount integer

The count of rows to read, e.g. 10

Field delimiter
Delimiter string

The optional delimiter to insert between row fields data

Returns

Result for Read Table operation.

Send message to SAP

Sends any message type RFC, BAPI, IDOC to SAP.

Parameters

Name Key Required Type Description
SAP Action
sapAction True string

SAP Action.

Input Message
body True binary

Input Message to SAP or URI to storage blob containing the message.

Content-Type
Content-Type string

Specify content-type of the request payload.

Returns

response
object

Triggers

When a message is received

When a message is received from SAP.

When a message is received

When a message is received from SAP.

Parameters

Name Key Required Type Description
GatewayHost
gatewayHost True string

SAP RFC server registration gateway host.

GatewayService
gatewayService True string

SAP RFC server registration gateway service.

ProgramId
programId True string

SAP RFC server registration gateway program id.

SapActions
SapActions array of string

SAP actions filter list for which the registration would be listening to

IDOC Format
IdocFormat string

Format in which to receive IDOCs

Receive IDOCs with unreleased segments
ReceiveIdocsWithUnreleasedSegments boolean

Whether to receive IDOCs with unreleased segments or not

SncPartnerNames
sncPartnerNames string

A vertical bar (|) separated list of SNC partner names.

DegreeOfParallelism
degreeOfParallelism integer

How many calls to process in parallel.

Returns

Listener request

Definitions

BapiRet2

SAP BAPI return structure version 2 aka BAPIRET2

Name Path Type Description
Type
Type string

Message type

Id
Id string

Message Class

Number
Number string

Message Number

Message
Message string

Message Text

LogNumber
LogNumber string

Application log: log number

LogMessageNumber
LogMessageNumber string

Application log: Internal message serial number

MessageVariable1
MessageVariable1 string

Message Variable 1

MessageVariable2
MessageVariable2 string

Message Variable 2

MessageVariable3
MessageVariable3 string

Message Variable 3

MessageVariable4
MessageVariable4 string

Message Variable 4

Parameter
Parameter string

Parameter Name

Row
Row integer

Lines in parameter

Field
Field string

Field in parameter

System
System string

Logical system from which message originates

CallBapiResponse

Result for Call BAPI operation

Name Path Type Description
BapiReturn
BapiReturn BapiRet2

SAP BAPI return structure version 2 aka BAPIRET2

BAPI Returns
BapiReturns array of BapiRet2

BAPI return structures

XML Response
XmlResponse string

XML Response to the BAPI call

JsonResponse
JsonResponse Object

CallRfcResponse

Result for Call RFC operation

Name Path Type Description
XML Response
XmlResponse string

XML Response to the RFC call

JsonResponse
JsonResponse Object

CreateSessionResponse

Result for Create Session operation.

Name Path Type Description
Session Id
SessionId string

Id for the stateful session.

FieldMetadata

Field metadata

Name Path Type Description
Field name
Name string

Field name

Field offset
Offset integer

Field start offset

Field length
Length integer

Field length

ABAP data type
AbapDataType string

Field ABAP data type

Field description
Description string

Field description

IdocNumbersList

List of IDOC numbers.

Name Path Type Description
IDOC numbers
IdocNumbers array of integer

List of IDOC numbers

IdocStatusResponse

Result for get status for IDOC operation.

Name Path Type Description
IDOC status code
IdocStatus integer

IDOC status code

ListenerRequest

Listener request

Name Path Type Description
ActionUri
ActionUri string

Action URI

Content
Content string

Content

Object

ReadTableResponse

Result for Read Table operation.

Name Path Type Description
XML Response
XmlResponse string

XML Response to the Read Table RFC call

Fields metadata
FieldsMetadata array of FieldMetadata

Fields metadata

Rows
Rows array of string

Rows

RfcTransactionDetails

RFC transaction details

Name Path Type Description
The names of the RFCs in the transaction
RfcNames array of string

The names of the RFCs in the transaction

The Transaction Identifier (TID)
TId string

The Transaction Identifier (TID)

The GUID form of the Transaction Identifier (TID)
Guid string

The GUID form of the Transaction Identifier (TID)

The queue name
QueueName string

The queue name if it is a qRFC transaction, otherwise null

SapConnectorGenerateSchemasResponse

Generate Schemas Response

Name Path Type Description
Schemas
Schemas array of SapConnectorSchema

The list of generated schemas.

SapConnectorSchema

SAP schema

Name Path Type Description
Name
Name string

The schema name

Content
Content byte

The base-64 encoded schema content

SendIdocResponse

Result for Send IDOC operation.

Name Path Type Description
Transaction Id
TransactionID string

Transaction Id GUID for the IDOC tRFC.

object

This is the type 'object'.