Tcode to trigger a background job

Hi,
Can we create a tcode which triggers a background job?
Ezhil.

My User asked for a custom tcode for VF01 which use the copy control from the order and delivery and not allow any manual changes as it is done when the invoice is created in the background.
So he wants a t code trigger the creation of billing in the background.
The most critical requirement is to prevent the user from overriding or changing pricing conditions.
My question is
Is it possible to create a tcode which trigger the background creation?
What shall i tell user?
Ezhil

Similar Messages

  • Trigger a background job after executing tcode MMPV

    Hi All,
    I would like to trigger a background job after executing tcode MMPV. In MMPV, after closing a particular period and entering
    new period, the transaction will be saved. After saving, the background job should be triggered. How to do it?
    Regards,
    Vinod

    Depending what system you are on your best bet would be to create an enhancement point inside a form, that is called after the save has been performed, and raise an event within that form.
    Events can be used to trigger background jobs are maintained in transaction SM62.
    Cheers.

  • What to add to an program code in order to trigger an background job

    Hi there
    I wander what to add to an program code in order to trigger an event which consequently can trigger an background job
    thx in advance

    Check this code:
    DATA : v_jobhead LIKE tbtcjob.
    DATA : v_jobcount LIKE tbtcjob-jobcount.
    DATA : v_eventparm LIKE tbtcjob-eventparm.
    DATA : v_flg_released TYPE c.
    DATA: e_error.
    DATA: running LIKE tbtcv-run.
    TYPES: esp1_boolean LIKE boole-boole.
    CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
               esp1_true  TYPE esp1_boolean VALUE 'X'.
    CONSTANTS: true  TYPE boolean VALUE esp1_true,
                              false TYPE boolean VALUE esp1_false.
    PARAMETERS: v_jobnam LIKE tbtcjob-jobname,
                v_report LIKE sy-repid,
                v_varian LIKE  raldb-variant,
                v_uname  LIKE sy-uname.
    START-OF-SELECTION.
    * add the new job
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
    *            delanfrep        = 'X'
                jobname          = v_jobnam
           IMPORTING
                jobcount         = v_jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc <> 0.
        e_error = true.
      ELSE.
        CALL FUNCTION 'JOB_SUBMIT'  " or you can use SUBMIT statement as well.
             EXPORTING
                  authcknam               = v_uname
                  jobcount                = v_jobcount
                  jobname                 = v_jobnam
                  report                  = v_report
                  variant                 = v_varian
             EXCEPTIONS
                  bad_priparams           = 1
                  bad_xpgflags            = 2
                  invalid_jobdata         = 3
                  jobname_missing         = 4
                  job_notex               = 5
                  job_submit_failed       = 6
                  lock_failed             = 7
                  program_missing         = 8
                  prog_abap_and_extpg_set = 9
                  OTHERS                  = 10.
        IF sy-subrc <> 0.
          e_error = true.
        ELSE.
          CALL FUNCTION 'JOB_CLOSE'
               EXPORTING
    *               EVENT_ID                    = IC_WWI_WORKPROCESS_EVENT
    *               EVENT_PARAM                 = V_EVENTPARM
    *               EVENT_PERIODIC              = 'X'
                    jobcount                    = v_jobcount
                    jobname                     = v_jobnam
                    strtimmed                   = 'X'
               IMPORTING
                    job_was_released            = v_flg_released
               EXCEPTIONS
                    cant_start_immediate        = 1
                    invalid_startdate           = 2
                    jobname_missing             = 3
                    job_close_failed            = 4
                    job_nosteps                 = 5
                    job_notex                   = 6
                    lock_failed                 = 7
                    OTHERS                      = 8.
          IF sy-subrc <> 0.
            e_error = true.
          ELSE.
            DO.
              CALL FUNCTION 'SHOW_JOBSTATE'
                EXPORTING
                  jobcount               = v_jobcount
                  jobname                = v_jobnam
    *            IMPORTING
    *         ABORTED                =
    *         FINISHED               =
    *         PRELIMINARY            =
    *         READY                  =
    *              running                =
    *         SCHEDULED              =
               EXCEPTIONS
                 jobcount_missing       = 1
                 jobname_missing        = 2
                 job_notex              = 3
                 OTHERS                 = 4.
              IF sy-subrc <> 0.
                e_error = true.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
              IF running = space.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
        ENDIF.
      ENDIF.

  • How to trigger a background job from BADI method.

    hi friends,
    i need to trigger a background job from the badi method CHANGE_AT_SAVE for the BADI BOM_UPDATE.
    for this i think i need to create an event which i should give with parameters during job creation.
    can you pls help me solve this issue.
    thank u all.

    Hi Saravanan,
    Here is an example of what you have to do.
    Regards,
    Eric
    Reward any helpful sugestion.
    *&      Form  generar_job
    FORM generar_job .
    Generar Variante
      PERFORM generar_variante.
      w_fecha = sy-datum + 3.
      CALL FUNCTION 'DATE_COMPUTE_DAY'
        EXPORTING
          date = w_fecha
        IMPORTING
          day  = w_weekday.
    Si la fecha cae en sabado o domingo se debe continuar el lunes.
      CASE w_weekday.
        when '1'.
          ADD 2 TO w_fecha.
        WHEN '6'.
          ADD 2 TO w_fecha.
        WHEN '7'.
          ADD 1 TO w_fecha.
      ENDCASE.
      w_jobname = 'ZQM_CIERRE_LOTE_INSPECCION'.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobgroup         = 'QUEUE'
          jobname          = w_jobname
        IMPORTING
          jobcount         = w_jobcount
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'JOB_SUBMIT'
          EXPORTING
            authcknam               = sy-uname
            jobcount                = w_jobcount
            jobname                 = w_jobname
            report                  = 'ZQM_CIERRE_LOTE_INSPECCION'
            variant                 = w_var
          IMPORTING
            step_number             = w_stepnum
          EXCEPTIONS
            bad_priparams           = 1
            bad_xpgflags            = 2
            invalid_jobdata         = 3
            jobname_missing         = 4
            job_notex               = 5
            job_submit_failed       = 6
            lock_failed             = 7
            program_missing         = 8
            prog_abap_and_extpg_set = 9
            OTHERS                  = 10.
        IF sy-subrc EQ 0.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount             = w_jobcount
              jobname              = w_jobname
              sdlstrtdt            = w_fecha
              sdlstrttm            = w_hora
            IMPORTING
              job_was_released     = w_rel
            EXCEPTIONS
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              OTHERS               = 8.
          IF sy-subrc EQ 0.
            IF w_rel EQ 'X'.
              WRITE:/ w_jobname, 'FUE LIBERADO. VER SM37.'.
            Guardamos los destinatarios
              PERFORM destinatarios_job.
            Guardamos la información a utilizar al ejecutar el job
              PERFORM guardar_datos_job.
            ELSE.
              WRITE:/ w_jobname, 'NO FUE LIBERADO'.
            ENDIF.
          ELSE.
            WRITE:/ w_jobname, 'NO FUE CERRADO'.
          ENDIF.
        ELSE.
          WRITE:/ w_jobname, 'NO FUE ENVIADO'.
        ENDIF.
      ELSE.
        WRITE:/ w_jobname, 'NO FUE CREADO'.
      ENDIF.
    ENDFORM.                    " generar_job

  • Thru MEB4 the Tax amount and Tax percenatage not trigger in Background Job

    Hi,
              When I am executing the T.Code- MEB4 (Rebate Settlement) thru Foreground the Vendor Rebate Amount and Tax are showing.
                                      When I am executing in Background job the Tax amount and Tax Percentage are not triggering (Only the Rebate amount only showing) after execution of Background job in when viewing the job display.
                       Background Job Name: RWMBON01.
       Please suggest.

    Shankar,
    Thanks for reply.
    If I don't put amount in the basic data tab( MIRO) then it does not allow to "simulate" or "Post". But here I can simulate and Post
    I check every thing in WHT Config but I could't found the solution.
    I want to tell another thing, we recently went to patch upgrade from Version 4.7 E  SP 22   to 4.7 E  SP30.
    My question, Is the pacth upgrade affects in anyway???
    If any suitable answer appreciatable.
    Thanks once again for your reply.

  • Trigger a background job immediately after a file is placed in App Server

    Hi all,
    I have a program  ZPGM1 that needs to be executed in background when a file is placed in an application server.
    I know i can schedule  ZPGM1 to trigger in background after an event say ZEVENT1.
    Also i know i raise the event ZEVENT1 using FM BP_EVENT_RAISE but my problem is who would raise the event.
    The file is being dropped in application server at random time by 3 party vendor. I need to execute my ZPGM1 immediately after the file is placed in Application Server.
    Is ther a way that this can be achieved. Let me know
    Thanks
    Kajol

    You will need to develop a custom, non-SAP "listener" program or a script. This program/script will need to check if the file is present (e.g. by using an OS-level event) and, if so, start SAPEVT.EXE program with corresponding parameters.
    SAP Help on raising events externally:
    http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/frameset.htm
    There is also third-party software available, but it is very expensive:
    http://www.redwood.com/

  • Background job on change of some field!!

    HI
    i have to trigger a background job on change of some field value (status field chages it's values from w to U).
    so how to go about the same..
    how to call a background job once some fields changes!!
    regards
    Gunjan

    1. You can use JOB FM's to invoke the job.
    2. You can call the FM ( Background execution program ) in background.
    CALL FUNTION .... IN BACKGROUND.
    Regds
    Manohar

  • Schedule background jobs at OS level.....

    Hi All,
    Scheduling Background Jobs at SAP Level is a very simple task. Is there any way to schedule background jobs at OS level? Please lemme ASAP....
    Thanks
    Rhishabh

    Hi Rhishabh,
    Actually we can not completely schedule background at OSLevel but we can trigger a background job which has alreadyscheduled by using sapevt tool syntax as follows.
    sapevt <event name> nr=<instance name> name=<host name>
    or we have tool like
    In unix you use crontab.
    We can use different job scheduling softwares like IBM TIVOLI software MAESTRO JOB SCHEDULING CONSOLE, Control M
    Regards,
    Kiran M

  • How to submit a program after completion of a background job

    Hi Experts,
    I have a small issue. In my report program i am calling one transaction using call transaction it will trigger a background job. After completion of this background job i need to submit another program, Because the background job updating few values, using this value only the second program functionality will works.
    Currently when i execute my report its calling 1st program and triggering the background job. Once the job started again the program triggering the next program. Here after competion of the background job only this program should submit next program. Anyone kindly suggest some clue.
        CALL TRANSACTION 'ZSAPRCK60' USING    zbdcdata
                                OPTIONS  FROM g_s_options
                                MESSAGES INTO msg_tab.
    SUBMIT SAPRCK10    VIA SELECTION-SCREEN
                        WITH kalaid = p-kalaid
                        WITH kaladat = sy-datum
                        WITH PARALLEL = 'X'
                        WITH SERVNUM = '10'
                        WITH backgr = 'X'
                        AND RETURN.
    Mohana

    Hi,
    There is one function module there which gives you the job status .. if the job is finished then the value will be 'F'.I don't exactly remember the FM but then you can search with BDLSTATUS or BDSTATUS in SE37..
    do.
    call fm BD****STATUS
    IF STATUS (IMPORT PARAMTER) eq 'F'.
    exit.
    endif.
    enddo.
    Regards,
    Nagaraj

  • Initiating Background Job in R3 through XI

    Hi,
    I have an important issue here. How to initiate a background job in R3 (ABAP object) through XI.
    Thanks in advance,
    Bhanu P R Gattu

    Hi Bhanu P R Gattu !
    You can have XI to execute a custom R3 RFC (rfc adapter receiver). That custom RFC could trigger the background job.
    You will need to define what event triggers the whole scenario..e.g. File-XI-RFC?
    Regards,
    Matias.
    ps:please award points if helpful

  • Trigger mail for cancelled background jobs scheduled using SM37

    Dear Experts,
    My requirement is to trigger email whenever a job gets cancelled in background.
    For this I have already tried creating a workflow using BO BPJOB for event ABORTED.
    But for some reason the event is never getting triggered.
    I tested executing the workflow from tcode SWDD, it was running successfully, which means that there is no issue with my workflow.
    Now I want to resolve the above issue   OR
    I want to raise the event manually from the program through some BADI or Exit.
    But I didn't find any BADI or Exit for tcode SM37. Can anybody let me know if any.

    Hi,
    Please refer the below links.
    Workflow- Background job fail
    Re: Send mail when job fails
    Regards
    GK.
    Moderator message: please do not post just links without any further explanations.
    Edited by: Thomas Zloch on Sep 20, 2010 11:53 AM

  • Inbound IDoc creating background job even for trigger immediately setup

    All,
    I have a very serious problem in our production system.
    Scenario:
    Vendor is chagend in system A (Outbound) and the same is interfaced to System B (Inbound) and i am using trigger immediately option, but still I am seeing a background job is created for 'RBDAPP01' and creating the spool request. The issue is I am sending 1000 of idocs and the spool number is increasing daily in system B.
    So, can any one explain me why the background job is getting triggered even though I set the partner profile settings as 'Trigger Immediately'.
    The above issue is not happening in our quality system it simply updagtes vendor information in system B with out creating any background job. Please note that the same settings are maintained in both the systems.
    Your immediate inputs are really valuable for me.
    Regards,
    Suman

    This is an performance issue on the receiving system. In case the system does not have enough resources to process the IDoc immediately it will always schedule a background job to ensure the processing of data.
    You need to check whether the system has enough work processes available during the time when 1000 of IDocs are received or send the IDocs in packages with some time in between.
    Regards,
    Kai

  • Tcode MIGO Background Job Not working

    Hi All,
    I am facing problem in TCode : MIGO for Background JOB of BDC Program with below details,
    CALL_TRANSACTION MIGO returncode: 1,001  RECORD:          0
    MIGO                 017 S
    The front end is not suitable for the transaction (see long text)
    DC                   006 S
    Control Framework: Fatal error - GUI cannot be reached
    00                   341 A
    Runtime error RAISE_EXCEPTION has occurred
    Please let me know above error what needs to be done.
    Thanks in Advance,
    Mahesh Devershetty

    I am facing the same problem while calling MIGO from RFC
    CALL_TRANSACTION MIGO returncode: 1,001 RECORD: 0
    MIGO 017 S
    The front end is not suitable for the transaction (see long text)
    DC 006 S
    Control Framework: Fatal error - GUI cannot be reached
    00 341 A
    Runtime error RAISE_EXCEPTION has occurred
    BDCMSGCOLL Returns the following :
    TCODE                   MIGO
    DYNAME               SAPLMIGO
    DYNUMB               0001
    MSGTYP               A
    MSGSPRA            E
    MSGID                  00
    MSGNR                341
    MSGV1                RAISE_EXCEPTION
    please help me as soon as possible
    giving thanks in advance
    goutam roy

  • 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 ?

  • Trigger substitution rule for a background job

    Hi all,
    I ve written a subroutine in Substitution rules for FI in GGB1 tcode for F110 transaction to replace the section code (bseg-secco) while posting a fi document.
    but the substitution rule is not getting triggered as F110 runs a background job to post the document...
    The substitution is active and the activation level is active all the time.
    Could u please suggest how to get it triggered for a background job...

    Measuring External Processes
    Use
    The runtime analysis allows you to switch into work processes that are already running and to measure the runtime of dialogs running in them as though they were running in the current session. You can have up to ten external sessions, which may be of any type – for example, dialog, update, or spool. This runtime analysis variant is ideal for monitoring long-running background jobs.
    Filename and Directory
    If you do not want to use the default filename and directory to store files, you can change them using the profile parameter abap/atrapath. If the profile parameter does not contain an entry at all, an error occurs when you start the runtime analysis.

Maybe you are looking for