‎2007 Jul 26 4:53 PM
Hi all,
I have two field values that originate from data elements sstad and sstau. The actual values displayed are 11/20/07 and 14:10. I need to subtract a queue time originating from data element dzwnor given in hours, say 12:00, from the previous values and then convert the final value into a factory day. What would be the most concise manner in which to perform this calculation?
Thanks,
Mat
‎2007 Jul 26 4:59 PM
Use function module after substracting hours from the time
<b>FACTORYDATE_CONVERT_TO_DATE</b> Calendar function: Returns date for a factory calendar date
Regards,
Santosh
‎2007 Jul 26 4:59 PM
Use function module after substracting hours from the time
<b>FACTORYDATE_CONVERT_TO_DATE</b> Calendar function: Returns date for a factory calendar date
Regards,
Santosh
‎2007 Jul 26 4:59 PM
How di I add sstad and sstau together to build a datetime stamp?
‎2007 Jul 26 5:02 PM
hi,
concatenate sstad sstau into lv_var. "provided both sstad & sstau are converted to character typeRegards,
Santosh
‎2007 Jul 26 5:07 PM
hi , there are same function to do date and time calculation, (ADD, SUBTRACT hour or minutes or day or month from Hour or date.) you can find it in sm37.
or if you mange inside your code filds type datum od uzeit you can add or subtract directli from the code ex:
data: date1 like sy-datum,
data2 like sy-datum,
data3 like sy-datum,
data4 like sy-datum.
put data inside data1 and data2
data3 = data1 - data2.
data4 = data1 - 3.
results is right.
‎2007 Jul 26 7:50 PM
The 2 data elements are presumably date and time format. Move to char variables (do not use write) so you get the unformated version. Concatenate the 2 together. You should end up with YYYYMMDDHHMMSS
Write the amount you want to subtract in the same format and subtract (or use standard FM,
Look at the f1 help for command timestamp - it may help.