2006 Nov 28 2:47 AM
Hi, buddies.
I face this situation that I want to make a counter to count how many user run a special program(report or function module) in R/3 which will consume lots of resourses during the operating. I hope to utilize the counter to limit the numbers of the user.
I am wondering whether there is global parameter I can use or there is another method to realize my requirment.
Looking forward your replies.
Thanks in advance.
Alex
Hi, buddies.
I face this situation that I want to make a counter to count how many user run a special program(report or function module) in R/3 which will consume lots of resourses during the operating. I hope to utilize the counter to limit the numbers of the user.
I am wondering whether there is global parameter I can use or there is another method to realize my requirment.
Looking forward your replies.
Thanks in advance.
Alex
2006 Nov 28 2:54 AM
Hi Alex
One possible solution might be handling it manually via the program:
1. Create a entry with the program id in table TVARVC as a counter variable.
2. At start of execution increment the variable.
3. At end of execution decrease the counter.
Though i foresee the problem incase of abnormal executions, like the execution has terminated in between...
Kind Regards
Eswar
2006 Nov 28 3:00 AM
Hi,
Use IMPORT, EXPORT statement to achieve this..
Have this code at the end of the program..
DATA: V_RUN TYPE INT4.
Get the counter..
IMPORT V_RUN FROM DATABASE INDX(ST) ID 'PGM_RUN'.
Increment by 1 to know to how many times this program has been executed.
V_RUN = V_RUN + 1.
Update the country
EXPORT V_RUN FROM DATABASE INDX(ST) ID 'PGM_RUN'.
Thanks,
Naren