Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Storing an value in Memory and passing the same to next run.

Former Member
0 Kudos

Hi All,

I need a help regarding the following query:

My requirement is one of my report needs to be schedule for every 8 hours, means 3 times per day. This report fetches the sales documents from database. After first run of the program , i want to fetch only documents which created or changed after the first run ( date & time ) of the program. Anyway in the first run it will pick all documents till that time. But i need to store date & time , after finishing the first run. And i need to use these values for second run , so that i will get only those records which are changed or created after first run. And this is same for third run of program, the finish time , date of second run needs to be store in Memory.

How i can achieve this? Is there any way we can store certain values in Memory and we can retrieve whenever we want?

Thanks in advance,

Regards,

Pavan.

3 REPLIES 3

sridhar_k1
Active Contributor
0 Kudos

You can create a date and time variable in TVARV table using STVARV transaction and save the date and time to the table at the end of the program, and read it in your next run.

Regards

Sridhar

Former Member
0 Kudos

I dont think there is any way to store in the memory because it will be specific to that program only & will not be available for next run .

What you can do is create a simple Z table to store start date & time of the job .Update this table when the job starts . So there will be always on entry in the table.

also you need to put a check for the earlier job. That job should have been finished successfully because if this is not checked you may miss some documents.

Read this date & time for the next run . For the first run make some entry in the table .

Hope this will help.

Former Member
0 Kudos

Use the command EXPORT <f1> TO MEMORY ID <uniqueid>

and in the second run use IMPORT <f1> FROM MEMORY id <uniqueid>.