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

help in field type

Former Member
0 Likes
550

hi,

i declare field type p decimals 2 and when i do select and i don't get data i have their 0.00 and i don't wont it ,i wont null (empty) field how i have to declare it ?

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
530

hii

initial value for type P is 0 as its number it will not show you empty.

if you want that value empty then you need to use TYPE C only as its initial value is space.

You can convert variable of TYPE P into variable of TYPE c.It will give you empty result.

reward if useful

thx

twinkal

hi,

i declare field type p decimals 2 and when i do select and i don't get data i have their 0.00 and i don't wont it ,i wont null (empty) field how i have to declare it ?

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
530

If you want empty, u have to declare it as CHAR, but in that case u can not do arithmation operation.

You can do it another way,

declare a variable lets say CHAR20.

Move the value decmal value to it when decial value > 0

Read only

Former Member
0 Likes
531

hii

initial value for type P is 0 as its number it will not show you empty.

if you want that value empty then you need to use TYPE C only as its initial value is space.

You can convert variable of TYPE P into variable of TYPE c.It will give you empty result.

reward if useful

thx

twinkal

Read only

Former Member
0 Likes
530

hi,

Finally after the data is fetched while displaying it do this way ..

 
data : v_char(20).

loop at itab.

  write itab-fld_p to v_char.
  write v_char.
 
endloop.