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: 

Field Declaration

Former Member
0 Kudos

Hi All,

How can I declare the currency field NETWR length 15 decimals 2. I declared it as NETWR1(17) TYPE P,

it is giving me error saying that maximum length for P is only 16, Please help me how should I declare it, so that I will have 15 plus 2 spaces.

Thanks

Veni.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try:

DATA amt TYPE netwr.

Rob

5 REPLIES 5

Former Member
0 Kudos

Try:

DATA amt TYPE netwr.

Rob

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
data: NETWR(8) type p decimals 2.

Internally, this field will be 16 with 2 decimals places.

Regards,

Rich Heilman

amit_khare
Active Contributor
0 Kudos

hi,

you can use P its maximum permissible length is 16.

And thats the maximumallowed in standard data elements in SAP.

But it can be overcome by creating a custom structure like-

types:begin of type_place,

value type char15,

filler type c value '.',

dec type char2

end of type_places.

and you can passs your value in this structure and use it instead.

Or if you want go to SE90 and look for all present data elements in SAP.

Regrds,

amit

0 Kudos

hi Veni,

Declare it in this way...

<b>DATA AMT LIKE VBRK-NETWR.</b>

Regards,

Santosh

Former Member
0 Kudos

hi madam,

this is satish .

if u have decided to use packed decimal use syntax

data amt(8) type p decimals 2.or

use

data amt type vbak-netwr.

ok bye