FM or a method to abort a batch job

Hi All,
I am looking for a way in which I can abort a background job which is either scheduled or currently running programmatically. Is there a way to do this even if the job currently running is waiting due to either a wait statement or for a response from a RFC.
Immediate Responses would be appreciated.
Thanks & Regards,
Pawan

Hi Rich,
Thanks for your reply.
I have been using this Function Module earlier.
There is a problem using ths FM.
Please see below the snippet of the code I am using to abort the job using the FM 'BP_JOB_ABORT'.
REPORT  yumt_trigger_abort                      .
TYPES: BEGIN OF ty_joblist,
         jobname  TYPE tbtco-jobname,
         jobcount TYPE tbtco-jobcount,
       END OF ty_joblist.
DATA: lv_jobname  TYPE tbtcjob-jobname,
      lv_count    TYPE tbtcjob-jobcount,
      lv_repid    TYPE sy-repid,
      wa_joblist  TYPE ty_joblist,
      lit_joblist TYPE TABLE OF ty_joblist.
CONSTANTS  : lc_jobclass TYPE tbtcjob-jobclass VALUE 'A',
             gc_true     TYPE flag VALUE 'X'.
REFRESH : lit_joblist.
Schedule the jobs
DO 2 TIMES.
  CLEAR:  lv_repid , lv_jobname , lv_count.
  IF sy-index = 1.
    lv_repid = 'YUMT_TRITEST1'.
    lv_jobname = 'YUMT_TRITEST1'.
  ELSE.
    lv_repid = 'YUMT_TRITEST2'.
    lv_jobname = 'YUMT_TRITEST2'.
  ENDIF.
Pass the other parameters and schedule a job.
  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = lv_jobname
      jobclass         = lc_jobclass
    IMPORTING
      jobcount         = lv_count
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.
  IF sy-subrc <> 0.
   MESSAGE s000(zumt_gen) WITH text-007." Background Job Creation Error.
    RETURN.
  ENDIF.
Message to be included in Job description as a step
Background job <JOB NAME> <JOB ID> scheduled.
  MESSAGE s000(zumt_gen) WITH text-002 lv_jobname
                              lv_count text-003.
  CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
      authcknam               = sy-uname
      jobcount                = lv_count
      jobname                 = lv_jobname
      report                  = lv_repid
    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 to be included in Job description as a step
  MESSAGE s000(zumt_gen) WITH text-008. "Background Job Submitting Error
    RETURN.
  ENDIF.
  CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount             = lv_count
      jobname              = lv_jobname
      strtimmed            = gc_true
    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 to be included in Job description as a step
    MESSAGE s000(zumt_gen) WITH text-009. " Background Job Closing Error
    RETURN.
  ENDIF.
  CLEAR: wa_joblist.
  wa_joblist-jobname = lv_jobname.
  wa_joblist-jobcount = lv_count.
  APPEND wa_joblist TO lit_joblist.
ENDDO.
Abort the jobs
WAIT UP TO 2 SECONDS.
CLEAR: wa_joblist.
LOOP AT lit_joblist INTO wa_joblist.
  CALL FUNCTION 'BP_JOB_ABORT'
    EXPORTING
      jobcount                   = wa_joblist-jobcount
      jobname                    = wa_joblist-jobname
    EXCEPTIONS
      checking_of_job_has_failed = 1
      job_abort_has_failed       = 2
      job_does_not_exist         = 3
      job_is_not_active          = 4
      no_abort_privilege_given   = 5
      OTHERS                     = 6.
  IF sy-subrc <> 0.
    MESSAGE s000(zumt_gen) WITH text-010 wa_joblist-jobname sy-subrc.
    " Job Abortion Failed
  ELSE.
    MESSAGE s000(zumt_gen) WITH text-001 wa_joblist-jobname.
    " Job Abortion Success
  ENDIF.
ENDLOOP.
However when the program runs the FM runs successfully for both the jobs but when we check the status of the job in sm36 We see that they are still running.
Thanks & Regards,
Pawan

