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: 

How to find out the first run of the Program

Former Member
0 Kudos

Hello Experts,

I have a requirement to add the date condition wherein :

1) Consider LE sy-datum for the first run

2) Consider EQ sy-datum for rest of the runs/execution of the program.

Please help me on how to find out the First Run of the Program?

I searched SCN but didnt find any relevant posts.

Appreciate your help.

Thanks & Regards,
Sowmya

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

AFAIK not possible as MONI and other tables and files used by ST03N are supposed to be cleared of oldest records regularly.

Set the date range as a SELECT-OPTIONS, then in INITIALIZATION look for the last execution in TVARVC, if not found, initialize to LE sy-datum, else EQ sy-datum, and at start of execution,update TVARVC ?

Regards,

Raymond

3 REPLIES 3

FredericGirod
Active Contributor
0 Kudos

Hi,

it's not really possible. The trace of what/when/who are stored in the transaction ST03, but for the most part of the system the period archived is 3 months.

regards

Fred

raymond_giuseppi
Active Contributor
0 Kudos

AFAIK not possible as MONI and other tables and files used by ST03N are supposed to be cleared of oldest records regularly.

Set the date range as a SELECT-OPTIONS, then in INITIALIZATION look for the last execution in TVARVC, if not found, initialize to LE sy-datum, else EQ sy-datum, and at start of execution,update TVARVC ?

Regards,

Raymond

Former Member
0 Kudos

Hi Sowmya,

For this requirment you have to create a Z Table where you have to maintain value of a FLAG.

At start value of this field will be ZERO or Initial,

Once that report is executed , you have to check value of this flag,

If this is initial or ZERO, You have to take date as per requirement LE SY-DATUM, and set value of this flag as 'X'.

OR if this flag is "X", you have to take as equal to SY-DATUM. (Because value of this flag will be 'X' only if you have already executed this report).

Hope that will help to achieve your requirement.

You can also add field in your Z Table if you have to xecute this report according to variant.

Let me know in case you need more clarification.

Regards,

Shyam Goyal