How to trigger an existing background job in ABAP program?which fm?

Hi experts,
    how to trigger an existing background job( defined in SM36 ) in ABAP program?which fm?
    seems that FM 'JOB_OPEN' / 'JOB_SUBMIT' / 'JOB_CLOSE' can only create a new job.

Hi,
    now my requirement is that sap has generated one job automatically, and then i will have a job name
'XXX'. and then i want to schedule the job in abap program,. which function module could i use ?
my expected fm is that the system will trigger the job after i give the job name and start condition.
i have tried job_open, but it seems just to create a new job. any advice ?

Similar Messages

  • Restrict background Jobs thro' ABAP Program

    Hello,
    While I was working in one of the customer place , they restricted the background jobs thro' one ABAP program for customer reports . Unfortunately , I don't have the source code with me. As you are all aware that users fires the background jobs for different periods so that he/she can submit the reports to the higher up in time.
    Scenario : I have 10 application servers and each application has 20 work processes ( 12-Dialog,4-Background,3-spool,1-Gateway). I would like to restrict 1 background process/per appl server  for customer reports(Y OR Z programs) during the business hours .
    It would be great help  to Basis Consultants , if you can contribute to restrict the background jobs .
    Thanks
    Regards,
    S.Srinivasan

    Hi Daniel,
    The program MEREP_DISTRIBUTOR(Client Data Distributor) determines delta data independent of a download request from the client.This is mainly used to reduce the load on the server and scheduling of this program is part of "SAP MI Administration" which is generally performed as part of OR after MI Post Installation steps that recommends you to Schedule Background Jobs for Generic and Smart Sync which you wanted to confirm in your post.So the programs
    (1)WAF_MW_MAPPING
    (2)WAF_DEPLOYMENT_FROM_ROLES &
    (3)MEREP_RETRY_BP
    are good enough for scheduling Generic & Smart Sync(in your case for MAM).Apart from these you may have to check up the Handler Settings that is mentioned in my previous post.
    Hope this helps.
    Thanks
    Gisk

  • How to de-schedule a background job?

    Dear all,
         I have scheduled a background ABAP report titled ZHRWFIT19 at SM36 to trigger a workflow.
         Initially I scheduled this background job to 9 A.M.
         Later I changed to schedule this background job to 10 A.M at SM37.
         Now my workflow triggers twice i.e., at 9 A.M. once and 10 A.M once.
         I want it to start at 10 A.M. only.Though I changed the schedule time to 9 A.M. to 10 A.M, still my background job triggers the
         workflow at 9 A.M. and 10 A.M.
         How to de-schedule this background report at 9 A.M.?
         Please suggest for which I will be grateful forever.
    Thanks and regards,
    S.Suresh

    Dear Shastri,
             Thank you so much for your reply.
             As you have rightly pointed, I have 2 entries with same background job at SM37.That's why my workflow triggers twice.Now I want to permanently delete the background job entry at SM37 which triggers my workflow at 9 A.M.
            I couldn't delete this entry at SM37 permanently.Please suggest me how to permanently delete the entry that triggers the workflow at 9 A.M., for which I will grateful.
    Thanks and regards,
    S.Suresh

  • How to debug the background job in ABAP

    Hi Guys,
    Can anyone let me know how to debug the background job in ABAP.
    Thanks in advance
    peter

    Hi,
    Goto SM37 and see the log if any is there and based on that you can check the code.
    you can't debug background job.
    Create a Variant for the Program and
    Schedule JOB in background:
    Go to SM36 create a Job
    enter Program and Variant for that program in STEP..
    click on Start Condition
    Click on DATE and TIME enter date scheduled Start and END times
    click on Period Values
    Click on HOURLY/WEEKLY etc
    CLick on RESTRICTIONS also to use further criteria.
    so your job will be scheduled and run as per your requirement.
    and in SM37 Transaction check the status of that JOB
    Check this link for scheduling jobs..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
    Check this
    http://jplamontre.free.fr/SAP/Debug%20background%20process.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+debugger&
    Regards,
    Padmam.

  • How to create Background job for Dialog program

    Hi Experts,
    I have copied Standard tcode to Z-tcode (CS12 tcode).
    Now my requirement is to create background job for this program (but program is not a 'E' type its 'I').
    How we can schedule Dialog program to Background.
    Pls suggest me.
    Regards
    SK

    Hi do as below :
    Reefer below :
    Bakcground Job Creation
    You will have to submit your report using Submit statement ,
    then inside the submitted report write open_job.
    Regards,
    Uma

  • Schedule a background job for a program using ABAP code.

    Hi,
    I have to write a program to schedule a background job for another program.
    Need your help to understand how we can achieve this functionality.Any example of an abap code would be of great help.
    Need it urgently.
    Thanks in advance.
    Sandeep.

    Hi Sandeep,
    Here is the demo program regarding the BDC For the background job.
    report zprprbdc1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    ***data: begin of itab occurs 0 ,
    ***       matnr(20) type c,
    ***       mbrsh(30) type c,
    ***       mtart(30) type c,
    ***       kzsel(20) type c,
    ***       maktx(40) type c,
    ***       meins(5) type c,
    ***       end of itab.
    data: begin of record occurs 0,
    * data element: MATNR
            matnr_001(018),
    * data element: MBRSH
            mbrsh_002(001),
    * data element: MTART
            mtart_003(004),
    * data element: XFELD
            kzsel_01_004(001),
    * data element: MAKTX
            maktx_005(040),
    * data element: MEINS
            meins_006(003),
    * data element: MTPOS_MARA
            mtpos_mara_007(004),
          end of record.
    *** End generated data section ***
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    **do.
    **read dataset dataset into record.
    **if sy-subrc <> 0. exit. endif.
    call function 'GUI_UPLOAD'
      exporting
        filename                      = 'c:\jitu\bdc\10002.txt'
       filetype                      = 'ASC'
       has_field_separator           = 'x'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      tables
        data_tab                      = record
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    loop at record .
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-matnr_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-mbrsh_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-mtart_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-kzsel_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-mtpos_mara_007.
    perform bdc_transaction using 'MM01'.
    **enddo.
    endloop.
    perform close_group.
    *perform close_dataset using dataset.
    &*****************Reward point if helpful************&

  • Background Job Scheduling of Program RSEIDOC2

    Hi Folks,
    Can we schedule program RSEIDOC2 as background job? This program is used by Transaction Code WE02.
    If it is possible then please let me know how can i do the same. Currently I am trying to schedule this with SM36 but when executing with SM37 then it is moving to canceled status. So please let me how it can be done??
    Thanks and regards,
    Siddarth

    Please refer to the SAP documentation [Scheduling Background Job|http://help.sap.com/saphelp_nw70ehp2/helpdata/EN/c4/3a7f87505211d189550000e829fbbd/frameset.htm]
    Regards
    Suresh

  • How to create a job thru ABAP program for calling a program with variant???

    Hello experts,
    can u give me step wise procedure to create jobs for  a program with a variant name thru ABAP???
    Also, can a transaction can be scheduled as a job to run in background with a variant name???
    Edited by: SAP USER on Jul 22, 2008 6:08 AM

    Hi,
    To create a job through ABAP program you can do the following.
    Go to Menu bar.
    In there, go to   SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
    Then give the JOB NAME and CLASS in the screen that comes up.
    This is how we schedule a program.
    Now, to create a variant for a program -
    First activate your program in SE38. Then execute it .
    Now, click on SAVE button. It will open up  the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
    Hope this helps.
    Regards,
    Hari Kiran

  • How to trigger a standard workflow task in customizing program?

    Hi experts,
    Does any1 have any ideas about how to trigger a standard workflow task in customizing program? Is there any FMs can be used to do this?
    Thx in advance. Points will be rewarded.
    Vincent

    will followiign Fms help -
    'SWE_EVENT_CREATE'
    SWR_START_WORKFLOW
    SWU_START_WORKFLOW

  • How to find the start condition of a ABAP program?

    Hello Gurus!,
    Could any one please explain how to find the start condition of a ABAP program?
    like its a event based or time based?and also how to find that event and time..
    Thanks in Advance...
    Dinakar

    Hi Dinkar,
    Go to Job Schedule, put Job Step parameter as your program and see scheduled Job.
    In Schedule Job double click to see start condition. and steps to see details and variant.
    Hope it helps.
    Thanks
    CK

  • Can a transaction be called in background dynamically using ABAP program??

    Hi Experts,
    Can a transaction be called in background dynamically using ABAP program without BDC???
    Regards,
    Mansi.

    u can create job dynamically through programming..Try this sample code..
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return               << Here it is a static call but u can make it dynamic
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards,
    JOy.

  • How To Call a Broadcasting Template within an ABAP program

    I was wondering if anyone knew how to call the Broadcast template via an ABAP program so it will execute?  The scenario that I have is we are doing validations via BW.  We put the data (for conversion reasons) through validation rules and then load a data target.  From this, there are 2 situations that could occur:
    1) There are errors
    2) There are not any errors
    If #1 is true, then I would like to execute the Query Broadcasting Template that I have created.  If #2 is true, then I would like to execute another process via the ABAP program.  In the past, I was successful using exception reporting via reporting agent, since I was able to call that program but the report did not look good at all.  Please let me know if there is a program that I could call in order to execute this broadcast that I have set up.
    Best Regards,
    Tim

    Hello,
    although this is an old threat, but do you have any hints on how to dynamically change the template when broadcasting?
    kind regards
    Murat

  • How to call a BW Query from an ABAP program?

    How to call a BW Query from an ABAP program?

    hi
    check this link
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
    hope this helps
    cheers

  • Urgent!!  How to call a custom transaction or an ABAP program in BSP?

    Urgent!!  How to call a custom transaction or an ABAP program in BSP?
    We are pretty new on BSP.  Would be very appreciated if any expert here give us the detailed steps on how to build up the application to just call a custom transaction (e.g., t-code: ztest) or an ABAP program.  Would we have to create a button or event handler to do that?  And the detailed steps?
    Thanks in advance and we will definately give you reward points!

    hi Durairaj,
    During the time to wait for your answer, we copied Bernd's code from your last link, but when activating it, get the 1st error msg:
    Field "CLIENT" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."DATA" statement. The error shows up here:
    <td>
    <htmlb:inputField id = "client"
    value = "<%= client %>" />
    </td>
    Then we added Client to the page attribute and define it as type String, then get another error:
    The field "EVENT" is unknown, but there is a field with the similar name "EVENT_ID"."EVENT_ID". This error shows up at the beginning in the Event Handler:
    OnInputProcessing:
    code
    • event handler for checking and processing user input and
    • for defining navigation
    • event handler for data retrieval
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    IF event->name = 'button' AND event->event_type = 'click'.
    button_event ?= event.
    How to resolve this unknown Event error, need to define in Page Attribute tab? but with what type?
    Actually we only want to run an ABAP4 program in BSP, the code is complicated, could you show us an easy way of doing this in BSP?

  • How can i get access code to create ABAP Program ?

    hi guys ,
    How can i get access code for creating ABAP Program in my System.
    I am using SAP IDES 4.6 Version
    Please Help me out .
    Regards
    Raghu

    Hi Raghu,
    - license your system (http://service.sap.com/licensekey)
    - create a developer key (http://service.sap.com/sscr)
    - create a key for your ABAP program (httP://service.sap.com/sscr)
    Markus

Maybe you are looking for

  • Error in create Customer code.

    hi, when i try to create the new customer, am getting "ACCT GROUP SOLD to PARTY user EXT. NO".  can you please suggest where we need to assing , whether the customer number is auto genrate or manuall number? and how the running number interval which

  • ECM: Business Package for Compensation Specialist

    Hi, so the last ECM project I worked on, the portal resource installed the compensation specialist business package. But now I am having trouble confirming exactly what should be installed.  On sdn, there is a great excel sheet that is recently updat

  • SmartObjects: placing from external files + auto-refresh

    Hello, when I place a SmartObject from an external file PSP CS3 seems to store it in the current file; if I change the external file, the placed object does not change automatically (I have to use the replace function to apply changes in the external

  • Why do I have two versions of Photoshop?

    My CC lists Photoshop CC and Photoshop CC (2014) and every time it updates, it updates them both with the same thing. Why is there two and can I get rid of one and if so, which one and how do I get rid of it please? thanks David

  • How to change langusge back to english

    Current language is unknown so you will have to describe by lines from GENERAL.