In background job  how commit & rollback work works?

Hello Friends,
     My requirement is, to fetch all sales order items based on some condition and load them into one table say OCC1 in job J1. Now the second requirement is to upload the job information J1 with job name, user name, end date in second table say OCC2 in job J2.
     My question is if there is some error I found while processing job 2 I have to rollback entire work which means I have to remove all records those I have inserted in to table OCC1. Can any one suggest me how to handle such problem? Some how I am able to create two job and update the tables. However, what about rollback work? Whether there is an implicit commit work after every background job? I am working on SAP 4.6C version.
Thanks,
Amol C.

I think by using just ROLL BACK work it will not rollback your first job's data.
You need to make some mechanism which can delete the data from OCC1 if the J2 got error.
Regards,
Naimesh Patel

Similar Messages

  • Background jobs (how to manage)

    Hello,
    We recently had e-mail enabled in our system so we can send items directly to employees via outlook for workflow items.  I'm trying to get some standard SAP programs to be able to run once a night and e-mail me the results, but I'm not sure the best way to handle this.  I've been able to do this for 'Z' reports we've written ourselves.
    An example would be to run transaction SM37 to pick up any jobs that are 'cancelled' or 'active' so I can monitor any issues with a nightly e-mail instead of running the program manually every day.  Since this cannot be run in the background, is there a similar program that can be run to monitor this?
    Another example is the workflow report 'Work Items Without Agents' (transaction SWI2_ADM1), but when I run it in the background, no data appears.
    I know it's not that difficult to run SM37, but when I want to monitor several standard programs it adds up to time I just don't have right now since we just went live with an upgrade a couple of weeks ago.
    Thanks in advance for any advice,
      Jonathan

    Hi Jonathan,
    CCMS should be setup to report on any failed jobs. The only thing you might have to update are the settings to generate an email.
    So CCMS is probably a better place to look for a solution than SM37.
    Hope that helps.
    J. Haynes
    Denver, CO

  • Background job , how we set report width

    Hello,
    when i run a report in background, 'Background Print Parameters' window appears. Here i see various values filled default. Like a name in Spool Request -- Name. Report page -65. Report width --450.
    How is Report width set = 450.
    Can you please explain this to me.
    regards

    ok SAMANAT one more query how do 'NAME' is filled under tab 'Spool Request'.
    regards
    Message was edited by: Surpreet Singh Bal

  • Schedule background job for working days

    Hi,
    I would like to schedule a background job, but only runs on working days (from Monday to Friday), I am wondering whether it is possible to run as mentioned or not?
    Kindly advise!
    Thanks!!
    br,
    hy

    hi
        F9 - > click date/time, after the at operation mode tab, there is an arrow mark, click it, in taht mention your factory calendar id (which includes public holidays and specify from which workday it should start, time), then check and come back to the main screen, check periodic job, click the periodic values tab, in that specify it as daily...will solve your requirement
    if helpful, reward
    Sathish. R

  • How to find out background job type

    how to find background job type.all back ground work processes are in wait stutus.but the background jobs are didn't active.then what we will do

    if your background jobs do not start running while you have still enough background workprocesses (do i read your question right?) check the following:
    start one of the jobs or any report you know and proceed it in background mode. open a new mode and check in sm66 or sm50/51 whether your programm is running. if yes, you had a temporary problem which is no longer there. if no, do further analysis. check in sm21 if there's errors recorded. check the dev_w* files in AL11, depending on what you found out up to that point, a quick peek in other dev_files cannot hurt. anything significant? search SAPNet for clues ...

  • How to run the program in background job,program should run in 3 days.

    Dear Gurus,
    i have a program , that program should run approximately 3 days to get the result.
    i scheduled this program as a background job.
    how can i run sto5 t-code for this same program.
    i that case how we can trace the output.
    Experts please help me out.
    Thank u very much.
    Regards
    sudheer

    Hello Sudheer,
    The trace can be set on background jobs by using ST12 transaction. Please make sure that the trace is activated for only few minutes in production environment.
    Contact your basis team to activate trace on background job and the transaction used is ST12.
    Thanks

  • Schedule Background Jobs

    Hi
    Gurus
    What is Schedule Background Jobs and whatu2019s the use of Schedule Background Jobs
    How it will worku2019s
    Please give me detail Information about Schedule Background Jobs
    Many Thanks
    Mahi

    Hello Mahi,
    The BackGround job - "Program" thats runs in SAP Server and not depend any user interface.
    like Antivirus program on your local station that runs (scaning your computer all the time)  without any user interface (becide tray Icon) and unless you going to Running Proccess on your computer you don't know that it working.
    Schedule BackGround Job its any backGround Job that you schedule to run any time you want and you can make it run recursivly.
    you can go to Transaction SM36 to schedule your Programs.
    Good Luck
    Eli Steklov
    Please Reward Points if it Helped

  • Background job results into hard disk.

    Hi all
    Can you solve my problem.
    How I can transport my Background job results to hard disk.
    I create background job for transaction mb52 and I need to transport result's automatically to my hard disk.
    Is there any simple way to solve this problem?
    I create a hard disk printer,but it dosen't work automatically, It work if I print results directly in transaction MB52.
    Or how I can make query which is same info that transaction MB52, What tabels I need to use.
    If I use query by using background job this hard disc printer works.
    Br Tuomo

    There are a FM named C13Z_FILE_DOWNLOAD_ASCII. It has a limitation: only admits 255 characters per record.
    Ex.:
    PARAMETERS: salida LIKE RCGFILETR-FTAPPL
                                              DEFAULT '/usr/sap/home/ftpprd/archivosprd/totales.txt'
                                              LOWER CASE.
    PARAMETERS: salidapc LIKE RCGFILETR-FTFRONT
                                                 DEFAULT 'c:\totales.txt'
                                                 LOWER CASE.
    CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
                          esp1_true  TYPE esp1_boolean VALUE 'X'.
    CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'
      EXPORTING
        I_FILE_FRONT_END    = salidapc
        I_FILE_APPL               = salida
        I_FILE_OVERWRITE    = esp1_true
    *IMPORTING
    E_FLG_OPEN_ERROR=
    E_OS_MESSAGE        =
      EXCEPTIONS
            FE_FILE_OPEN_ERROR  = 1
            FE_FILE_EXISTS             = 2
            FE_FILE_WRITE_ERROR = 3
            AP_NO_AUTHORITY        = 4
            AP_FILE_OPEN_ERROR  = 5
            AP_FILE_EMPTY             = 6
            OTHERS                          = 7.
    Regards.
    Rafael Rojas.

  • I cannot cancel a background job

    Hello,
    I cannot cancel a background job which is running since the last Friday. I use the SM37 transacction but it doesn't stop.
    Can anybody tell me how can I get to stop this job?
    Thanks in advance.
    Regards.

    Hello friend,
    I think these links will help you to stop the job running in back ground,
    How to stop Active Background Jobs
    http://stackoverflow.com/questions/1439033/sap-background-job-hows-it-running
    If your problem still exists revert back to me i will help you.
    Thanks,
    Sri Hari

  • How to deactivate *Schedule Background Job for Work Items with Errors* SWU3

    Hello Guys,
    Can any one tell me how do I DEACTIVATE Schedule Background Job for Work Items with Errors in sap workflow SWU3.
    Currently it is green which I don't want. I want to stop this service.
    Regards
    NK

    Hello,
    You could also just stop the job in tx SM37.
    But why would you want to do this? As a test?
    regards
    Rick Bakker
    hanabi technology

  • How does the LCM rollback feature work in theory?

    Hi
    How does the LCM rollback feature work in theory?
    Let's say
    1. I've Webi report 'x' in QA system
    2. I promote a modified version of webi report 'x' from DEV to QA using LCM. So now I've 'x1' in QA.
    3. I "rollback" this promotion job in LCM. Which means I've get back 'x' in QA system.
    So does this mean that LCM kept a "backup" copy of 'x' in QA (CMS+filestore file backup) before overwriting with the promoted 'x1' from DEV?
    If yes, does it clear the 'x' anytime from QA? (maybe after second iteration of 'x2'?)
    Thanks

    I highly recommend you read the following blog posts that contains straight answers to common questions about the automatic update feature:
    Hello, Adobe Flash Player Background Updater (Windows)!
    Adobe Flash Player Background Updater for Mac is live!

  • Program works but background job for that program fails....

    I have a requirement where I have to collect the details of the purchase order and put the details in XML file format and FTP the XML file to an external third party FTP Server.
    To realize this I developed a report program which follows following logic.
    1)     First I collected the PO details by calling the BAPI BAPI_PO_GETDETAIL1.
    2)     Then using the following link "/people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    I converted these PO details to the XML file format that the third party people accept.
           In the code I used u201CCALL METHOD cl_gui_frontend_services=>gui_downloadu201D and in this process first the XML file is generated and is getting stored on my deskytop.
    3)     Then I called HTTP_SCRAMBLE, FTP_CONNECT, FTP_COMMAND , FTP_DISCONNECT and RFC_CONNECTION_CLOSE.
    This works perfectly well and each time I execute the report the file is getting FTPu2019ed to the third party FTP server.
    Now I tried to schedule a batch job for this and the batch job fails with follwing errors
    02/25/2009 15:08:47 Error in Control Framework
    Message Class  = FES         
    Message Number = 022  
    Message Type   = E
    02/25/2009 15:08:47 Job cancelled after system exception ERROR_MESSAGE 
    Message Class  = 00        
    Message Number = 564  
    Message Type   = A                
    Can some one tell me what is going wrong. My report works perfect in front end but fails if I try to schedule a background job for it in SM36.
    Can you please tell me whatz going wrong with batch job? Any Help is highly appreciated.
    Regards,
    JEssica SAm

    Robert...Thanks for the reply...
    I am using follwing code
    l_xml_size = l_ostream->get_num_written_raw( ).
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            bin_filesize = l_xml_size
            filename     = FILEPATH
            filetype     = 'BIN'
          CHANGING
            data_tab     = l_xml_table
          EXCEPTIONS
            OTHERS       = 24.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Now what changes should i make..where should i store my XML file then instead of my desktop?
    and whih Function Module should i Use..

  • MDVP only working as background job

    Hello,
    I was working on the ATP check when i discovered the only way to actually perform this check correctly was to execute it as a background job. When executing online, the stock is just not committed (even with full confirmation logic set on in the MRP group).
    It only works fine from the planned order.
    Isn't it possible to run MDVP online ??
    Any enlightements on this topic appreciated.
    Olivier

    Hi,
    You can run the availability check in background with program RLD05000. You have to create variant and schedule this program in batch from SM36 transaction, Out out you can check in spool.
    If helps rewards your points.
    Regards
    TAJUDDIN

  • Background Job Hanged but no work process assigned

    Hi,
    Background job has hanged When i see in SM37. But no work process assigned to this job. All work process are waiting status.
    What could be the reason. What is the resolution process.
    Thanks,
    Dayakar

    How did you come to a conclusion that the bg job is hangend.
    What is the status of the job. ? I guess  Job defined, but not yet eligible to run even if the start condition has been fulfilled so it should be in Scheduled status.

  • MDVP only working as a background job

    Hello,
    I was working on the ATP check when i discovered the only way to actually perform this check correctly was to execute it as a background job. When executing online, the stock is just not committed (even with full confirmation logic set on in the MRP group).
    It only works fine from the planned order.
    Isn't it possible to run MDVP online ??
    Any enlightements on this topic appreciated.
    Olivier

    Hi,
    You can run the availability check in background with program RLD05000. You have to create variant and schedule this program in batch from SM36 transaction, Out out you can check in spool.
    If helps rewards your points.
    Regards
    TAJUDDIN

Maybe you are looking for

  • Function in report

    Hi, i created a function in my report, in the ''program unit'' and called that function in the query in data model but getting an error <invalid identifier...>, do you have any idea why this error? any help would be appreciated...Thanks.

  • ITunes app won't open with the new iOS7 update...what do I do?

    Tried opening itunes app, it comes up for a second then closes, not sure what to do...

  • Invoice correction how prices are corrected.

    Dear All, Could anyone tell me,in invoice correction if we over charged a customer and as a term accepted he was to be given discount only on this order. so does that mean,we need to change pricing procedure or is it some other way. Regards, Ashima

  • IW38 collective printing of WO

    Hi, I have a requirement where user selects more than one work order from the list in IW38 transaction and then selects Order-->Print. Now the system is showing the "select shop papers" screen for every order but this is tedious to do when we have mo

  • Search Errors in Addons

    My add-on although I have added the new version, without any errors and after a review, ITS STILL DOESN'T DISPLAY in the Search results see attached for more information https://addons.mozilla.org/en-US/firefox/addon/sinhalasearch-%E0%B7%83%E0%B7%84%