05-08-2006 8:50 AM
Hi All,
I am taking the value of the time field from an Ztable.
My problem is if there is npo value in that field it is displaying "00.00" which is the initial value.
But i dont want to display that value.
i want to show blank value when there is no time in the table.
I am also converting into char and doing but its giving short dump.
Can any one know any F.M to clear the initial values??
Regards,
Simha.
05-08-2006 8:57 AM
hi bandla.
you read the values from database into a char type field instead of numeric type..for eg..
data: time(8) type c.
parameters p_date like sy-datum.
select single time from ztab into time where date = p_date.
Cheers,
Abdul Hakim
05-08-2006 8:53 AM
Here is the SAP Help page where I found this.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ebf0446011d189700000e8322d00/frameset.htm
The statement in question is towards the bottom.
05-08-2006 8:55 AM
Hai Narasimha Rao
It is very simple
Loop at Itab.
if itab-fieldname = '00.00'.
itab-fieldname = ' '.
endif.
Endloop.
Thanks & Regards
Sreenivasulu P
05-08-2006 8:57 AM
hi bandla.
you read the values from database into a char type field instead of numeric type..for eg..
data: time(8) type c.
parameters p_date like sy-datum.
select single time from ztab into time where date = p_date.
Cheers,
Abdul Hakim
05-08-2006 9:00 AM
if it is any of the numeric types u cant print space for 0, only for char type values it prints initial value space.
u need to convert it to char, no other go.
just analyse what error u r getting and try to fix that error. that is the only way
05-08-2006 9:03 AM
Hi All,
thanks for the replies.
I can able to do it in the other way u all have specified.
But just want to know any other F.M available foor clearing the initial values for date and time fields,
Cheers,
Simha.
05-08-2006 9:11 AM
hi rao,
i don't think you have FM for this.
if your question has been answered then plz close the thread.reward points for all useful answers.....
Cheers,
Abdul Hakim
05-08-2006 4:01 PM
Simha,
If you are displaying time field in report then you can use abap statment :
write : time-field using no-zeroes.
Cheers,
Nilesh