Application Development and Automation 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: 
Read only

Table or FM which stores program execution details

former_member585060
Active Contributor
0 Likes
2,195

Hi,

Is there any Table or Function Module which gives us program execution details like Program name, last rundate, last run time etc.

Regards,

B.Krishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,570

look in the table FRUN

u can also use the following code

there is a useful SAP Enhansement S38MREP1 wit Exit exit_saplsabe_010(Transaction CMOD).

You can place coding to protocol program start here.

Your coding will be called at each program start.

Example:

INCLUDE ZXREPU01

TABLES: zslog.

CHECK progname(1) = 'Z' OR progname(1) = 'Y'.

SELECT SINGLE * FROM zslog WHERE progname = progname.

IF sy-subrc = 0.

ADD 1 TO zslog-calls.

zslog-last_date = sy-datlo.

UPDATE zslog.

ELSE.

CLEAR zswnlog.

zslog-mandt = sy-mandt.

zslog-progname = progname.

zslog-calls = 1.

zsnlog-last_date = sy-datlo.

INSERT zslog.

ENDIF.

COMMIT WORK.

for specific z programs

you could add the Application Log functionality to your program. Transaction SLG1. There are some standard functions to call the log functionality.

5 REPLIES 5
Read only

Former Member
0 Likes
1,571

look in the table FRUN

u can also use the following code

there is a useful SAP Enhansement S38MREP1 wit Exit exit_saplsabe_010(Transaction CMOD).

You can place coding to protocol program start here.

Your coding will be called at each program start.

Example:

INCLUDE ZXREPU01

TABLES: zslog.

CHECK progname(1) = 'Z' OR progname(1) = 'Y'.

SELECT SINGLE * FROM zslog WHERE progname = progname.

IF sy-subrc = 0.

ADD 1 TO zslog-calls.

zslog-last_date = sy-datlo.

UPDATE zslog.

ELSE.

CLEAR zswnlog.

zslog-mandt = sy-mandt.

zslog-progname = progname.

zslog-calls = 1.

zsnlog-last_date = sy-datlo.

INSERT zslog.

ENDIF.

COMMIT WORK.

for specific z programs

you could add the Application Log functionality to your program. Transaction SLG1. There are some standard functions to call the log functionality.

Read only

0 Likes
1,570

Hi Kartik,

In my system FRUN table is showing blank records, can u explain about the Exit u mentioned.

Amit my requirment is i want to extract MM details on daily and Full MM details on weekly basis, and all the materials created after daily download should not come for next day, i.e, i have to compare the last run date and get the materials details.

Regards,

B Krishna

Read only

Former Member
0 Likes
1,570

Bala,

check Tcodes STAT & STAD

or

you can make use of TCode ST03N expert mode

Read only

former_member787646
Contributor
0 Likes
1,570

Hi

Use Tcode: STAD

Hope it helps.

Murthy

Read only

Former Member
0 Likes
1,570

Hi Bala.

I would like to suggest,

Table REPOSRC - Report Source Code.

Hope that's usefull.

Good Luck & Regards.

Harsh Dave