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

Similar Messages

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

  • To Display Output in Grid ALV with change of some field display total with

    Hi Masters,
    I m working on ALV in which  i have to display output with the following format.
    Header
    "Some String"                                                             date/time                                                                               
    User:XYZ01       page 1 
    Line
    1st field    2nd    3rd     4th       5th   6th    7th   8th   9th  10th field
    x               y       z        A        B     C       D     E      F       G
    BLANK..............................................................................                            
                          "total 3rd+4TH"           P        Q     R      S        T       
    same thing for every change of 4th field .
    So the problem is with inserting the line with string "Total of 3rd+4th" in the output .
    Can Anyone help me out?
    Thanks ,
    Varlani Amit

    Hi,
    Use control-break statement ON-CHANGE for the 4th field, and do the changes.
    regards,
    sri

  • Scheduling periodic background jobs with changing parameters

    Greetings,
    I am wondering if anyone knows a way to do the following:
    Say I have a report that I want to schedule in the background to run at the end of every month.  Is there a way to set up the jobs to use different parameters (dates, etc.) each month without creating a variant for each month and scheduling the jobs separately?  I hope that I am being clear in this question. 
    Another example would be if I wanted to run the report each day for the previous day.  As you can see, it would be quite tedious to create a variant and manually scheduled job for each day.
    Thanks in advance for any help or tips.
    Geoff

    Yes, when setting up your variant, you can pull in "dynamic" variants. 
    At your selection screen, click go to,  variants, save as variant. Name it and give description. 
    Now for you particular field, check the "selection variable" check box for that field.  Now at the top of the screen, click the selection variable button.  This will take you to a new screen.  Here you can choose to get the variable from the TVARV table, use a dynamic date calculation, or user defined.
    In the case where you want to run for yesterday.  Double click the icon under the "D", now click the down error.  Double click current date -/+ ???,  enter the -1.    Now click save.  This variant will now always take sy-datum - 1 and put it into that field. 
    Now for your monthly report.   What we do here is we have variables set up in the TVARV table, which include current fiscal month, current calendar month, previous fiscal month, and so on.  We run a program which re-calculates these variables everyday so that they are always accurate.  You can set up the selection variable to use the table variable from TVARV.  You would do this the same way as the dynamic date calc except click on the icon under the "T".
    Regards,
    Rich Heilman
    Rich Heilman

  • USMM report showing some Background job, which not in SAP

    Sir,
    I took USMM report from SAP PRD system for audit purpose.  Everything is fine , expect some background job. There showing some background job finish on 01.04.2013. But I don't find any background job in SM37 which showing finish in USMM report. Please suggest what to do. Following are the background Job..
    0000 Measurement Extensions Finished on 01.04.2013 at 12:55:30
    0001 ABAP Workbench Finished on 01.04.2013 at 12:55:44
    0002 Mobile Engine Finished on 01.04.2013 at 12:55:24
    0009 Activity Checks Finished on 01.04.2013 at 12:56:55
    0100 mySAP Human Resources Finished on 01.04.2013 at 12:55:26
    0101 SAP HR e-recruitment Finished on 01.04.2013 at 12:55:24
    0200 mySAP Banking Finished on 01.04.2013 at 12:55:25
    0250 Financial Services Loan Management Finished on 01.04.2013 at 12:55:25
    0300 mySAP Healthcare Finished on 01.04.2013 at 12:55:25
    0400 mySAP Utilities Finished on 01.04.2013 at 12:55:26
    0500 mySAP Telecommunications Finished on 01.04.2013 at 12:55:26
    0600 mySAP Insurance Finished on 01.04.2013 at 12:55:26
    0700 mySAP Public Sector Finished on 01.04.2013 at 12:55:26
    0730 mySAP Public Sector Campus Finished on 01.04.2013 at 12:55:26
    0800 mySAP Oil & Gas Finished on 01.04.2013 at 12:55:26
    0900 mySAP Engineering & Construction Finished on 01.04.2013 at 12:55:27
    1000 mySAP Aerospace & Defense Finished on 01.04.2013 at 12:55:28
    1100 mySAP Automotive Finished on 01.04.2013 at 12:55:28
    1201 SAP Financial Supply Chain Management Finished on 01.04.2013 at 12:55:26
    1215 SAP FSCM Credit Management Finished on 01.04.2013 at 12:55:27
    1500 mySAP Retail Finished on 01.04.2013 at 12:55:26
    1550 BI Accelerator Finished on 01.04.2013 at 12:55:27
    2100 SAP Records Management Finished on 01.04.2013 at 12:55:28
    2200 ICM Incentive and Commissions
    Management
    Finished on 01.04.2013 at 12:55:27
    2320 SAP Exchange Infrastructure Finished on 01.04.2013 at 12:55:29
    2600 SAP Exchange Infrastructure Adapter Finished on 01.04.2013 at 12:55:29
    6000 mySAP Financials Real Estate Finished on 01.04.2013 at 12:55:28
    7100 mySAP Financials Corporate Finance
    Mgmt
    Finished on 01.04.2013 at 12:55:28
    7500 Third-Party CAD Integration Finished on 01.04.2013 at 12:55:29
    7550 SAP Learning Solution Finished on 01.04.2013 at 12:55:30
    8020 Recipe Management Finished on 01.04.2013 at 12:55:29
    8030 Catch Weight Management Finished on 01.04.2013 at 12:55:28
    8040 RBD Tool Finished on 01.04.2013 at 12:55:29
    8050 Bex Broadcaster Finished on 01.04.2013 at 12:55:28
    Thanks & Regards,
    Nabin Chatterjee

    Hi,
    You will get the list of background jobs in SM37.
    It seems that these jobs are not being scheduled by your user ID.
    In username field use * and check on the desired job statuses and use the date from and to on which you want to see the jobs.
    Screen shot is also attached for your reference.
    Regards,
    Siddharth Khandelwal

  • How to schedule a background job in realtime

    Hi,
    Can you tell me how to schedule a background job in realtime.
    give some example scenerios in scheduling the background jobs in realtime.
    Thanks.
    sam.

    And also.....
    There are two ways for you to handle,
    one manually setting up the job through SM36 which is better and convinient,
    secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
    Find below steps in doing both:
    Procedure 1:
    1. Goto Trans -> SM36
    2. Define a job with the program and variant if any
    3. Click on start condition in application tool bar
    4. In the pop-up window, click on Date/Time
    5. Below you can see a check box "Periodic Job"
    6. Next click on Period Values
    7. Select "Other Period"
    8. Now give '15' for Minutes
    9. Save the job
    Procedure 2 via Program:
    Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
    L_RELEASE(1) TYPE c.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    JOBNAME = 'ZTEMP2'
    IMPORTING
    JOBCOUNT = P_JOBCNT
    EXCEPTIONS
    CANT_CREATE_JOB = 1
    INVALID_JOB_DATA = 2
    JOBNAME_MISSING = 3
    OTHERS = 4.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
    TO SAP-SPOOL WITHOUT SPOOL DYNPRO
    WITH DESTINATION = 'HPMISPRT'
    WITH IMMEDIATELY = SPACE
    WITH KEEP_IN_SPOOL = 'X' AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    JOBCOUNT = P_JOBCNT
    JOBNAME = 'ZTEMP2'
    STRTIMMED = 'X'
    PRDMINS = 15
    IMPORTING
    JOB_WAS_RELEASED = L_RELEASE
    EXCEPTIONS
    CANT_START_IMMEDIATE = 1
    INVALID_STARTDATE = 2
    JOBNAME_MISSING = 3
    JOB_CLOSE_FAILED = 4
    JOB_NOSTEPS = 5
    JOB_NOTEX = 6
    LOCK_FAILED = 7
    INVALID_TARGET = 8
    OTHERS = 9.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Hope the above helps you.
    ***********reward points,if found useful

  • How to retrive the deleted background job !

    Hello Friends,
                  I accientaly deleted a background job.  
    Could any one help to retrive the original job.
    Thanks,
    Senthil

    <b> SMX View background jobs
    SM36  Background Job Scheduling
    SM37  Background Job Monitoring </b>
    <b> Schedule Manager </b>
    Automate your routinue task with Schedule Manager.  It facilitate the definition, scheduling, execution, and review of tasks that are executed on a regular basis, such as period-end closing.
    <b> SCMA</b>  - Schedule Manager
    Checking your program Background Job Status
    Checking  your job status with SM50 (processor type BTC) is more accurate then SM37.  SAP updates the tables TBTCO wheneveryour background jobs status change.  If SAP is shutdown, the currentjobs might not be update ontime to the table. ( e.g. a background job wasshown as Active (SM37), in fact it real status should be Cancelled.
    The type of work process:
    DIA  - work process for executing dialog steps in user transactions
    UPD - update process for executing U1 (time-critical) database changes
    UP2  - update process for executing U2 (non-critical) database changes
    ENQ - for setting and releasing locks on SAP lock objects
    BTC  - for executing background jobs
    SPO  - for spool formatting processes
    PID:  Process ID of the work process.
    regards
    vinod

  • Some background jobs not shown in SM37

    Dear Friends,
    Some of my background jobs are not shown or visible in SM37. But, it is available in TBTCO, TBTCP & TBTCS tables. These jobs are scheduled in daily basis. These tables having records for all days of missed jobs.
    I dont know, why it is not comming in SM37. I tried in many search parameters in SM37 like prog. name, date and so on.
    These missed background jobs are not comes in spooler (SP01) also.
    Kindy, suggest me to find out the missed background jobs.
    Thanks in advance
    Regards,
    Rajagopal
    Chennai - INDIA.

    Hi rajagopalan,
    Normally this should not happen. Make sure the following in sm37:
    a. The start date is :  01.01.1800
    b. The end date is : 31.12.9999
    c. All the checkboxes (six checkboxes) are ticked.
    d. username = your username
    e. jobname = *
    SM37 gets records from the view V_OP (containing TBTCO and TBTCP)
    and filters for username using the field SDLUNAME.
    So you can basically cross-check if the count is atleast correct or the jobs were of different user (fieldname in the view/table) etc. (From SM37, you can export to excel and check the count)
    regards,
    amit m.

  • Delay in background jobs..Need some info

    Hi experts,
    We have a background job scheduled for every 2 hours in our system.But this job is going to delay state intermittently and not getting triggered at the right time.Could anyone tell the reason for the same and let me know the transactions I have to look in .
    Regards,
    Srikanth.

    >
    Thomas Zloch wrote:
    > Oh I thought you were picking on me, so I picked back. Never mind if I got that one wrong
    > Thomas
    No pickiness intended. I simply meant that there may be some authorization issues with changing the priority of a job. But basis should be able to do it.
    Rob

  • Background job not updating data for some steps of program

    We have created a custom program and submitting the standard program RPRCCC_READ_KR1025
    which is used for conversion of AMEX credit card files.
    Since this program can update data for 1 company id at a time,we have created a background job
    for that program with 10 steps and 10 variants of data related to 10 different company codes.
    when this job is executed it is not updating data for all the 10 files , sometimes it updates 5,7,etc...
    If we execute the other files which didnt update in job manually they are getting updated.
    All the files executed with that program can be seen in PRTA transaction.
    Regards,
    Gautham.
    Edit: Solved.
    Since the standard program updates the database every time with commit work
    there should be some time until the next database update,so we can use wait command
    after the submit statement which will do the trick.
    Edited by: Gautham Vangaveti on Aug 5, 2010 7:20 PM

    Hi,
    I mean B(Sub Assembly)
    Item Rollup Flag
    A No
    --B                       Yes
    ---B1 No
    ---B2 No
    ---B3 No
    --C                      Yes
    In this case when we run cost rollup by giving item A, Oracle will consider below structure.
    A
    --C
    Regards,
    Sarvottam.

  • Background job executed as SAP*, need advice to change owner.

    Hi all,
    I'm facing an issue where my SAP background job currently has 2 job "SAP_CCMS_CPH_REORG" and "SAP_CCMS_CPH_HRCOLL" under the ownership of sap. I would like to move them away from SAP ID.
    I have tried to recreate the job using sm36 (and using my ID with sap_all profile) in testing environment, but it not seem to work.
    Highly appreciates any advices and/or pointers with regards to the above mention question.
    Thank you.

    Hi all,
    Thank you for the reply but I have forgotten to add a few updates.
    The issue is that I can change owner from SAP* to my ID with sap_all profile.
    But, after execution,
    Job with sap* owner ended successfully, with spool status marked as completed.
    whereas
    Job with my ID as owner ended successfully, but spool status marked as "waiting"
    error mesage:
    Description          Value
    Status:              Frontend unavailable
    Last event:
    Message:             Request on hold
    Date:                19.02.2009
    Time:                11:57:28
    Job status:          On hold
    Error class:         Delayed
    Area:                Data transfer
    Printout:            Not printed
    Apologies for the inconveniences caused.

  • Class (Priority) change in the background job

    Hi,
    We have a program which will pick up the file from application server and will submit to one more background job by using JOB_SUBMIT. Whenever the automatic background job has submitted from another program, by default it will take the class (priority) as 'C'. Is there any way to change the priority level from C to A throuhg JOB_SUBMIT i.e changing to higher level.
    Please let me know.
    regards,
    Chandra
    null

    (1) Keep in memory that class "A" job must be reserved for system
    (2) Nevertheless
    The class is hard-coded in JOB_OPEN:
    * Jobklasse setzen / NEWFLAG auf 'O'(Open) setzen
    * (der Workflow-Job 'SWWDHEX_' bekommt immer Jobklasse A).
    * Weiterhin bekommt ein spezieller Einplaner immer Jobklasse A
    * wg. der Archivierung auf Datenbankhosts (->F.Hoffmann).
      IF ( JOBNAME EQ 'SWWDHEX' ) OR ( CALLING_ABAP EQ CENTRAL_ADK_ABAP ).
         GLOBAL_JOB-JOBCLASS  = BTC_JOBCLASS_A.
      ELSE.
         GLOBAL_JOB-JOBCLASS  = BTC_JOBCLASS_C.
      ENDIF.
    You may look at function modules BAPI_XBP_JOB_OPEN, BAPI_XBP_JOB_ADD_ABAP_STEP and BAPI_XBP_JOB_CLOSE.
    (documentation at <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/edab9790-0201-0010-479a-98fcc7ebc7bd">External Interface for Background</a>)
    Regards

  • Background job downloading missing some rows in sm37

    Hi,
    I am downloading background job output through spool request in excel format. Out of 2000 records some 50 records in the middle are not displayed.But those 50 records are there in the spool output.
    When downloaded in text format means all 2000 records are downloaded correctly..
    Give me a solution please...
    Thanks and Regards,
    Jenifer

    Jenifer,
    When you download a spool in "Spreadsheet", SAP really downloads the data in tab delimited text format, even thought the file extension is .XLS.
    So, just open the Excel file in notepad (or any other text editor) and see if the missing rows are present. If there are, then you have to figure out how to import the file properly into Excel file without losing the rows.

  • How to change file type when exporting a report with a background job

    Hi,
    I've set up a background job in SM36 to execute a SAP Query I've created, set to send the results as a file to an external email address. When it arrives the file is a .htm (and it seems to cut out after a few pages of data), but I'd like it to export as a .xls, .txt or .csv.
    I've checked the job, the query and my user settings, but I can't find where the change the file extension used - can anyone please tell me how to do it?
    Thanks,
    Tim

    Hi Shiva,
    Can you please confirm where in SQ01/2 the file path information / settings are?
    Thanks,
    Tim

  • Some records are missing in the mail, when scheduled a background job.

    There is a Z report,  which will display some details from SD, MM , WM every day , and the same thing need to be mailed to the user through background Job.
    Issue is that spool is correct and it is missing some records ( Billing due list ), even internal table have records and displayed in the spool , in the mail it says
    “No Entries Found”.
    Is there any chance of debugging background job.
    Good thing is that when executed in foreground it is working fine. Both mail and report display.

    EM_BODY = '4) VF04 -- Processing Billing document due list.'.
      APPEND EM_BODY.
      EM_BODY = ' '.
      APPEND EM_BODY.
      IF IT_FINAL3[] IS INITIAL.
        EM_BODY = '        No Entry Found'.
        APPEND EM_BODY.
        EM_BODY = ' '.
        APPEND EM_BODY.
      ELSE.
        CONCATENATE 'Delivery No' 'Created By' 'Created On'
                     'Reason' INTO HEAD SEPARATED BY '     '.
        EM_BODY = HEAD.
        APPEND EM_BODY.
        EM_BODY = ' '.
        APPEND EM_BODY.
        CLEAR V_TEXT.
        CLEAR ITEM.
        LOOP AT IT_FINAL3.
          CONCATENATE IT_FINAL3-VBELN  IT_FINAL3-ERNAM IT_final3-ERDAT
                      IT_FINAL3-RESO INTO ITEM SEPARATED BY '     '.
          V_TEXT = ITEM.
          EM_BODY = V_TEXT.
          APPEND EM_BODY.
        ENDLOOP.
        EM_BODY = ' '.
        APPEND EM_BODY.
      ENDIF.
    This is the part where it is failing, where it_final3[] is initial.
    but whereas in the spool i can view those records.

Maybe you are looking for