Application Development and Automation 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: 
Read only

Field Declaration

Former Member
0 Likes
811

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
Read only

Former Member
0 Likes
763

Try:

DATA amt TYPE netwr.

Rob

5 REPLIES 5
Read only

Former Member
0 Likes
764

Try:

DATA amt TYPE netwr.

Rob

Read only

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

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

Regards,

Rich Heilman

Read only

amit_khare
Active Contributor
0 Likes
763

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

Read only

0 Likes
763

hi Veni,

Declare it in this way...

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

Regards,

Santosh

Read only

Former Member
0 Likes
763

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