• No results found

Parameter and Argument Validation Rules and Error Messages

These validation rules and error messages apply to mobile business object parameters and arguments, and are enforced during MBO development, and, in some cases, when you deploy the MBO to SAP Mobile Server. Messages are generated when validation rules are violated.

Table 11. Parameter and argument validation rules and error messages Severity and

The parameter name is invalid. Enter a valid name.

Error: Invalid parame-ter name: '<Para Name>', name cannot be a Java or C# lan-guage.

The parameter name is a Java or C# key-word, such as binary, boolean, byte, char, date, datetime, time, decimal, double, float, object, int, integer, long, short, string, switch, and so on.

Do not use Java or C# keywords as parameter names.

Error: Invalid parame-ter name: '<Para Name>', the length must be less than 100.

The length of the parameter name is longer than 100 characters.

Shorten the parameter name to less than 100 characters.

A default value is not specified for the op-eration's parameter, which may result in a runtime operation failure.

Specify a default value for the ar-gument.

Error: Attribute '<Attr Name>' cannot be map-ped to more than one parameter.

An attribute has more than one Propagate to mapping.

Remove additional mappings.

Severity and mes-sage

Cause Action

Error: The data type of the parameter '<Para Name>' can not map to the data type of the ar-gument.

The datatype of the parameter and the data-type of the argument do not match.

Change the datatype of the param-eter to match that of the argument.

Or change the type of the argument if it is not read-only.

Note: Make sure the argument type matches that of the data source for JDBC data sources.

Warning: Parameter '<Para Name>' should not be nullable when it is mapped to a non-nul-lable argument.

The nullability of the parameter does not match that of the argument. For a non-nul-lable argument, the mapping parameter should also be non-nullable.

Change the parameter to non-nul-lable.

Error: Data type of the bound personalization key cannot map to the parameter: ‘<Para Name>‘.

Datatype mismatch. Change the datatype of the param-eter or the datatype of the person-alization key so they match.

Warning: Parameter da-ta length is shorter than the bound personaliza-tion key’s data length, value truncation might occur: ‘<Para Name>‘.

The length of the datatypes do not match. Change the length of the parameter or that of the personalization key so they match.

A non- nullable parameter is mapped to a nullable personalization key.

Change the nullability of the pa-rameter or that of the personaliza-tion key.

Warning: The maxi-mum length of the op-eration parameter is dif-ferent from the fill from attribute’s: ‘<Para Name>’.

The datatype lengths do not match. At run-time, when the attribute passes its value to the parameter, the value may be truncated.

Change the datatype length so they match.

Severity and

The default value is too long. Shorten the default value.

Error: Synchronization parameter ‘<Sync Para Name>’ cannot be mapped to more than one argument.

Two or more arguments map to the same synchronization parameter.

Change the mapping so only one argument maps to the synchroniza-tion parameter.

Error: Data type of the selected old value argu-ment cannot map to the parameter ‘<Para Name>’ of operation

‘<Oper Name>’.

Datatype mismatch. Change the datatype of the Old

value argument or that of the pa-rameter so they match.

The argument length exceeds the maximum length allowed for its datatype.

Shorten the argument length to a valid length for the given type ac-cording to the message.

The argument default value is not valid for its datatype.

Change the default value to con-form to the argument’s datatype.

Warning: Default value exceeds maximum length: ‘<Arg Length>‘.

The argument default value length exceeds the argument’s length.

Change the default value to con-form to the argument’s length.

Warning: Non-nullable

A non-nullable argument is mapped to a nullable personalization key.

Change the nullability of the argu-ment or the personalization key so they match.

Severity and mes-sage

Cause Action

Error: Invalid < object type > name: name can-not be empty.

The <object type> name cannot be empty. Enter a valid value for the name of the <object type>.

Warning: Personaliza-tion key ''{0}'' with stor-age type ''{1}'' assigned to load argument: ''{2}'' will not be used be-cause the mobile busi-ness object has a DCN cache policy.

Do not use transient personalization keys assigned to load arguments if the MBO uses a DCN cache group policy.

