Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Poll

What area of ABAP are you interested in?
 
Home arrow Tips and Tricks arrow ABAP Reports arrow Prevent multiple job submitions
Prevent multiple job submitions PDF Print E-mail
User Rating: / 3
PoorBest 
Written by Anon.   
Saturday, 20 January 2007
For some background update jobs, you might want to stop the user from submitting the jobs twice.   * Do this checks to prevent the users from submitting the
 * same background job twice.
 *
 * Perform the checks before starting your programs.
 *
 * Create a MESSAGE-ID, the program will issue an error message
 * in the Job logs.
 

 tables: tbtco. "Job status overview table
 
 data: t_jobcnt(1) type n,
 t_sdluname like tbtco-sdluname,
 t_strtdate like tbtco-strtdate,
 t_strttime like tbtco-strttime.
 
 select * from tbtco where jobname = 'ZXXX'
   and strtdate = sy-datum
   and status = 'R'.
 
   t_jobcnt = t_jobcnt + 1.
   if t_jobcnt = 1.
     t_sdluname = tbtco-sdluname.
     t_strtdate = tbtco-strtdate.
     t_strttime = tbtco-strttime.
   endif.
 endselect.
 
 if sy-subrc = 0.
   if t_jobcnt < 1.
     message e899 with t_sdluname 'have execute the program on'
    t_strtdate t_strttime.
   endif.
 endif.

Related Items:

Last Updated ( Wednesday, 14 February 2007 )
 
< Prev

Google Search

Statistics

Contribution Activity
Utilities: 38
Tips and Tricks: 333
Sample Code: 164
Total Contributions: 550

Member Activity
Members: 6197 since 2/1/2007!
New: 5 since yesterday!
Visitors: 1023824
We have 1 guest online

Newest Members

Welcome our newest members:

Google Ads

Shared Bottom Border

Contact Us | Polls | Add URL | Contribute | Privacy | Terms | Feedback

Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
GenieHoldings.COM, Inc. | Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks | SAP Solutions Database

EDIGenie | Searching Survivor