Enterprise Resource Planning Portal ERPGenie.COM Enterprise Resource Planning Portal

   Advertise | BLOG

Web ERPGenie.COM

Home | Vote for us |

ERPGenie.COM -> SAP Technical -> ABAP -> Tips and Tricks -> Preventing duplicate jobs

tables:  tbtco.

data: jobcnt(1) type n,
      t_sdluname like tbtco-sdluname,
      t_strtdate like tbtco-strtdate,
      t_strttime like tbtco-strttime.

* ZXXX is the job name to check for

select * from tbtco where jobname  = 'ZXXX'
                      and strtdate = sy-datum
                      and status   = 'R'.
   add 1 to jobcnt = jobcnt.
    if jobcnt = 1.
       t_sdluname = tbtco-sdluname.
       t_strtdate = tbtco-strtdate.
       t_strttime = tbtco-strttime.
    else.
       exit.
    endif.
endselect.
if sy-subrc = 0.
   if jobcnt >= 1.
       message i999(b1) with t_sdluname ' has released job on '
                         t_strtdate t_strttime.
   endif.
endif.

Contact Us | Polls | Add URL | Contribute | About | Privacy | Terms | Feedback | Help!

Message Board | Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job