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

declaration

Former Member
0 Likes
934

Hi All,

i want to declare as

data : begin of itab,

NETWR(30) TYPE F,

endt of itab.

It give error .

Please tell me how can declare currency field with length 30.

thanks,

Amjad.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
905

Hi friend,

u can create your dataelement and domani with 30 char length. and then u can aasing it

8 REPLIES 8
Read only

Former Member
0 Likes
905

what error is coming?

Read only

0 Likes
905

Hi,

Thanks for replay.

The Error is like" type F can only have the length specification "8" or no length.

Thanks,

Amjad

Read only

kiran_k8
Active Contributor
0 Likes
905

Mohammed,

Type F can have a length of 8 or the length should not be defined at all.

So,declare netwr as netwr type f.

K.Kiran.

Read only

Former Member
0 Likes
905

data : begin of itab,

NETWR TYPE F,

end of itab.

declare in above way...for ur requirement....!!!!

u can give even 30 digits also in this case...

Regards

vasu

Read only

0 Likes
905

HI,

IF I DECLARE ,

DATA :BEGIN OF ty_final,

netwr TYPE f,

anbtr TYPE f,

END OF ty_final.

ty_final-netwr = '12345678910111213141516171819.22'.

WRITE : TY_FINAL-NETWR.

output :

1.2345678910111214E+28

thanks,

Amjad

Read only

0 Likes
905

Mohammad,

To avoid such errors declare the netwr as type p decimals 2 as said by richa in the above thread.

or take one more varibale declared as type p decimals 2 and then move the ty_final-netwr to the newly declared variable.

K.Kiran.

Read only

Former Member
0 Likes
905

Declare it as netwr(30) type p decimals 2 places.

Decimal; 2 places can be omitted if you don't want decinmal places to be defined.

Read only

Former Member
0 Likes
906

Hi friend,

u can create your dataelement and domani with 30 char length. and then u can aasing it