04-22-2010 8:16 AM
Hi,
I am creating a program with out selection screen . This program runs based on date and time . so I need to create a table
with date and time fileds.
Program runs based on FROM DATE FROM TIME TO DATE TO TIME....... FROM DATE and FROM TIME will get it from ztable and TO DATE & TO TIME values as SY-DATUM & SY-UZEIT. In the end I will update sy-datum and sy-uzeit values in the custom table to get the values ( Use it for from date from time ) for next run of the program.
This program is mainly used for background job so how do we get the values of from date and from time for the first run of the program ? how do we update the latest date and time details by deleting old date and time details.
Thanks ,
Vinay.
Edited by: Vinay parakala on Apr 22, 2010 9:18 AM
04-22-2010 8:41 AM
First of all, I'll suggest to maintain TVARVC instead of doing it in custom table unless you need a complete log.
As per my understanding, you are trying to fetch some records based on the time period(Delta loads).
So, you will do an initial run to load the complete data then you will run it for time periods. For example,
1st Load- 01/01/1991(earliest date possible) - today's date say 03/22/2010
2nd load- 03/22/2010 - today's date
so on............
You have to move the to date values to from date values and to date value needs to be updated by the latest one for each load.
Do you have any dependency on background job? Please let me know if my understanding is correct or specify your requirement in detail.
04-22-2010 8:39 AM
for the first time the program is executed the db table is empty. So you could check whether table is empty. In the beginning of the code;
If table [ ] is initial.
"update from date from time fields with sy-datum and sy-uzeit.
endif.
04-22-2010 8:41 AM
First of all, I'll suggest to maintain TVARVC instead of doing it in custom table unless you need a complete log.
As per my understanding, you are trying to fetch some records based on the time period(Delta loads).
So, you will do an initial run to load the complete data then you will run it for time periods. For example,
1st Load- 01/01/1991(earliest date possible) - today's date say 03/22/2010
2nd load- 03/22/2010 - today's date
so on............
You have to move the to date values to from date values and to date value needs to be updated by the latest one for each load.
Do you have any dependency on background job? Please let me know if my understanding is correct or specify your requirement in detail.