Skip to Content
author's profile photo Former Member
Former Member

How to find out the first run of the Program

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 10, 2013 at 06:41 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2013 at 06:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2013 at 07:05 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.