

# Representation of data in ABAP
Data representation

This section covers the following topics.

**Topics**
+ [

## Data types
](#data-types)
+ [

## AWS data types
](#aws-api)

## Data types


AWS services have a standard set of data types that must be mapped to ABAP data types. See the following table for more details.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sdk-for-sapabap/latest/developer-guide/representation.html)

AWS services also return the following aggregate data types.


| AWS data type | ABAP data type | Comments | 
| --- | --- | --- | 
| Structure | Class |  | 
| Union | Class | A union is the same as a structure, except that a union will never have more than one field set. All other fields will be set to No Value. | 
| Array | STANDARD TABLE |  | 
| Hash | HASHED TABLE | The hashed table will only have two columns: a KEY (string) and a VALUE (class).  | 

## AWS data types


The following approaches have been integrated to support AWS services in ABAP.
+ Certain AWS data types cannot be represented in ABAP. For examples, the `float` data type in ABAP does not support the `NaN`, `Infinity`, or `-Infinity` values. Therefore, the `float` data type is represented as `STRING` and is translated to `DECFLOAT16` at runtime.
+ AWS data is represented on the wire as JSON or XML, and the values are optional. For example, see the following examples returned by an AWS service in JSON.

  ```
  Fullname: {
     Firstname:  "Ana",
     Middlename: "Carolina",
     Lastname:  "Silva"
  }
  ```

  If Ana doesn't have a middle name, the service returns the following output.

  ```
  Fullname: {
     Firstname:  "Ana",
     Lastname:  "Silva"
  }
  ```

  ABAP does not distinguish between *a string of length 0* and *a string that has no value*. Other languages might assign a NULL value to the string or wrap the string in a construct (such as, Java's `Optional<>` wrapper). These are not supported in ABAP. Therefore, SDK for SAP ABAP facilitates the distinction in values by providing variants of the *getter* method.