Start of Content Area

Object documentation The Class JCO.Field Locate the document in its SAP Library structure

Definition

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 class JCO.Field , 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 class JCO.Field  itself contains all the getter and setter methods described in previous sections. This level of abstraction can be very useful if you want to create generic methods for editing fields, independently 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, which you can access using the method getExtendedFieldMetaData().

 

 

 

End of Content Area