4. Optional XML prolog
This is optional and the SAP Connector will work with or without it.
The SAP .NET Connector library on which the connector is built is Unicode native. Do send XML
documents encoded with UTF-8.
Read more about the prolog here:
https://www.w3schools.com/xml/xml_syntax.asp
6. Hello world RFC call
RFC name
Namespace for all RFCs.
This example uses default
namespace (xmlns=…). You can
also assign and use namespace
aliases (xmlns:aliasXyz=…).
Simple input parameter
7. RFC with table parameter
This test RFC and its group of test RFCs
are available out of the box in any SAP
system.
The table parameter name
(TCPICDAT).
This specific row type contains a
single field named LINE. Table line
types may contain n fields.
The table line type is ABAPTEXT.
This element repeats for each row
in the table.
8. Table with anonymous field
This line type structure contains a single
anonymous field (i.e. the field has no
name assigned).
Character for hex code 002F is
reserved in SAP field name and
used here as escape character.
Note that complex types are
declared under separate
namespace. This new XML
namespace declaration set a
new default for the current
node and all its child elements.
9. Namespaces prefixes sample
All prefixes can be declared at once or any
amount of prefix may be declared as
attribute to any node.
‘RFC’ namespace is used for the
root and parameters of basic
type.
Note that complex types are
declared under separate
namespace ‘RFC types’.
12. Get list of Banks
<GETLIST
xmlns="http://Microsoft.LobServices.Sap/2007/03/Ba
pi/BUS1011/">
<BANK_CTRY>US</BANK_CTRY>
<MAX_ROWS>10</MAX_ROWS>
</GETLIST>
The BAPI method ‘Get list’.
When an object is selected in the designer,
the set of available methods is provided as
simple drop-down in the Logic App
designer.
The business object for bank (BUS1011).
The Call BAPI API on SAP connector
provides a searchable list in the Azure
Logic Apps Designer. Typing ‘bank’
keyword will filter to all business object
types for bank including this BUS1011.
Limits the number of items in the response
13. Create a Bank object
<CREATE
xmlns="http://Microsoft.LobServices.Sap/2007/03/Ba
pi/BUS1011/">
<BANK_ADDRESS>
<BANK_NAME
xmlns="http://Microsoft.LobServices.Sap/2007/03/Ty
pes/Rfc/">VERIZON BANK</BANK_NAME>
<REGION
xmlns="http://Microsoft.LobServices.Sap/2007/03/Ty
pes/Rfc/"></REGION>
<STREET
xmlns="http://Microsoft.LobServices.Sap/2007/03/Ty
pes/Rfc/">15</STREET>
<CITY
xmlns="http://Microsoft.LobServices.Sap/2007/03/Ty
pes/Rfc/">JODHPUR</CITY>
</BANK_ADDRESS>
<BANK_CTRY>US</BANK_CTRY>
<BANK_KEY>{0}</BANK_KEY>
</CREATE>
Create method
Same business object
Beware per system configured SAP
validation rule(s). For instance, the
key may have to be an ABA bank
identifier in the USA.
22. Root node, namespaces declarations
http://schemas.microsoft.com/2003/10/Serialization/
http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/Common/
Find detailed explanation about the IDOC URI in this blog post:
https://www.linkedin.com/pulse/logic-app-sap-connector-idoc-support-going-under-hood-david-burg/
The idocData node can be repeated to form a batch of IDOCs to send in a single call.
25. Data Record plain Segments
Data Record segment name
This sample is using SAP’s format for dates.
Strong typed documents can use native XML types,
e.g.
9999-12-31
23:59:59
More at
https://www.w3schools.com/xml/schema_dtypes_date.
asp
27. Optional IDOC transport ID for tRFC
Last Data Record segment node
closing
IDOC Data node closing
GUID will form the tRFC TID for
duplicate transport detection.
This node can be omitted.
Recommend to set the tRFC TID
instead via connector API
parameter, see:
https://docs.microsoft.com/en-
us/connectors/sap/#send-idoc