Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
127.3. Message Body for RFC
Request and response objects 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
An SAP endpoint expects to receive a message with a message body containing an SAP request object and will return a message with a message body containing an SAP response object. SAP requests and responses are fixed map data structures containing named fields with each field having a predefined data type.
Note that the named fields in an SAP request and response are specific to an SAP endpoint, with each endpoint defining the parameters in the SAP request and response it will accept. An SAP endpoint provides factory methods to create the request and response objects that are specific to it.
Structure objects 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Both SAP request and response objects are represented in Java as a structure object which supports the
org.fusesource.camel.component.sap.model.rfc.Structure interface. This interface extends both the java.util.Map and org.eclipse.emf.ecore.EObject interfaces.
The field values in a structure object are accessed through the field’s getter methods in the map interface. In addition, the structure interface provides a type-restricted method to retrieve field values.
Structure objects are implemented in the component runtime using the Eclipse Modeling Framework (EMF) and support that framework’s
EObject interface. Instances of a structure object have attached meta-data which define and restrict the structure and contents of the map of fields it provides. This meta-data can be accessed and introspected using the standard methods provided by EMF. Please refer to the EMF documentation for further details.
Note
Attempts to get a parameter not defined on a structure object will return null. Attempts to set a parameter not defined on a structure will throw an exception as well as attempts to set the value of a parameter with an incorrect type.
As discussed in the following sections, structure objects can contain fields that contain values of the complex field types,
STRUCTURE and TABLE. Note that it is unnecessary to create instances of these types and add them to the structure. Instances of these field values are created on demand if necessary when accessed in the enclosing structure.
Field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The fields that reside within the structure object of an SAP request or response may be either elementary or complex. An elementary field contains a single scalar value, whereas a complex field will contain one or more fields of either a elementary or complex type.
Elementary field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
An elementary field may be either a character, numeric, hexadecimal or string field type. The following table summarizes the types of elementary fields that may reside in a structure object:
| Field Type | Corresponding Java Type | Byte Length | Unicode Byte Length | Number Decimals Digits | Description |
|---|---|---|---|---|---|
CHAR
|
java.lang.String
|
1 to 65535 | 1 to 65535 | - | ABAP Type ‘C’: Fixed sized character string |
DATE
|
java.util.Date
|
8 | 16 | - | ABAP Type ‘D’: Date (format: YYYYMMDD) |
BCD
|
java.math.BigDecimal
|
1 to 16 | 1 to 16 | 0 to 14 | ABAP Type ‘P’: Packed BCD number. A BCD number contains two digits per byte. |
TIME
|
java.util.Date
|
6 | 12 | - | ABAP Type ‘T’: Time (format: HHMMSS) |
BYTE
|
byte[]
|
1 to 65535 | 1 to 65535 | - | ABAP Type ‘X’:Fixed sized byte array |
NUM
|
java.lang.String
|
1 to 65535 | 1 to 65535 | - | ABAP Type ‘N’: Fixed sized numeric character string |
FLOAT
|
java.lang.Double
|
8 | 8 | 0 to 15 | ABAP Type ‘F’: Floating point number |
INT
|
java.lang.Integer
|
4 | 4 | - | ABAP Type ‘I’: 4-byte Integer |
INT2
|
java.lang.Integer
|
2 | 2 | - | ABAP Type ‘S’: 2-byte Integer |
INT1
|
java.lang.Integer
|
1 | 1 | - | ABAP Type ‘B’: 1-byte Integer |
DECF16
|
java.match.BigDecimal
|
8 | 8 | 16 | ABAP Type ‘decfloat16’: 8 -byte Decimal Floating Point Number |
DECF34
|
java.math.BigDecimal
|
16 | 16 | 34 | ABAP Type ‘decfloat34’: 16-byte Decimal Floating Point Number |
STRING
|
java.lang.String
|
8 | 8 | - | ABAP Type ‘G’: Variable length character string |
XSTRING
|
byte[]
|
8 | 8 | - | ABAP Type ‘Y’: Variable length byte array |
Character field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A character field contains a fixed sized character string that may use either a non-Unicode or Unicode character encoding in the underlying JCo and ABAP runtimes. Non-Unicode character strings encode one character per byte. Unicode characters strings are encoded in two bytes using UTF-16 encoding. Character field values are represented in Java as
java.lang.String objects and the underlying JCo runtime is responsible for the conversion to their ABAP representation.
A character field declares its field length in its associated
byteLength and unicodeByteLength properties, which determine the length of the field’s character string in each encoding system.
CHAR- A
CHARcharacter field is a text field containing alphanumeric characters and corresponds to the ABAP type C. NUM- A
NUMcharacter field is a numeric text field containing numeric characters only and corresponds to the ABAP type N. DATE- A
DATEcharacter field is an 8 character date field with the year, month and day formatted asYYYYMMDDand corresponds to the ABAP type D. TIME- A
TIMEcharacter field is a 6 character time field with the hours, minutes and seconds formatted asHHMMSSand corresponds to the ABAP type T.
Numeric field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A numeric field contains a number. The following numeric field types are supported:
INT- An
INTnumeric field is an integer field stored as a 4-byte integer value in the underlying JCo and ABAP runtimes and corresponds to the ABAP type I. AnINTfield value is represented in Java as ajava.lang.Integerobject. INT2- An
INT2numeric field is an integer field stored as a 2-byte integer value in the underlying JCo and ABAP runtimes and corresponds to the ABAP type S. AnINT2field value is represented in Java as ajava.lang.Integerobject. INT1- An
INT1field is an integer field stored as a 1-byte integer value in the underlying JCo and ABAP runtimes value and corresponds to the ABAP type B. AnINT1field value is represented in Java as ajava.lang.Integerobject. FLOAT- A
FLOATfield is a binary floating point number field stored as an 8-byte double value in the underlying JCo and ABAP runtimes and corresponds to the ABAP type F. AFLOATfield declares the number of decimal digits that the field’s value contains in its associated decimal property. In the case of aFLOATfield, this decimal property can have a value between 1 and 15 digits. AFLOATfield value is represented in Java as ajava.lang.Doubleobject. BCD- A
BCDfield is a binary coded decimal field stored as a 1 to 16 byte packed number in the underlying JCo and ABAP runtimes and corresponds to the ABAP type P. A packed number stores two decimal digits per byte. ABCDfield declares its field length in its associatedbyteLengthandunicodeByteLengthproperties. In the case of aBCDfield, these properties can have a value between 1 and 16 bytes and both properties will have the same value. ABCDfield declares the number of decimal digits that the field’s value contains in its associated decimal property. In the case of aBCDfield, this decimal property can have a value between 1 and 14 digits. ABCDfield value is represented in Java as ajava.math.BigDecimal. DECF16- A
DECF16field is a decimal floating point stored as an 8-byte IEEE 754 decimal64 floating point value in the underlying JCo and ABAP runtimes and corresponds to the ABAP typedecfloat16. The value of aDECF16field has 16 decimal digits. The value of aDECF16field is represented in Java asjava.math.BigDecimal. DECF34- A
DECF34field is a decimal floating point stored as a 16-byte IEEE 754 decimal128 floating point value in the underlying JCo and ABAP runtimes and corresponds to the ABAP typedecfloat34. The value of aDECF34field has 34 decimal digits. The value of aDECF34field is represented in Java asjava.math.BigDecimal.
Hexadecimal field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A hexadecimal field contains raw binary data. The following hexadecimal field types are supported:
BYTE- A
BYTEfield is a fixed sized byte string stored as a byte array in the underlying JCo and ABAP runtimes and corresponds to the ABAP type X. ABYTEfield declares its field length in its associatedbyteLengthandunicodeByteLengthproperties. In the case of aBYTEfield, these properties can have a value between 1 and 65535 bytes and both properties will have the same value. The value of aBYTEfield is represented in Java as abyte[]object.
String field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A string field references a variable length string value. The length of that string value is not fixed until runtime. The storage for the string value is dynamically created in the underlying JCo and ABAP runtimes. The storage for the string field itself is fixed and contains only a string header.
STRING- A
STRINGfield refers to a character string and is stored in the underlying JCo and ABAP runtimes as an 8-byte value. It corresponds to the ABAP type G. The value of theSTRINGfield is represented in Java as ajava.lang.Stringobject. XSTRING- An
XSTRINGfield refers to a byte string and is stored in the underlying JCo and ABAP runtimes as an 8-byte value. It corresponds to the ABAP type Y. The value of theSTRINGfield is represented in Java as abyte[]object.
Complex field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A complex field may be either a structure or table field type. The following table summarizes these complex field types.
| Field Type | Corresponding Java Type | Byte Length | Unicode Byte Length | Number Decimals Digits | Description |
|---|---|---|---|---|---|
STRUCTURE
|
org.fusesource.camel.component.sap.model.rfc.Structure
|
Total of individual field byte lengths | Total of individual field Unicode byte lengths | - | ABAP Type ‘u’ & ‘v’: Heterogeneous Structure |
TABLE
|
org.fusesource.camel.component.sap.model.rfc.Table
|
Byte length of row structure | Unicode byte length of row structure | - | ABAP Type ‘h’: Table |
Structure field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A
STRUCTURE field contains a structure object and is stored in the underlying JCo and ABAP runtimes as an ABAP structure record. It corresponds to either an ABAP type u or v. The value of a STRUCTURE field is represented in Java as a structure object with the interface org.fusesource.camel.component.sap.model.rfc.Structure.
Table field types 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A
TABLE field contains a table object and is stored in the underlying JCo and ABAP runtimes as an ABAP internal table. It corresponds to the ABAP type h. The value of the field is represented in Java by a table object with the interface org.fusesource.camel.component.sap.model.rfc.Table.
Table objects 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
A table object is a homogeneous list data structure containing rows of structure objects with the same structure. This interface extends both the
java.util.List and org.eclipse.emf.ecore.EObject interfaces.
The list of rows in a table object are accessed and managed using the standard methods defined in the list interface. In addition the table interface provides two factory methods for creating and adding structure objects to the row list.
Table objects are implemented in the component runtime using the Eclipse Modeling Framework (EMF) and support that framework’s EObject interface. Instances of a table object have attached meta-data which define and restrict the structure and contents of the rows it provides. This meta-data can be accessed and introspected using the standard methods provided by EMF. Please refer to the EMF documentation for further details.
Note
Attempts to add or set a row structure value of the wrong type will throw an exception.