2008 Jun 06 7:32 AM
Hi,
I am selecting dates from a Database table and moving it to an internal table, When values are present in DB table it copies it correctly whereas when there is no value in DB table a Zero gets stored in the internal table and gets subsequently printed.
I want to avoid this issue and i want only blanks in the internal table when the value in DB is not filled.
Thanks & Rgrds,
Ken
2008 Jun 06 7:33 AM
in internal table change field dats type to char type , then it wil not display zero..
Reward if useful
Ankesh
2008 Jun 06 7:33 AM
in internal table change field dats type to char type , then it wil not display zero..
Reward if useful
Ankesh
2008 Jun 06 7:34 AM
data dt type sy-datum.
dt = sy-datum.
write 😕 dt.
clear dt.
if dt is initial.
dt = space.
endif.
write 😕 dt.
does that help???
2008 Jun 06 7:35 AM
hi!
As ur variable is in date format its displaying Zeros when there is no data in DB.
By declaring the variable as string r char you can avoid this Zero (or)
fetch all the data as u need in Tab and Loop the Itab for date = 0 and replace 0 to Blank space.
Reward me if its useful.
Regards,
Nagulan
2008 Jun 06 7:38 AM
Hi
Write ur date field to a character type field of the same length as follows
data: lv_date(10) type c.
WRITE itab-date to lv_date.
Thanks,
Anon
2008 Jun 06 8:10 AM
Hi Ken,
Did the answers help you to solve the problem.
If not quote the problem.
If yes, close the thread..
Thanks,
Anon