2021 Jun 01 12:07 PM
Hi All,
Is there a way in which the date can directly be calculated on the dynamic variant in SAP for a certain number of days. For example I would want to fetch the data for every 10 days before today. So that means, I will need all the records before 10,20,30 days which are basically multiples of 10. Currently SAP allows a dynamic variant on just X number of days, i.e it will help be fetch data 10 days before the current date, but not days in multiple of 10.
The scenario for me is that I need a batch job (run daily) to send remainder emails after every 10 days the entry is created in a custom table. While I know i can handle in the code, I am trying to check if there is a way to handle it dynamically like when the customer might want to increase or decrease the frequency of sending the remainder emails every 7/10/15 days.
Hi All,
Is there a way in which the date can directly be calculated on the dynamic variant in SAP for a certain number of days. For example I would want to fetch the data for every 10 days before today. So that means, I will need all the records before 10,20,30 days which are basically multiples of 10. Currently SAP allows a dynamic variant on just X number of days, i.e it will help be fetch data 10 days before the current date, but not days in multiple of 10.
The scenario for me is that I need a batch job (run daily) to send remainder emails after every 10 days the entry is created in a custom table. While I know i can handle in the code, I am trying to check if there is a way to handle it dynamically like when the customer might want to increase or decrease the frequency of sending the remainder emails every 7/10/15 days.
2021 Jun 02 8:05 AM
It's not very clear what you are looking for. In program variants, you can enter a value = today +/- any number of days. Why do you need something else?
2021 Jun 03 3:39 AM
A workaround comes to my mind is:
use selection variable (TVARVC).
Define your job as two steps job.
1st step: a z-program that update/calculate the selection variable in TVARVC to expect value
2nd step: the program that you want to run
Note: TVARVC is a buffered table, pay attention to the dirty read:
2285937 - The updated data for the table TVARVC can not be read