2011 Jul 25 7:05 AM
Hello all ,
I have a Ztable which stores the UID's created . The table has the fields date and time which stores the date on which the uid is created in ztable and time on which the UID is created in ztable .
Now my requirement is , i have to create a new program to send all the UID's created in the table into external system . this program must be run as batch job for every 15 minutes and pick the UID s created and send to external system.
In the select statement i have added the where condition for time and date as ranges apart from other where conditions.
If the batch job is successful , i m capturing the time at which the batch job is sucessful into another table and updating the date and time in that table .
Now in my program , in select stmt to fetch UID's . I'm passing the last time stamp at which the batch job is succeful into lower range for time r_time-low and date into r_date-low. and im passing the sy-uzeit value into r_time-high and sy-datum into r_Date-high.
Now suppose if the r_time-low= 23:45:45 and r_time-high = 01:01:01 , the select statement to fetch the UID is faiilng .
i'e suppose if there are any UID's created between 20/7/2011 at 23:45:45 and 21/07/2011 01:45:45 , im not able to fetch these records as lower value of time range(23:45:45) is greater than higher value of time range(01:45:45)
Can anybody give me any clue on this issue..
thanks®ards,
G.Pavan Kumar .
Hello all ,
I have a Ztable which stores the UID's created . The table has the fields date and time which stores the date on which the uid is created in ztable and time on which the UID is created in ztable .
Now my requirement is , i have to create a new program to send all the UID's created in the table into external system . this program must be run as batch job for every 15 minutes and pick the UID s created and send to external system.
In the select statement i have added the where condition for time and date as ranges apart from other where conditions.
If the batch job is successful , i m capturing the time at which the batch job is sucessful into another table and updating the date and time in that table .
Now in my program , in select stmt to fetch UID's . I'm passing the last time stamp at which the batch job is succeful into lower range for time r_time-low and date into r_date-low. and im passing the sy-uzeit value into r_time-high and sy-datum into r_Date-high.
Now suppose if the r_time-low= 23:45:45 and r_time-high = 01:01:01 , the select statement to fetch the UID is faiilng .
i'e suppose if there are any UID's created between 20/7/2011 at 23:45:45 and 21/07/2011 01:45:45 , im not able to fetch these records as lower value of time range(23:45:45) is greater than higher value of time range(01:45:45)
Can anybody give me any clue on this issue..
thanks®ards,
G.Pavan Kumar .
2011 Jul 25 7:12 AM
Hi,
as this is a ztable, is it possible for you to merge the date and time field into one timestamp field?
Other possibility would be to just select using the date and then delete some entries using the starttime and date and some using the endtime and date.
Best regards,
Oliver
2011 Jul 25 7:21 AM
Hi oliver
thanks for the reply .
alternative -1
I will check the possibility of merging time and date into one time stamp field .
If i merge the date and time into one timestamp field , is it possible to get the records created for example between 20/7/2011 at 23:45:45 and 21/7/2011 at 01:01:01 ?
alternative-2
(2)Other possibility would be to just select using the date and then delete some entries using the starttime and date and some using the endtime and date.
even with the alternative-2 i think we get the same problem .
2011 Jul 25 7:29 AM
Hi,
1.
Your select would be > 20110720234545 AND <= 20110721010101. So this would be fine.
2.
Should work. With the above example you would select >= 20110720 AND <= 20110721. Then delete where date = 20110720 AND time < 234545. Then delete where date = 20110721 AND time > 010101.
Best regards,
Oliver
2011 Jul 25 7:30 AM
Hi,
When you read the data from the table and sent out, set a flag as processed.
So new data would be without the flag set. Whenever you are sending the data out, update the flag as processed for the sent out data. Hope this helps.
With regards,
Vamsi
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |