Show TOC

Object documentationThe Class JCO.Field Locate this document in the navigation structure


Fields can occur in different contexts: Structures and table rows contain fields, and scalar parameters are fields. The previous sections describe how each class supports methods for accessing or changing the content of a field. Because fields in different contexts have some common features, SAP JCo provides the JCO.Field class, which enables generic editing of fields.

The classes JCO.Structure, JCO.Table and JCO.ParameterList all contain a getField() method for accessing a field. The JCO.Field class itself contains all the getter and setter methods described earlier. This level of abstraction can be very useful if you want to create generic methods for editing fields, irrespective of the origin of the fields. A field of the class JCO.Field has metadata such as

  • Name (method getName())

  • Description (method getDescription())

  • Data type (method getType())

  • Length (method getLength()), and

  • Number of decimal places (method getDecimals())

A field can also contain extended metadata that you can access using method getExtendedFieldMetaData() .