Problem: A mobile business object (MBO) insert operation fails with a runtime exception for iOS; however, the same MBO works on Windows Mobile.
Solution: For an attribute that cannot be null, assign a value if the corresponding Property datatype in the generated MBO Objective-C code is a class (pointer).
When developing an iOS client:
- If a non-nullable attribute datatype is converted to a nonprimitive datatype (for example, class NSNumber or NSDate) in the iOS client application, verify that the corresponding property for the MBO instance is assigned a value; otherwise the application may issue a runtime exception when creating a new MBO instance.
- If an Adaptive Server Enterprise column datatype is numeric, during the MBO
creation, the datatype of the corresponding attribute is decimal and
non-nullable. In generated Objective-C MBO code, the corresponding datatype is
NSNumber. When creating a new MBO instance, assign this
property a value, otherwise the application may issue a runtime exception (its
actual value is later replaced by SAP Mobile Server).