Similar Messages

  • DOS batch command to call Hyperion workspace reporting batch job

    Hello,
    Is there any method to call the batch job in hyperion workspace for exporting report ?
    i would like to call the job batch by DOS batch. Is it possible?
    thanks
    Gary

    An option is to look at the SDK and see if there is a way for you to make a Java call to do what you are trying to do.
    The SDK is part of the Services Install Package.
    I have used the SDK to make a call to the External Event Trigger.
    You may want to look at the Hyperion Workspace Developer’s Guide
    http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/hs_developer.pdf
    Wayne Van Sluys
    TopDown Consulting

  • Error in CCMS monitoring Batch job SAP_CCMS_MONI_BATCH_DP.

    Hi All,
    I am using a Sanbox system for CCMS Monitoring activities. I assigned a method CCMS_ONAlert_Email under auto reaction to the MTE class ABAP shortdumps on node System errors. So the requirement is when an alert triggered i have to receive an alert email. I just found there is an error in Batch job created for Alert monitoring, please find the error details mentioned below. Please let me know how to solve this error
    Job started
    Step 001 started (program RSAL_BATCH_TOOL_DISPATCHING, variant , user ID NBKIPXP)
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075617',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata1')
    :  ) AS FS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTIONin class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075633',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/log_dir/NO
    :  DE0000/') ) AS FS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075633',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata4/d
    :  b2es1/NODE0000/ES1/T0000003/C0000000.TMP') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata2/d
    :  b2es1/NODE0000/ES1/T0000003/C0000001.TMP') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata1/d
    :  b2es1/NODE0000/ES1/T0000003/C0000002.TMP') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata3/d
    :  b2es1/NODE0000/ES1/T0000003/C0000003.TMP') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata3/d
    :  b2es1/NODE0000/ES1/T0000004/C0000003.UTM') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
      SYSID: ES1
      SY-SUBRC: 1208
      Message: ADBC error
      SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
      E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
      SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata4/d
      b2es1/NODE0000/ES1/T0000004/C0000000.UTM') ) ASFS_CONFIG
      Database:
    caused by
    Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
      Kernel Error ID:
      DB Error: Yes
      SQL Code: 444-
      SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
      B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
      /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
      on code: "4". SQLSTATE=42724
      DB Object Exists: No
      Duplicated Key: No
      Internal Error: 1
      Invalid Cursor: No
      Unknown Connection: No
      Connection Closed: No
    xception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
      Kernel Error ID:
      SYSID: ES1
      SY-SUBRC: 1208
      Message: ADBC error
      SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
      E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata2/d
    :  b2es1/NODE0000/ES1/T0000004/C0000001.UTM') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    :  Kernel Error ID:
    :  SYSID: ES1
    :  SY-SUBRC: 1208
    :  Message: ADBC error
    :  SQL statement: SELECT '20110613075634',0 as DB6PMCF_PARTITION,FS_NAM
    :  E,'T','20110521174003','700',FREE_KB,USED_KB,TOTAL_KB,NUM_IUSED,PCT_IU
    :  SED FROM SYSIBM.SYSDUMMY1, TABLE(SAPTOOLS.DB6PMCF('/db2/ES1/sapdata1/d
    :  b2es1/NODE0000/ES1/T0000004/C0000002.UTM') ) ASFS_CONFIG
    :  Database:
    :caused by
    :Exception CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
    :  Kernel Error ID:
    :  DB Error: Yes
    :  SQL Code: 444-
    :  SQL Message: SQL0444N Routine "SAPTOOLS.DB6PMCF" (specific name "D
    :  B6PMCF") is implemented with code in library orpath "/usr/sap/ED2/SYS
    :  /exe/run/db6pmudf", function "Db6pmcf" which cannot be accessed. Reas
    :  on code: "4". SQLSTATE=42724
    :  DB Object Exists: No
    :  Duplicated Key: No
    :  Internal Error: 1
    :  Invalid Cursor: No
    :  Unknown Connection: No
    :  Connection Closed: No
    Exception CX_DBA_ADBC in class CL_DB6_RDI method GET_SNAPSHOT line 431
    Job finished

    Hi Dinesh,
    Please check the note is applicable for you [Note 978319 - DB6: Incorrectly cataloged table functions|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=978319]
    so please check wheter db2<sid>user has enough permission
    Thanks,
    Jansi

  • How to get batch job o/p in PDF format and automatically saved to xyz loc

    Hi Experts,
    Our requirement is we want output of background job in PDF format and this PDF generated should be saved in some xyz path at OS level.
    Why doing this?: Business don't want hard copy o/p of some batch jobs but only want to save this output in pdf format to some OS location for future use.
    We could achieve above objective by archiving method (but for some reason we cant adopt it).
    So guys please propose solution in detail regarding above problem "how to get o/p in PDF format and automatically get saved to xyz location"
    System : 4.0B
    OS : Windows NT
    Database : Oracle
    Thanks in advance

    Hi guys,
    Thanks guys for your invaluable advise.I asked abaper to use the above report for pdf conversion. But I have another problem that o/p of batch job should come in japanese language but when i check spool or hard copy o/p its not coming in readable form (seems something like machine language) . I dont what is the reason there must be some basis setting to get the batch job o/p in japanese language.
    Please help me.
    thank you

  • Why am getting this ME083 error in BATCH JOB, where as ONLINE not getting?

    Hi Experts,
    Am creating Purchse Requisation by using BAPI ---> BAPI_PR_CREATE.
    If I run ONLINE, Purchse Requisations are creating in EBAN table, with out any erorr messages, fine.
    If the same prog. is scheduled as BATCH JOB in production, the Purchse Requisations are creating, fine, but, there is a ERROR MESSAGE in JOB LOG, saying that " ENTER PLANT " of M essage ID& # is  "ME 083 "
    So, let me know that,
    1 - Why am not getting this error message, If I run it ONLINE?
    2 - Even though there r error message in JOB LOG (as I mentione din the above), Why the Purc. requisations are creating?
    3 - How to track that, from Where this error is coming in BATCH JOB, How to debug the BATCH JOB, after its scheduling?
    4 - How to fix it?

    It is not uncommon for informational/warning messages to appear when a BAPI is run in batch.
    Such messages do not prevent the completion of a job, but may provide information about the status of processing.
    When you run the job online the message may just flash briefly on the bottom of the screen, and you might not even notice it.
    I get similar messages when I run other BAPIs, where the message is logged but the process continues to run.
    To address the question of the message itself, if you look at the code underlying the BAPI, for example, include L2105I01, which contains the methods, you can see the place where the message is issued.
    The message is issued if field PR_TYPE in the header structure is initial.
    This is fairly easy to find just by examining the source behind the BAPI and the methods that it uses.
    You can navigate to include L2105I01 just by clicking on Method process in BAPI_PR_CREATE, just as you can with any other navigable object in ABAP.
    You should see this in BAPI_PR_CREATE around line 108.
    CALL METHOD l_ref_bapi->process( ).
    Double click on process.
    Method renumbering is then called by Method process if the actyp = hin (a constant meaning add/create which is set in BAPI_PR_CREATE), and if ITEM_INTVL (Item number interval) is not initial.
    Double click on Method renumbering.
    Method renumbering then checks if field PR_TYPE is initial, and if it is, then the message 083 that you are getting will be issued.  You will also see that the message is issued as a warning only, which is why the document is still created.
    You can drill down through the code by double clicking, as usual with navigation.
    I found this initially by clicking method set_header, which brought up the include with the method code.  I then searched for 083, which is the message id.  I then backtracked to find out what the path to Method renumbering was.
    Always do a little digging in the source, the message has to come from somewhere.  If the first search does not get a hit, try the next one until you exhaust the possibilities.  I chose set_header, since it appeared to be specific to the function of the BAPI, and something like that will usually be the best place to start.  In this case, it took me right to it.
    Brian

  • Is there a way to access ABAP OO instances from a batch job report

    Hello,
    I am looking for a way to access ABAP OO instances from a batch job report. My circumstances are the following:
    I have got some ABAP OO coding that identifies other objects (class instances) that have to be processed (they have a DoIt method that does some calculation). As this processing is time consuming and performace relevant I have to parallelize this in batch jobs. This batch jobs however can only be "simple" ABAP reports according to SM36. The problem is now that I dont really know how to tell the batch job report what objects to process. Somehow I have to access theses instances from  that batch job report.
    Does anybody have an idea?
    Greetings
    Matthias

    Hi David,
    thanks a lot for your help. After a lot of searching on the net this seems to be the only way to cope with it. However I am not sure about the locking mechanisms and if its suitable for mass data processing. In the help page you suggested the following is stated which I do not fully understand::
    "The current lock logic does not enable you to set specific locks for the following requirements:
    ·        Many parallel read and write accesses
    ·        Frequent write accesses
    ·        Division into changeable and non-changeable areas
    Although the lock logic makes the first two points technically possible, they are not practical because most accesses would be rejected."
    Does this mean
    a) if I dont want to set "specific locks" for frequent write accessess I am fine
    or
    b) I am discouraged from use shared memory technics for frequent write accessess?
    In the latter case I will have a problem...
    What do you think?
    Greets
    Matthias

  • Class is not appearing in "Java Batch Job Class Search" when trying to add.

    Hi,
    I have oracle CC&B 2.3.1, with SDK 2.2.0.12. I am trying to create new java batch job class by copying an existing one and modifying it to be used with new Batch Control .
    Steps are as follows:
    1-Created file by copying the exiting file
    CreateLatePaymentChargesProcess.java ; and only changing the name of the class:
    public class CmCreateLatePaymentChargesProcess
    extends CmCreateLatePaymentChargesProcess_Gen
    File location :
    D:\spl\ccb231\applycm\ssgc_patch\java\source\cm\ CmCreateLatePaymentChargesProcess.java
    D:\spl\ccb231\applycm\ssgc_patch\java\source\cm\ CmCreateLatePaymentChargesProcess_Gen.java
    2-Run ApplyCm build successfully , which generated these files:
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\ CmCreateLatePaymentChargesProcess.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\ CmCreateLatePaymentChargesProcess_Gen$1.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen$ThreadParameters.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen$ToDoProperties.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$CmCreateLatePaymentChargesProcessWorker_Gen.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen$JobParameters.class
    D:\spl\ccb231\java\target\cm\com\splwg\ccb\domain\billing\batch\CmCreateLatePaymentChargesProcess_Gen.class
    All the above classes are part of CM.jar file
    ContextManagedObjects.xml ;  contains these information
    <com.splwg.shared.environ.ContextManagedObjectData>;
    <domainPackages/>
    <lookupFieldClasses class="tree-map">
    <no-comparator/>
    </lookupFieldClasses>
    <cobolAlgorithmInterfaceExtensions class="tree-map">
    <no-comparator/>
    </cobolAlgorithmInterfaceExtensions>
    </com.splwg.shared.environ.ContextManagedObjectData>;
    packageMetaInfo.xml was not created
    Still the class is not appearing in "Java Batch Job Class Search" when trying to add a new program name referencing this java class.
    I tried restarting the Tomcat application server, still not appearing.
    Where did I go wrong about it?
    Thanks
    Edited by: cc&amp;amp;amp;b-user on Jul 29, 2011 12:39 AM
    Edited by: ccb-user on Aug 2, 2011 9:28 PM
    Edited by: ccb-user on Aug 7, 2011 11:36 PM

    Hi,
    Did you copying the base file CreateLatePaymentChargesProcess.java?
    I also create a new batch job which copying the CreateLatePaymentChargesProcess batch code the only difference in getBills() method query and inner class CreateLatePaymentChargesProcessWorker extend CmCreateLatePaymentChargesProcessWorker_Gen, instead of CreateLatePaymentChargesProcessWorker_Gen.
    The batch is working fine in my end.
    Thanks,
    Atul Singh.

  • Spool not getting created in batch job

    Hello experts,
    We have a requirement of printing BA00, BA01 and LD00 from different application.
    We have done same code for all BA00, BA01, and LD00.
    Normally the code is working fine except in few cases, when batch job is created but spool is not created.
    DATA: job_name TYPE tbtcjob-jobname,
                  number   TYPE tbtcjob-jobcount,
                  print_parameters TYPE pri_params,
                  wv_pripar    TYPE pri_params,
                  wv_arcpar    TYPE arc_params,
                  wv_val       TYPE c VALUE 'X',
                  wv_false     TYPE c VALUE 'X',
                  gv_mandt     TYPE tsp01-rqclient,
                  gv_user      TYPE tsp01-rqowner.
              CLEAR: gv_mandt, gv_user, number.
              gv_mandt = sy-mandt.
              gv_user  = sy-uname.
              job_name = 'DELIVERY_PRINTING'.
              CLEAR: range1.
              range1-sign = 'I'.
              range1-option = 'EQ'.
              range1-low = 'LD00'.
              CLEAR: range1-high.
              APPEND range1 TO range.
              CALL FUNCTION 'JOB_OPEN'
                EXPORTING
                  jobname          = job_name
                IMPORTING
                  jobcount         = number
                EXCEPTIONS
                  cant_create_job  = 1
                  invalid_job_data = 2
                  jobname_missing  = 3
                  OTHERS           = 4.
              IF sy-subrc = 0.
                SUBMIT sd70av2a WITH  rg_kschl IN range
                                WITH  rg_vbeln IN deli_tab
                                TO SAP-SPOOL
                              SPOOL PARAMETERS print_parameters
                              WITHOUT SPOOL DYNPRO
                              VIA JOB job_name NUMBER number
                              AND RETURN.
                IF sy-subrc = 0.
                  CALL FUNCTION 'JOB_CLOSE'
                    EXPORTING
                      jobcount             = number
                      jobname              = job_name
                      strtimmed            = 'X'
                    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.
                  ENDIF.
                ENDIF.
                WAIT UP TO 10 SECONDS.
    ** to give the data to the printer***
    *            CLEAR gv_rqident.
                SELECT SINGLE listident INTO gv_listident FROM tbtcp
                              WHERE jobname = job_name
                               AND  jobcount = number.
              IF sy-subrc = 0.
                MOVE gv_listident to gv_rqident.
                CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
                  EXPORTING
                    spool_request_id = gv_rqident.
              ENDIF.
    The same code is for all the output BA00, BA01 and LD00.
    The issue is that for few batch jobs (which is created in the above code) , spool is not getting created.
    Thanks and Regards,
    Paritosh Pandey

    Hi,
    The code starting from WAIT UP TO 10 SECONDS. - not only does it look attrocious, is error prone (if no free process for executing batch job is available for 10 seconds, or if the job runs for more than 10 seconds, what will happen...?), but seems utterly unnecessary... Is there any reason immediate spool output can not be handled by simply setting PRINT_PARAMETERS-PRIMM = 'X'?
    cheers,
    Janis
    Edit in:
    Ok, i just read Document in spool but not printed... Do not use an output device relying on frontend access methods to do printing from background processing. Frontend is not available during background processing, period. To my knowledge there is no easy, clean solution to this problem other than defining and assigning, per user, output devices not relying on frontend printing. What if the dialog user has logged off by the time batch job finishes..? May the spool remain unprinted?
    Has the SAP Basis refused to define output devices (I have hard time believing this...)? Well, tell them one time to stop being silly and if they do not cooperate, tell the owner of the requirement that it can not be implemented due to uncooperative Basis then... and that the users will have to keep going to SP01 and manualy start the output!
    Message was edited by: Jānis B

  • Batch Job Performance Issue in BW

    Hi All
    I would like to if there are any performance tuning methods for batch jobs in BW. Few jobs are taking much longer time and i need to figure out a method to tune them.
    Thanks in advance for your help
    Regards
    JP

    Hi JP,
    Dinesh is right, you need to consider the tuning for specific scenarios. If some of the jobs are taking longtime just access at what point they are taking time by going to the JobLog in source sytem/BW, and try to take up the optimization of the resources used inthe source system. For Eg: It can be even in the Extractor. I had come across such issue with long loading times for few ledgers in FISL. But could encounter that by spitting load with small number of records to BW with an ABAP program incorporated inthe InfoPack with the selections for the Reconcilation key.
    In this way, you need to first identify the delay for the jobs. Then you can plan the things accordingly..
    Hope this will help you..
    Regards,
    Madhu

  • Siebel EDQ batch job performance

    Hi there,
    We are using Siebel Public Sector 8.2.2.4 with EDQ 11.1.1.7 version to clean up existing contact records and also set up real-time deduplication for ongoing contacts.  We didn't tune any parameters both from Siebel and EDQ side till now.
    We observed that the process is taking 45-50 minutes to process 6000 records. We noticed that the process is taking more time while inserting the records from Siebel to staging database.  The EDQ contact deduplication is just fine and it it taking around 8-14 minutes based on number of records to process.
    Is there a way we can tune anything from Siebel side to improve the performance while loading the data into staging database. May be Batch max number of records or number of DB connections or sessions etc to improve the performance?
    Also, can you suggest if we could run the jobs from Siebel ( by splitting into multiple batches) in parallel? I am not sure if this is an option as the parallel tasks uses the same sharing database and it might have an conflict.
    Please suggest.
    Regards
    Siva Sonti

    Hi,
    So to understand correctly, these are true batch jobs with the data being handed over using the staging tables.
    It seems like the problem here - which we have seen before - is the performance of the candidate selection query in Siebel for incremental batch jobs - the piece where the candidate records for the selected batch of records to match are selected. How long does a Full Batch job take to run (as this does not need to make this query)?
    Also, is this Siebel CRM or UCM? If UCM, you can use the 'UCM Batch' workflow which although it calls EDQ in real-time can be scaled using as many tasks in Siebel as the system can handle; customers have been able to load up to 9000 records/minute with this method.
    The nature of the shared staging database means it only supports a single job for data from a single business component (e.g. Contact) at any one time, as you suspected.
    If you are really 'loading records' into Siebel, you may be better of loading them using the EIM interface - perhaps with EDQ pre-matching the data and directly writing to the EIM tables.
    Regards,
    Mike

  • Using Rules Engines, & Batch jobs

    So, we're looking into the best method for storing our business rules. So far, we're investigating Rules Engines (Drools), using database Triggers, SOA, or coding those rules into the application itself.
    Currently, the bulk of our business rules are in table triggers. So, when our batch jobs execute, they pick up all of the business rules as they go.
    I like the concept of using a Rules Engine, though, especially if we could give some control over maintaining those rules to the customer.
    So here's my question, if we went to a Rules Engine approach, or chose one of the non-Trigger approaches, would our batch jobs now have to plug into those rules that applied to that particular process? I'm worried about losing those automatic business rule checks when the trigger executes for any interaction with the underlying table data. With a rules engine, it would seem, you'd have more planning b/c the batch job now has to call all rules that may apply.
    Am I missing the point of a Rules Engine, or is this the case?
    --=Chuck

    1) Oracle 10g includes a rules engine, so if you're going do that path, I'd consider strongly keeping everything in Oracle.
    2) What is the nature of the business rules? Are these validations? Calculations? Something else?
    3) Depending on the rules, and whether your batch process has to do anything to react to a rule (i.e. if you have a validation rule that indicates the batch job inserted an invalid entry, does the job need to do something? Or could a subsequent query alert the user to the problem), you can generally have the rules engine run all the rules at the end of the load (that's generally 1 command from the batch process to the rules engine). Or you could have the rules engine run everything periodically. With the internal Oracle rules engine, I believe you can also have things evaluate synchronously.
    Justin

  • Scheduling a Powershell script as a batch job

    I need to run a PowerShell script as a batch job to be executed every 5 minutes on a Windows Server 2012 R2 server.
    I want to use a scheduled task.
    I read on the web different ways to solve the problem but I was unable to make them work.
    What is the simplest way to run a PowerShell file as a scheduled job?
    Regards
    Mario

    Hi Mario,
    The quickest method is to write your script and save it on the server. Then create a new scheduled task like so:
    Actions -
    Start a program
    Program/script : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add arguments : -File C:\path\to\script.ps1
    That's all you need to do for simple scripts (make sure your execution policy is set right too).
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • Risk Analysis Batch Job Stuck in Ready State

    Hi,
    I am not able to schedule  Risk Analysis Batch job in RAR.The job is getting stuck on READY state(for unlimited period) and not performing any actions.
    Nothing is displayed under job history or job logs with job ID.I have check background job demaon ,connectors and other miscell. options but not abl to find any clue.
    Even i am executing risk analysis for single user,it's not happening.
    Rgds,
    Mukesh

    For your problem, of job not getting schedule....it seems Deamon is not running.
    To delete status of job which are in hung status
    change VIRSA_CC_SCHEDULER job id should with status five will show job aborted.
    are you using connection type 'Adaptive RFC', don't use it, use SAP JCO.
    and restart your GRC box.
    Regards,
    Surpreet
    please do check backend system, for VIRSANH is installed or not.
    Edited by: Surpreet Singh Bal on Jan 28, 2011 10:32 AM

  • BW Batch Jobs Transport

    Is it ok to transport while BW batch jobs are running ?

    It shouldn't be an issue in most circumstances. The two things to look out for are: 1) are any of the objects, on the transport being imported into the environment, involved with any part of what is running in batch (as previously noted by Frank); and 2) OSS Note transports should be done when no jobs are being executed because they could affect underlying Methods, Function Modules and other objects that are being used in the background in the batch jobs.
    Edited by: Dennis Scoville on Jul 8, 2009 8:25 AM

  • Batch job and background job

    Hi
    what is the difference between a batch job and backgroun job ??
    thanks
    kumar

    hi kumar,
    As far as I know
    Batch job are the jobs created with sessions. You can process those sessions in SM35. These are not direct update methods.
    Where as the background jobs are the jobs running in the background with out user interaction. Once you schedule the job for the background job it will run with out user interaction according to the given schedule.
    You can run the batch jobs also in background.

Maybe you are looking for

  • List view web part not reflecting changes made to list view in SharePoint Designer

    Dear All, When adding a list view web part containing a view modified in SharePoint designer (e.g. conditional formatting applied, or group headers modified) I'm finding that the changes made in SPD are not reflected in the web part.  For example, I

  • Camera Raw will not update to latest version

    Help, Can someone please help me.  Have been trying for about 4 hours to update my version of Photoshop CS6 and keep getting response that "The update server is not responding. The server might be offline temporarily, or the Internet or firewall sett

  • Time Machine Craziness: Way too much data getting backed up

    Hello. I'm on a retina MBP running Mountain Lion. Each time that Time Machine does a backup, it's backing up way more data than corresponds to any changes I have made. I'm aware of issues with virtualization software (I'm not using any) and I'm also

  • Numeric properties error

    Hello, There is an issue that I've encountered in LV 8.6.1 where all of my system numeric controls share their properties. For example, I place Numeric on the front panel of a VI, then right click and select "Data Entry...". Then I modify the data en

  • Load panel tui file not working on CVI2012 for Linux

    We are having problems with panels that look fine on Windows being difficult to read on Linux, presumably because most control and text fonts are VAL_DIALOG_META_FONT on Windows but the CVI for Linux run-time only has NISYSTEM. As a quick way to test