Application Development 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: 

How to Clear The Initial Values???

Simha_
Employee
Employee
0 Kudos

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.

1 ACCEPTED SOLUTION

abdul_hakim
Active Contributor
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hai Narasimha Rao

It is very simple

Loop at Itab.

if itab-fieldname = '00.00'.

itab-fieldname = ' '.

endif.

Endloop.

Thanks & Regards

Sreenivasulu P

abdul_hakim
Active Contributor
0 Kudos

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

hymavathi_oruganti
Active Contributor
0 Kudos

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

Simha_
Employee
Employee
0 Kudos

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.

abdul_hakim
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Simha,

If you are displaying time field in report then you can use abap statment :

write : time-field using no-zeroes.

Cheers,

Nilesh