Skip to Content
avatar image
Former Member

SAP JCo – Method JCoMetaData.getLength() does not returns the real length given in the data element

I have a question about the method getLength(String fieldname) or getLength(int index) in JCoMetaData (release e.g. 3.0.17).

According to API it should return the max length of the given data field.

If I use this method on a field of type BCD (TYPE_BCD) the result always differs from the length given in the dictionary data element. It seems always: result = <real length> / 2 + 1


Field DSCT_PCT1 in Table ACCOUNTRECEIVABLE, Length: 5, decimal places: 3

But jcoMetaData.getLength("DSCT_PCT1") returns 3. Why not 5?

What shoud I do to get always the real length of such fields?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers