Creating job

Hi Experts,
I am about to create a batch job. I used FM JOB_OPEN, JOB_SUBMIT and JOB_CLOSE. However, whenever I run the program it creates job for every 1 second. It will not stop creating jobs unless you completely exited in the program. The code is not inside the loop.

mariposa,
   Suppose you have 100000 records which is going for dump in background also.
Taht time decided to create a job for every 20000 records.
select * from database table
  into itab
packaze size 20000
where x  =  s_x.
   your functionality here if required and moved to final internal table.
Now  you have to pass this final internal table data to your submit program selection screen.
CALL FUNCTION 'JOB_OPEN'
      EXPORTING
    DELANFREP              = ' '
    JOBGROUP               = ' '
        jobname                = csm_std_reconciliation_job
    SDLSTRTDT              = NO_DATE
    SDLSTRTTM              = NO_TIME
     IMPORTING
        jobcount               = jobcount
EXCEPTIONS
   cant_create_job        = 1
   invalid_job_data       = 2
   jobname_missing        = 3
   OTHERS                 = 4
    IF sy-subrc <> 0.
MESSAGE ID 'CSM' TYPE 'W' NUMBER '045' WITH csm_std_reconciliation_job.
      EXIT.
    ENDIF.
    CALL FUNCTION 'JOB_SUBMIT'
      EXPORTING
    ARCPARAMS                         =
        authcknam                         = sy-uname
    COMMANDNAME                       = ' '
    OPERATINGSYSTEM                   = ' '
    EXTPGM_NAME                       = ' '
    EXTPGM_PARAM                      = ' '
    EXTPGM_SET_TRACE_ON               = ' '
    EXTPGM_STDERR_IN_JOBLOG           = 'X'
    EXTPGM_STDOUT_IN_JOBLOG           = 'X'
    EXTPGM_SYSTEM                     = ' '
    EXTPGM_RFCDEST                    = ' '
    EXTPGM_WAIT_FOR_TERMINATION       = 'X'
        jobcount                          = jobcount
       jobname                           = csm_std_reconciliation_job
    LANGUAGE                          = SY-LANGU
    PRIPARAMS                         = ' '
        report                            = csm_std_reconciler
        variant                           = csmvari
  IMPORTING
    STEP_NUMBER                       =
     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.
MESSAGE ID 'CSM' TYPE 'W' NUMBER '045' WITH csm_std_reconciliation_job.
      EXIT.
    ENDIF.
    strttime = sy-uzeit + timepad.
    CALL FUNCTION 'JOB_CLOSE'
      EXPORTING
        jobcount                          = jobcount
        jobname   = csm_std_reconciliation_job
       sdlstrtdt                         = sy-datum
       sdlstrttm                         = strttime
IMPORTING
  JOB_WAS_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.
      MESSAGE ID 'CSM' TYPE 'W' NUMBER '045'
         WITH csm_std_reconciliation_job.
      EXIT.
    ELSE.
      MESSAGE ID 'CSM' TYPE 'I' NUMBER '104' WITH
          csm_std_reconciliation_job.
    ENDIF.
endselect.
Now for every 20000 records it will create one batch job.
Pls. reward if useful.

