on 07-03-2007 6:02 AM
hi friends,
I want to convert time into words .
example 17:49 i want to convert it into seventeen forty nine hrs
is there any function module . if so please revert back me
Hi
Just split the time into Hours and Minutes and pass those numbers to Table
T015Z, it will give the number spell for each number
then concatenate those two string of words and display
Reward points for useful Answers
Regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
there is no Fm for you need but you can write your own fm like this.
data: mytime type t, hour(2) type c,min(2) type c, sec(2) type c.
data: word(10) type c, compword(50) type c.
mytime = '12:25:00'
hour = mytime+0(2).
min = mytime+3(2).
sec = mytime+6(2).
perform getword using hour changing word.
concatenate compword word 'hour and ' into compword.
perform getword using min changing word.
concatenate compword word 'minutes and ' into compword.
perform getword using sec changing word.
concatenate compword word ' seconds' into compword.
write: compword.
form getword using time1(2) type c changing word(10) type c.
case time1.
when '0'.
word = 'zero'.
when '1'.
word = 'one'........upto sixty.
endform.
regards,
Ashok Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi venkat,
please find the below link for your kind reference:
/people/himanshu.gupta/blog/2006/11/14/abap4-date-time-and-timestamps
Mark reward points for all helpful answers.
Regards,
Moqeeth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
Check this code.
data: mytime type t, hour(2) type c,min(2) type c, sec(2) type c.
data: word(10) type c, compword(50) type c.
mytime = '12:25:00'
hour = mytime+0(2).
min = mytime+3(2).
sec = mytime+6(2).
perform getword using hour changing word.
concatenate compword word 'hour and ' into compword.
perform getword using min changing word.
concatenate compword word 'minutes and ' into compword.
perform getword using sec changing word.
concatenate compword word ' seconds' into compword.
write: compword.
form getword using time1(2) type c changing word(10) type c.
case time1.
when '0'.
word = 'zero'.
when '1'.
word = 'one'........upto sixty.
endform.
Reward if useful.
Thanks
Aneesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.