Remove the Personalization Key mapping for the argument from the load arguments tab in the MBO Property view.

Error: If client parame-ter's data type is big-String/bigBinary or a structure type with big-String/bigBinary attrib-utes, show as an error like "Structure '' <

Structure name > '' con-tains field '' < attribute name > '' with data type '' < BigString/BigBina-ry > '', and cannot be used as a client param-eter '' < client paramparam-eter name > .''

An error message displays if you generate a client parameter and use a structure that contains BigString/BigBinary field(s).

To provide client parameters for BigString/BigBinary datatypes, or a structure with BigString/BigBi-nary fields, use compatible types:

String for BigString, Binary for BigBinary. For a structure, copy the original structure in WorkSpace Navigator, and change the large object type fields to String/Binary, then use the new structure as the datatype of the client parameter.

Error: Personalization key can’t be directly as-signed to load argu-ment: ‘<Arg Name>‘ of mobile business object which has a scheduled cache policy.

Do not use reserved parameters as an attrib-ute name: count_bad_playback,

Bound to a wrong personalization key. Redefine the personalization key or remove the mapping.

Severity and mes-sage

Cause Action

Warning: Argument

‘<Arg Name>’ should not be bound to person-alization key ‘<PK Name>’ whose default value is set to ‘<value>’

when its ‘Propagate to’

attribute ‘<Attr Name>’ is a primary key.

A nullable personalization key is mapped to a non-nullable parameter.

Change the nullability of the pa-rameter or that of the personaliza-tion key so they match.

Warning: Non-nullable

The length of datatypes do not match. When the parameter passes the value to the argu-ment, the value might be truncated.

Change the datatype length so they match.

Warning: Argument da-ta length is shorter than the ‘Parameter’ length, value truncation might occur: ‘<Para Name>’.

The length of datatypes do not match. When the argument value is passed to the propa-gated attribute, the value might be truncated.

Change the datatype length so they match.

Warning: Argument da-ta length is larger than that of the attribute it propagates to, value truncation might occur:

‘<Argument Name>’.

The datatype length of the operation argu-ment is shorter than its ‘fill from attribute’

datatype length, and the value might be trun-cated.

Change the datatype length so they match.

Warning: Argument da-ta length is shorter than the <length> length, value truncation might occur: ''<Operation name>''.

Only ‘UPDATE’ type operations support old value arguments.

Check the definition of the opera-tion, this might be an ‘UPDATE’

type operation.

Error: Operation ‘<Op-er Name>’ does not support old value argu-ment.

An argument can not be used both as an ar-gument and as an ‘Old Value Arar-gument’.

Change mapping of argument or the ‘Old Value Argument’.

Severity and mes-sage

Cause Action

Warning: ‘Old Value Argument’ and ‘Argu-ment’ cannot be the for the operation ‘<Oper Name>’.

Need to specify the ‘Fill from attribute’, be-fore the ‘old Value Argument’ can take ef-fect.

Specify the ‘Fill from Attribute’.

Warning: The old value

has no ‘Fill from attrib-ute’.

The client parameter of the operation has no mapping argument.

Specify the argument to map to the client parameter.

Warning: No argument is mapped to client pa-rameter ‘<Para Name>’.

The nullability between personalization key and parameter is inconsistent.

Unify the nullability between per-sonalization key and parameter.

Error: The nullability of the bound personaliza-tion key ‘<personaliza-tion key name>’ is not consistent with param-eter ‘<paramparam-eter name>’.

Null is set as the default value for a non-nul-lable argument.

Provide a valid default value for the argument.

Error: The default value of a non-nullable argu-ment should not be set to ''<NULL>'': ''<Arg Name>''.

Set null as default value for a non-nullable synchronization parameter.

Provide a valid default value for the synchronization parameter.

The mapped-to attribute of a parameter has string/binary type but does not have a length set, which may cause the query to fail since BLOB/CLOB filtering is currently unsup-ported.

Explicitly set the length for the at-tribute with type of string/binary.