Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP datatype with 8 or 9 decimals

Former Member
0 Kudos

Hello,

I need to add a field in an IDOC segment which should have a type of 8-9 decimals.

Please help me in case anybody is aware of any SAP standard data element.

Thanks,

Abhijit

1 ACCEPTED SOLUTION

former_member226519
Active Contributor
0 Kudos

DEC_16_09_S for one

5 REPLIES 5

former_member226519
Active Contributor
0 Kudos

DEC_16_09_S for one

0 Kudos

Thank You very much Volker Binder. It solved the issue.

Former Member

In an IDOC segment there should only CHAR-fields be used (as far as I know)

0 Kudos

Yes correct. To be more specific. I think you are referring to the structure of the segment which is always char.

But still thanks for replying.

0 Kudos

Yes correct, as per the SAP Library Design Guidelines and Formatting Rules for Creating New Segments :

  • "The segment fields may only contain alphanumeric data. You can make sure that this is the case by using data elements which contain characters in the segment fields."
  • i.e. a number should be represented using characters, with no thousands separator, dot as decimal separator, negative sign at the right (for instance : "2097152.64-" )

However, it's possible to choose a "P" data element for defining a segment type, but the actual type is converted into type C. A data element with 21 digits included 7 after the radix point, will be converted into a 23 characters field.

The only interest I see of using a numeric data element, is avoiding creating a useless character-type data element with corresponding length and with same description.