Similar Messages

  • Creating Job material using public API from WIP

    Take the entered component part number and search in the WIP job material requirements. This should use a WIP API. If the material is found, increment the quantity. If material is not found, create the job material using public API. (Provide WIP API details)
    The java object, oracle.apps.csd.schema.server .CsdHvWipJobPvtEO is a wrapper to call WIP API. This should be used to create material requirements is this the procedure to create job material Req.
    from OAF how we have to create Job material transaction

    Hi Pat,
    What is your SBO version? I've seen several cases in which the login/connection procedure (both in the client and via DI API) has become much slower after upgrading to SBO 2005.
    Do you experience the same slowness when connecting via DI API in a non-WebService setting?
    I would not recommend using DI API in a web service context in the first place. DI Server would give you a much more robust, stable and scalable infrastructure to build upon.
    Henry

  • Creating Job Order without Assembly Routing

    How can you prevent Users from Creating Job Order without creating routing to the Assembly used
    Regards

    Hi Laxmikant
    Please note the steps
    Create a BOM Application in OS30
    Create a new BOM ID in OS31 with BOM Usage as Production
    Assign this BOM ID in BOM Application
    Ensure that ID is responsible for Production planning alone.
    Then in that ID maintain a BOM alone without any items.
    Assign this BOM Application in Order type dependent parameters in OPL8
    Now u can create a production order w/o BOM
    Rgds

  • Can position be created with out creating Job..

    Hi Experts,
    A simple question but quite complicated.
    Can position be created with out creating the job. ( yes it will give the warning and create).
    Here my actual question comes, what is the need of creating the Job. when we can create position without job in general Scenario.
    Is it compulsory to create job whenever we create position.
    Your replies are highly appreciated.
    Thanks in advance.
    Regards,
    Dollly

    Hi Dolly,
    I definitely aggree with what guru Sikindar mentions.
    One more point:
    SAP advises to create separate positions for each of the employees in your organizational structure.
    For example, there may be a hundred "Engineer" positions in your company (with codes: 50000001, 50000002, ... 50000100).
    At this point, when you're asked to take a report of all of the "Engineer"s in your company, then you need to enter all these position codes into the selection screen : Nearly impossible scenario!
    However, if you had linked all of these positions to a single job named "Engineer" and numbered "50000000", then you would be able to find all the positions linked to this job and all the employees holding these positions by entering a single object ID and evaluation path in the selection screen of a particular report.
    Regards,
    Dilek

  • E-recruitement Error " When creating Job Posting "

    Hello Friends
    We are usinng standard  BSP HRRCF_POST_LST for posting the Job.
    But when after releasing the job i go on th job posting page and when i click on  "CREATE JOB POSTING " button i'm getting the following error.
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    BSP Exception: Internal Error in Business Server Page Runtime.
    Program CL_BSP_PAGE_BASE==============CP
    Include CL_BSP_PAGE_BASE==============CM01B
    Line 91 
    Error type:
    Your SAP Business Server Pages Team
    Can you please suggest what would be the cause of error even it is complete standard BSP.
    Please guide me by your valuable comment.
    Regards,
    Nilesh

    Hello Friends
    We are usinng standard  BSP HRRCF_POST_LST for posting the Job.
    But when after releasing the job i go on th job posting page and when i click on  "CREATE JOB POSTING " button i'm getting the following error.
    I tried to check the error log in ST22 & SLG1 but i found nothing in it.
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    BSP Exception: Internal Error in Business Server Page Runtime.
    Program CL_BSP_PAGE_BASE==============CP
    Include CL_BSP_PAGE_BASE==============CM01B
    Line 91 
    Error type:
    Your SAP Business Server Pages Team
    Can you please suggest what would be the cause of error even it is complete standard BSP.
    Please guide me by your valuable comment.
    Regards,
    Nilesh

  • Problem in creating job

    Hey to all
    I wanted to create a job that shrink my temp tablespace after one week. Due to huge data loading I get filled. When i create job through EM I could not understand where I put Alter tablespace temp shrink space command . For database home page click server click job link and create button under the command section where I put this command. Plz help I tried to this IN Pl/Sql but job fail
    DECLARE
    SQLSTMT VARCHAR2 (500);
    Begin
    SQLSTMT:= ALTER TABLESPACE temp SHRINK SPACE';
    execute immediate (sqlstmt);
    END;

    I would not waste my time on creating such jobs.
    Main reason: they don't resolve anything. You shrink the tablespace and it will definitely start to grow again.
    You are only fighting symptoms. Maybe you want to earn your living out of fighting symptoms, I don't.
    Apart from the the syntax of execute immediate is
    execute immediate &lt;variable&gt;|&lt;hard coded literal&gt;;
    Before asking syntax questions please use the docs (in this case the PL/SQL reference manual) to verify your usage of a construct is syntactically correct.
    Also this line
    SQLSTMT:= ALTER TABLESPACE temp SHRINK SPACE';
    is lacking a '
    Sybrand Bakker
    Senior Oracle DBA

  • JSM - Creating Job Documentation from Job Request itself

    Hi all,
    I am still exploring JSM, and I know its possible to create Job Request (Job Req) from Job Documentation (Job Doc).
    But is it possible to create the reverse (Job Doc from Job Req) ?
    This will be great, if the user is creating Job Req from "Detailed" version (compared to "Basic"), which has similar entries and tabs, as Job Doc.
    I did read somewhere that its possible, but I never find any documentation or SCN/blogs on this.
    Thanks in advance
    Regards
    Shahul

    This was answers below, in the comment area by Volker.
    How to configure SAP's standard Job Request form - Part 2
    Hi Shahul,
    the user triggers the Job Doc creation from within the Incident or Change Request in the JSM assignment block, but then the data from teh Job Request is automatically taken over for the Job Document.
    So starting the creation and pushing the save button is manual work, but the filling out the Job Doc is done automatically.
    Kind Regards
    Volker
    Regards
    Shahul

  • Error creating job in oracle

    I'm having a problem creating a job in oracle . I want at the end of each day to put some values from table1 in table2, empty table1, and then delete and re-create some sequences..because I have auto-increment id and each day I want to sequence to start from 0 again. So long story short I tried creating this job using toad for oracle.
    if I just put the first 2 tasks(put data from table1 in table 2, then delete) in the job it works like a charm. if I also add the drop sequence, create sequence I get an error saying
    Encountered the symbol "DROP" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    so this is what I want the job to do:
    insert into A(a,b,c) select a2,b2,c2 from B;
    delete from A;(so far it would work)
    drop sequence ida_seq;
    create sequence ida_seq
    start with 1
    increment by 1
    nomaxvalue;
    drop sequence idb_seq;
    create sequence idb_seq
    start with 1
    increment by 1
    nomaxvalue;
    so anybody can give me a clue on why I get the error? maybe if someone can give me a link on how to do oracle jobs..cause if I google "oracle+job" I get only jobs(for work) in oracle...but I don't get stuff related to syntax and how to create jobs in oracle. 10x in advance

    If this is a PL/SQL question, then PL/SQL has no 'DROP' or 'CREATE' keywords and you would need to use dynamic SQL with EXECUTE IMMEDIATE.
    btw there are various techniques around for resetting a sequence to start again at 1 using ALTER SEQUENCE, rather than dropping and recreating it.

  • Error creating job into trigger using DBMS_SCHEDULER.

    Hi,
    I am trying to create job using dbms_scheduler package. I have one trigger on insert event on one table. I am creating job using following syntax.
    CREATE OR REPLACE TRIGGER TRG_BI_JOB_CONFIG BEFORE INSERT ON JOB_CONFIG FOR EACH ROW
    DECLARE
    BEGIN
         DBMS_SCHEDULER.Create_Job(job_name => 'my_job1'
                             ,job_type => 'PLSQL_BLOCK'
                             ,job_action => 'delete_temp'
                             ,start_date => TO_DATE('15-JUL-2003 1:00:00 AM', 'dd-mon-yyyy hh:mi:ss PM')
                                  ,repeat_interval => 'FREQ=DAILY'
                             ,enabled => TRUE
                             ,comments => 'DELETE FOR job schedule.');
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END;
    but I am getting following error while inserting into JOB_CONFIG table.
    ORA-04092: cannot in a trigger
    ORA-06512: at "PRAKASH1.TRG_BI_JOB_CONFIG", line 41
    ORA-04088: error during execution of trigger
    same above statement If I am running from sqlplus then It is creating job without error. If I am creating job using DBMS_JOB into trigger then It is also working fine but this package is depricated from oracle10g so I cannt use it any more.
    My Oracle version is 'Oracle DATABASE 10g RELEASE 10.2.0.1.0 - Production'.
    can anyone help me in this context.

    I have a few comments on this thread as an Oracle dbms_scheduler developer.
    - Oracle takes backward compatibility very seriously. Although dbms_job is deprecated, the interface will continue to work indefinitely. The deprecation of dbms_job is so that customers will be encouraged to take advantage of the more powerful dbms_scheduler. It is extremely unlikely that entire blocks of functionality will ever be removed. There is currently no plan to remove dbms_job functionality (and even if there were, doing so would be strenuously opposed by many users).
    - lots of internal Oracle database components are standardizing on using dbms_scheduler (resource manager, materialized views, auto sql tuning etc). This is good evidence that it will continue to be the recommended scheduling method for the foreseeable future - not even the concept of a replacement exists. It is also under active development.
    - The reason for the automatic commit is that a dbms_scheduler job is a full database object like a stored procedure or a table. So a call to dbms_scheduler.create_job is like executing a DDL which takes effect immediately. A dbms_job job is mostly just a row in a table so a call to dbms_job.submit behaves like regular DML. There are many advantages to a job being a full database object but DDL behaviour is an unfortunate requirement of this.
    Hope this clears a few things up, reply with any questions.
    -Ravi

  • HP P1102w don't print - W [16/Aug/2012:08:47:51 -0300] HP_LaserJet_Professional_P1102w: Printer supports Create-Job but not Send-Document operation.

    Sirs,
    I'm trying to print from wirelessy from my MacBook Pro (OS X Mountain Lion) to a P1102w printer without success.
    The error message is:
    W [16/Aug/2012:08:47:51 -0300] HP_LaserJet_Professional_P1102w: Printer supports Create-Job but not Send-Document operation.W [16/Aug/2012:08:47:51 -0300] HP_LaserJet_Professional_P1102w: Printer supports Create-Job but not Send-Document operation.
    The Printer Firmware is 20120130 (HP last version)
    Any hints?
    Regards
    Camilo

    It doesn't share the printer and the Mac can't print

  • How to prevent user from creating jobs

    Hi,
    we need to prevent user from creating jobs on a dev enviorement. It's a 10.2.0.4 database standard on linux 64bits.
    Their schema has only connect and resource roles. Is there a way to prevent them from creating jobs? In 11g it's the CREATE JOB permission, but in 10g i'm not sure how can i do this.
    Thanks for any ideas!

    On 10g it's probably the CREATE JOB as well.
    http://www.oracle.com/pls/db102/homepage
    Alternatively you could:
    alter system set job_queue_processes=0
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams089.htm#REFRN10077

  • Create Job problem

    Hi,
    I like to create job using Scheduler Jobs > Create Job with Command Type Stored Procedure! But the problem is that I can't see (user sys) procedures on schema i wish to create job on! So i can't pick procedure from Search and Select: Procedure values!?
    Is someone know what is the problem?
    Thanks, Kristjan

    OK. It is a "Package" and not a Procedure like you mentioned above.
    So, you have to do a different thing from a normal stored procedure. What you need is to use a Command Type of PLSQL Block
    Assuming the Package TEST_PACLAGE with PACKAGE BODY containing procedure TEST_PROC and is owned by user SYS.
    Select SYS as the owner under General
    Inside the PL/SQL box enter.
    BEGIN
    test_package.test_proc;
    END;
    This should work

  • How to create Job number + Activity

    Hi All,
    I need to create Job nuber with activity for Forecast , In existing jobnumbers it shows some acton in List of actions.. How to create the Action
    Please explain me the use job number and Activty , action .. and how to create .
    Thanks in Advance,
    Regards,
    Chandu

    Chandu,
    1) I think the best book for basics of APO is Supply Chain management with SAP APO by Jörg Thomas Dickersbach . You have to have it
    http://books.google.co.in/books?id=5CA3y7_LY2MC&pg=PA167&lpg=PA167&dq=supplychainplanningAPOdickersbach&source=bl&ots=xuV5qbwq7V&sig=v1UmlBoA3v0T1zvdfOJYngFPaJI&hl=en&ei=9v8MTK2pCM-LkAWUyP3ZDw&sa=X&oi=book_result&ct=result&resnum=1&ved=0CAkQ6AEwAA
    2). try sourcing the SAP SCM certification books
    3). Help.sap.com. I dont think you can find any material more detailed than this
    4). Access SDN and look for wiki and blogs
    5). GOOGLE!!! For instance thsi si something really really useful I found on Google for CIF:
    http://www.valconusa.com/uploads/Managing_SCM_APO_CIF_4x.pdf
    Happy learning!!
    Abhi

  • Creat Job for LSMW (periodical data transfer)- idoc BLAORD

    Hi,
    We are trying to create job for LSMW (thru frame program for periodic data transfer) for idoc BLAORD (Purchasing contract)
    When I am running the job that I created, the job is cancelled and the error is:
    "Upload from front-end is not possible in batch mode.
    Message no. /SAPDMC/LSMW_OBJ_070 020"
    How can I correct that? so I will be able to run a job (the job mast run background?)
    Thanks,
    Tal Sasson

    Hello,
    I was also receiving the same message /SAPDMC/LSMW_OBJ_070 020 even though I specified in /SAPDMC/SAP_LSMW_INTERFACE the server path. The problem was that in LSMW->Specify Files you have to delete the definition of front-end files and define application server files.
    That Flag File (Path and Name) (field /SAPDMC/LSOINP-FILENAME in program /SAPDMC/SAP_LSMW_INTERFACE) is kind of useless since it is ignored anyway and files defined in LSMW object are imported and they have to be read anyway if you use more than one file.
    Regards,
    Peter

  • Scheduler doesn't create Jobs

    Hello folks!
    We have scheduled some reports with BI Publisher Scheduler in our Development Enviroment and works very fine. But when we passed that reports to Prod Enviroment, BI Publisher scheduler doesn't create any Job (verified in Report Job History and XMLP/QRTZ tables in Database Schema that isn't any Job created). There isn't any error, exception or message, only scheduler doesn't create Jobs.
    Any idea, solution or way to find any trail about that problem?
    Thanks for your preciated time spent in our issue.
    Best Regards,
    Martín

    I am also facing same issue with BI Publisher Scheduler but showing below mentioned error while creating new job.
    Error
    "Job submission failed : Error occurred while scheduling the job. org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '-1' and group: 'weblogic', because one already exists with this identification."
    Cheers.
    Vishal

Maybe you are looking for

  • Set document to be seen one page at a time but print four to a page?

    I would like to create a pdf (from a PowerPoint presentation) so that when it is viewed on the web it is seen one page at a time but when it is printed it prints four to a page. It is possible to put that in pdf document settings or do I have to rely

  • Error with JAVA install on WAS 640 AIX Oracle

    Hi All We are running AIX5.1 with Oracle I have successfully installed the ABAP central and DB instances, and am trying to install a JAVA stack. I am getting the following error when installing the JAVA stack: "CJS-00030  Assertion failed: lsnrctl: P

  • Linking to a Portable DVD

    Is there any way to link my macbook pro to a portable dvd player. Would like to play one movie on my macbook and have it show on both screens. Thanks.

  • Hardware Security Modul (HSM) - SAP PI 7.0

    One of my customers want to use a HSM with PI. Did anyone of our partners develop a SAP adapter that supports such an integration?

  • Changing output type in invoice

    Hi All, I need to attach the output type in alraedy processed invoices but as the invoices are in display mode in MIR4 I am not sable to do so. Please advice how to do the same. Thanks and Regards, Manu Edited by: Manu Agrawal on Sep 23, 2008 7:40 AM