Datatype Support

Unwired WorkSpace supports a variety of datatypes, from a simple type to an array of objects.

Mobile business object (MBO) attributes and parameter datatypes map to data source datatypes. Select the datatype of a given parameter or attribute from the datatype drop-down list, which maps to the data source's datatype. You define attribute and parameter datatypes in a number of Unwired WorkSpace locations, depending on the MBO development phase, including:
  • Creating MBOs – when creating MBO operations and attributes in these locations:
    • Attributes Mapping wizard
    • Operation Parameters page (when deferring binding to a data source)
    • Attributes page (when deferring binding to a data source)
  • Editing MBOs – when editing MBO attributes and parameters from the Properties view in these locations:
    • Parameters tab
    • Load Parameters tab
    • Attributes tab
    • Syncrhonization tab (for synchronization parameters)
    • Object Queries tab and Object Query creation wizard
  • Testing MBOs – use the Test Execute and Preview dialogs for testing mobile business object operations or previewing attributes.
  • Creating and editing personalization keys – holds the personalization parameters and supports the same datatypes as MBO attributes and parameters.

Since attributes and parameters depend on the data source to which the MBO maps, not all attributes and parameters support all datatypes. Generally, if a datatype does not display in the drop-down list, it is not supported for that MBO.

When defining the default value for a parameter with the maxlength setting, the maximum length also applies to any localized (i18n) values (Including some double-byte character languages, such as Chinese).

Unwired WorkSpace supports various categories of datatypes.
Datatype categories
Category Description
Simple int, string, date, and so on.
List of simple types an array of simple types: int[], string[], date[], and so on.
Object (complex) Implemented with a structure, and includes:
  • SAP input structure or input table
  • Nested complex types in Web Services that handle type structures as input (repeating and nested elements)
Note: Parameters, personalization keys, and default values all support complex types. Attributes do not, except for those that represent relationships.
List of object types an array of objects: customer[], account[], and so on.
Simple datatype description
Datatype Description
binary, binary (%n) Select either:
  • Input manually – enter a base64 encoded string directly in the input field.
  • Import from file – browse to a file from which the input string is retrieved.
If you are choosing a binary datatype, you can set the length if you require something other than the default set in the Miscellaneous Preferences dialog. To set the length, click the cell you require in the datatype column and select binary(%n). Press enter and then type the size you require. For example, you could:
  1. Click the particular cell in the datatype column, and select binary(%n) from the list of datatypes.
  2. Enter the value for the binary length by highlighting %n with your cursor, and replacing it with the size you require.
  3. Press enter to set the binary length. For example, if you entered 10 as the binary length, you see binary(10) in the datatype cell.
Note: The maximum allowable length for binary datatypes is 2G bytes. If the MBO's attribute is a primary key, the maximum allowable length for binary datatypes is 2048 bytes. For MBO parameters, binary default value cannot exceed 16384 bytes.
date Select the day in the provided calendar. By default the local time zone is selected. The Time zone field is read only.
dateTime By default the current date, time and time zone display in the calendar.
time Enter the time, and enter the local time zone in the Time zone field.
string, string(%n) If you are choosing a string datatype, you can set the length of the string if you require something other than the default set in the Preferences dialog. To set the length, click the cell you require in the datatype column and select string(%n). Press enter and then type the size you require. For example, you could:
  1. Click the particular cell in the datatype column, and select string(%n) from the list of datatypes.
  2. Enter the value for the string length by highlighting %n with your cursor, and replacing it with the size you require.
  3. Press enter to set the string length. For example, if you entered 10 as the string length, you see string(10) in the datatype cell.
Note: The maximum allowable length for string datatypes is 2G bytes. If the MBO's attribute is a primary key, the maximum allowable length is 512 bytes.
All others Enter the appropriate value in the Value field.
Related tasks
Creating Attributes for a Mobile Business Object
Creating Operations for a Mobile Business Object
Creating the Mobile Business Object using the Mobile Business Object Icon
Previewing Mobile Business Objects
Defining Synchronization Properties for Individual Mobile Business Objects
Adding a Load Parameter to a Mobile Business Object