2008 Sep 15 10:35 AM
Hi All,
I have a problem where i have to calculate based on the time slots.The time slots are divided in 4 parts i.e from 6 to 12,from 12 to 18,from 18 to 24 and from 0 to 6.
My problem is in table time is stored as 00:00:00.But in my internal table it is coming as 000000.
I have written the code taking colon in consideration.But it is not coming inside the if block.
e.g
IF wa_jcds3-utime between '00:06:00' and '00:12:00'.
l_flag_time2 = 'X'.
qty_time2 = qty_time2 + 1.
ENDIF.
Can someone please resove this.
Thanks in advance,
Saket.
2008 Sep 15 10:44 AM
Hi,
System always stores the time as '000000'. You have to check with this format.
regards,
Raju.
USE OFFSET TO CAPTURE THE NUMBERS AND THEN COMPARE THE THE TIME BY USING IF STMTS
2008 Sep 15 10:39 AM
Saket,
Check if the following link gives you any lead.
http://www.sapnet.ru/abap_docu/ABENTIME-STAMP-GENERAL.htm
K.Kiran.
2008 Sep 15 10:44 AM
Hi,
System always stores the time as '000000'. You have to check with this format.
regards,
Raju.
2008 Sep 15 10:47 AM
USE OFFSET TO CAPTURE THE NUMBERS AND THEN COMPARE THE THE TIME BY USING IF STMTS
2008 Sep 15 10:49 AM
Time Formats are always stored as 'HHMMSS' internaly.
So, you have to compare like:
IF wa_jcds3-utime between '000600' and '001200'.
l_flag_time2 = 'X'.
qty_time2 = qty_time2 + 1.
ENDIF.
Regards.
Valter Oliveira.
2008 Sep 15 10:53 AM
Define Variables for your times and use that in your IF statement.
data: wf_time1 like sy-uzeit value '000600',
wf_time2 like sy-uzeit value '001200'.
IF wa_jcds3-utime between wf_time1 and wf_time2.
l_flag_time2 = 'X'.
qty_time2 = qty_time2 + 1.
ENDIF.
Edited by: Suresh Kumar on Sep 15, 2008 11:54 AM
2008 Sep 15 10:55 AM
Hi.. try this approach.
IF wa_jcds3-utime between '000000' and '060000'.
elseif wa_jcds3-utime between '060001' and '120000'.
.....
ENDIF.
2008 Oct 07 5:57 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |