Background job- getting printed automatically

In my BDC Program i have submitted  Session for Background Processing using
Submit RSBDCSUB..........
my code is also given below..The problem is after the user executes the program, background job is automatically going to his Local printer and getting printed. HOw to avoid this?
CALL FUNCTION 'JOB_OPEN'
       EXPORTING
            jobname          = gf_jobname
       IMPORTING
            jobcount         = gf_jobcount
       EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
*-Submit the selected sales orders for changes.
  SUBMIT rsbdcsub AND RETURN
         WITH mappe = v_sess
         WITH von = sy-datum
         WITH bis = sy-datum
         WITH z_verarb = 'X'
         WITH fehler = space
         WITH batchsys = space
         WITH logall = space
         USER sy-uname VIA JOB gf_jobname NUMBER gf_jobcount.
  IF sy-subrc NE 0.
    MESSAGE i999 WITH text-013.
    EXIT.
  ENDIF.
*-Close job and start immediately.
  CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
            jobcount             = gf_jobcount
            jobname              = gf_jobname
            strtimmed            = 'X'
       IMPORTING
            job_was_released     = gf_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
            OTHERS               = 8.

On SUBMIT use
SUBMIT zxxxxxx TO SAP-SPOOL
                    WITHOUT SPOOL DYNPRO
                    IMMEDIATELY  ' '
                    KEEP IN SPOOL 'X'
                    DESTINATION printer
                     NUMBER  number
                    AND RETURN

Similar Messages

  • SAP  Back ground Jobs getting cancel automatically

    Hi All,
    All schedule Background jobs getting cancel  automatically in ECC 5 server. Also not getting any job log in respective schedule job. please help me out with expert suggestions.
    Regards
    Gyan

    1)Are the bgd workprocess free in the system currently?Check if there are any long running jobs holding them.
    Bgd Work process are free but with error code 373,223,007 etc for all 5 bg wp
    error reports from work directory as per work process:---
    wp 22 :Fri Sep 25 15:07:04 2009

    A  ABAP/4 Program SAPLSYDB                                .
    A  Source LSYDBU27                                 Line 7.
    A  Error Code DBIF_DSQL2_DEFAULT_CR_ERROR.
    A  Module  $Id: //bas/640_REL/src/krn/runt/abexsql.c#5 $ SAP.
    A  Function DsqlErrorHandler Line 1986.
    A  COMMIT/ROLLBACK error on "DEFAULT" database connection..

    M  ***LOG R68=> ThIRollBack, roll back () [thxxhead.c   12289]
    C  Rollback Work (0)
    M  *** ERROR => ThCallHooks: event handler rsts_before_commit for event BEFORE_COMMIT failed [thxxtool3.c  252]
    B  ComRolHook(BEFORE_COMMIT, free_all) failed
    B  db_con_commit received an error return code in before-commit action
    M  ***LOG R38=> ThICommit3, db_commit98 ( 001024) [thxxhead.c   12036]
    WP23: Fri Sep 25 15:06:05 2009
    B  dbtran INFO (init_connection '<DEFAULT>' [MSSQL:640.00]):
    B   max_blocking_factor =  50,  max_in_blocking_factor      = 255,
    B   min_blocking_factor =   5,  min_in_blocking_factor      =  10,
    B   prefer_union_all    =   1,  prefer_union_for_select_all =   0,
    B   prefer_fix_blocking =   0,  prefer_in_itab_opt          =   0,
    B   convert AVG         =   1,  alias table FUPD            =   0,
    B   escape_as_literal   =   0,  opt GE LE to BETWEEN        =   0,
    B   select *            =0x00,  character encoding          = STD / []:X,
    B   use_hints           = abap->1, dbif->0x1, upto->0, rule_in->0,
    B                         rule_fae->0, concat_fae->0, concat_fae_or->0
    M  ***LOG R68=> ThIRollBack, roll back () [thxxhead.c   12289]
    C  Rollback Work (0)
    M  *** ERROR => ThCallHooks: event handler rsts_before_commit for event BEFORE_COMMIT failed [thxxtool3.c  252]
    B  ComRolHook(BEFORE_COMMIT, free_all) failed
    B  db_con_commit received an error return code in before-commit action
    M  ***LOG R38=> ThICommit3, db_commit98 ( 001024) [thxxhead.c   12036]
    wp 24:Fri Sep 25 14:33:10 2009
    M  *** ERROR => ThCallHooks: event handler rsts_before_commit for event BEFORE_COMMIT failed [thxxtool3.c  252]
    B  ComRolHook(BEFORE_COMMIT, free_all) failed
    B  db_con_commit received an error return code in before-commit action
    B  ***LOG BZY=> unexpected return code 32768      calling DBACDS     [dbacds#2 @ 1225] [dbacds  1225 ]

    *WP25: *** ERROR => BtcCleanUp: BtcLgAp-call failed (rc = 4) [btcjcntl.c   1308]*
    M  ThCallHooks: call hook >ITSP: EndOfSession< for event BEFORE_SESSION_CANCEL
    M  ThCallHooks: call hook >RtmClearSession< for event BEFORE_SESSION_CANCEL
    M  ThCallHooks: call hook >HttpClearSession< for event BEFORE_SESSION_CANCEL
    M  ThCallHooks: call hook >SpoolHandleHook< for event BEFORE_SESSION_CANCEL
    M  ***LOG R47=> ThResFree, delete (001009) [thxxmode.c   1284]
    M  ThCallHooks: call hook >ASTAT-collect commit handling< for event BEFORE_COMMIT
    M  ThCallHooks: call hook >rsts_before_commit< for event BEFORE_COMMIT
    M  ThCallHooks: call hook >rsts_after_commit< for event AFTER_COMMIT
    M  ThCallHooks: call hook >ThNoClearPrevErr< for event AFTER_COMMIT
    M  ThCallHooks: call hook >SpoolHandleHook< for event AFTER_COMMIT
    M  ThCallHooks: call hook >SAP-Trace buffer write< for event BEFORE_TASK_SWITCH
    M  ThCallHooks: call hook >ImcResetPtr< for event BEFORE_TASK_SWITCH
    M  ThCallHooks: call hook >DbgBeforeTaskSwitch< for event BEFORE_TASK_SWITCH
    M  ThCallHooks: call hook >HttpResetPtr< for event BEFORE_TASK_SWITCH

    B Fri Sep 25 14:47:04 2009
    B  Disconnected from connection con_da={R/3*WORKFLOWTRACE,26000006,1}
    please let me know where i can send log file if req.
    2)Check for the sm21/sm50 bgd wp traces.
    Getting so may Tem se management errors.
    Some TemSe objects are stored in files. To do this, a path name is set up from the TemSe object name. To be able to use this path, TemSe management requires a directory. It attempted to create it itself. However, this did not succeed.
    3)Check if the filesystem is full as you suggest no logs are being written.
    File system having free space
    4)Check if the user who has scheduled the job is locked ?
    user unlocked
    please help me to resolv this issue.
    thanks
    Gyan
    Edited by: Gyan Prakash on Oct 9, 2009 10:02 AM

  • SM:SELFDIAGNOSIS background job getting failed in Solution manager

    Hi All,
    SM:SELFDIAGNOSIS background job getting failed in Solution manger server :
    Job Log:
    2-22-2012 16:44:02 Job started                                                                                00           516          S
    2-22-2012 16:44:02 Step 001 started (program RDSWP_SELF_DIAGNOSIS, variant &0000000000324, user ID BASISUSER)      00           550          S
    2-22-2012 16:45:07 Internal session terminated with a runtime error (see ST22)                                     00           671          A
    2-22-2012 16:45:07 Job cancelled                                                                                00           518          A
    ST22: Dump:
    Runtime Errors         ITAB_DUPLICATE_KEY
    Date and Time          02-22-2012 16:45:07
    Short text
    A row with the same key already exists.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_DSWP_SD_DIAGNOSE_CONSISTENTCP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An entry was to be entered into the table
    "\CLASS=CL_DSWP_SD_DIAGNOSE_CONSISTENT\METHOD=CHECK_USERS_BP\DATA=LT_USCP"
    (which should have
    had a unique table key (UNIQUE KEY)).
    However, there already existed a line with an identical key.
    The insert-operation could have ocurred as a result of an INSERT- or
    MOVE command, or in conjunction with a SELECT ... INTO.
    The statement "INSERT INITIAL LINE ..." cannot be used to insert several
    initial lines into a table with a unique key.
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "ITAB_DUPLICATE_KEY" " "
    "CL_DSWP_SD_DIAGNOSE_CONSISTENTCP" or "CL_DSWP_SD_DIAGNOSE_CONSISTENTCM00M"
    "CHECK_USERS_BP"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    KIndly Suggest to resolve the above issue
    Thanks
    Nekkalapu

    HI,
    Deatils:
    SAP EHP 1 for SAP Solution Manager 7.0
    SAP_ABA                701          0006    SAPKA70106
    SAP_BASIS              701          0006    SAPKB70106
    PI_BASIS               701          0006    SAPK-70106INPIBASI
    ST-PI                  2008_1_700   0002    SAPKITLRD2
    CRMUIF                 500          0004    SAPK-50004INCRMUIF
    SAP_BW                 701          0006    SAPKW70106
    SAP_AP                 700          0019    SAPKNA7019
    BBPCRM                 500          0016    SAPKU50016
    BI_CONT                704          0007    SAPK-70407INBICONT
    CPRXRPM                400          0016    SAPK-40016INCPRXRP
    ST                     400          0024    SAPKITL434
    ST-A/PI                01M_CRM570   0000         -
    ST-ICO                 150_700      0009    SAPK-15079INSTPL
    ST-SER                 701_2010_1   0002    SAPKITLOS2
    Thanks
    Nekkalapu

  • Background job getting failed every day

    Hi,
    This background job getting failed every day.But this job was running fine initial periord.Please help me out this issue.
    SAP_REORG_UPDATERECORDS
    SAP_WP_CACHE_RELOAD_FULL
    SLCA_LCK_SYNCHOWNERS
    Regards
    Naanas.

    If this is R/3, then none of the above jobs should exist in the system, if scheduled by default with other standard jobs, then these should be removed
    Note 1034532 - Changes for standard jobs
    Note 931436 - SLCA_LCK_SYNCHOWNERS standard job terminates

  • Set background job - create dn automatically

    hi
    Pls advice how to set background job to create DN automatically
    thanks

    How you are saying that no Deliveries were created ?
    First of all make sure that they are sales orders due for delivery data on the day you are creating.
    -> Run VF04 in foreground with the variant that you used in Background and check whether there is any orders due for delivery or not?
    Make sure you have proper data.
    Hope you should get it.
    Regards,
    Ajai.

  • Background job getting CANCELLED

    hello,
    i have  a background job scheduled for a report program.it is getting cancelled and giving the following error:
    "TABLE_ILLEGAL_STATEMENT"
    You attempted to change, delete or create a line in the       
    internal table "???", but no valid cursor exists              
    for the table.                                                
    Possible reasons:                                             
    1. The relevent ABAP/4 statement does not include the addition
       "...INDEX...", although the statement is not               
       inside a "LOOP...ENDLOOP" loop processing this table.      
    2. The relevent ABAP/4 statement was called from within a     
       "LOOP...ENDLOOP" loop after a DELETE "???".                                                                               
    what could be the reason?

    it is also giving following error message:
    Caution: Program has changed
    Caution: At time of termination,  Active source code no longer available  and after above two statements its giving sign "?" before every statement in below manner:
    024300 ?     lit_ekpo_dummy1[] = it_ekpo[].                     
    024310 ?     DELETE lit_ekpo_dummy1 WHERE ebeln NE tab1-ebeln.  
    024320 ?     DESCRIBE TABLE lit_ekpo_dummy1 LINES count01.      
    024330 ?                                                        
    024340 ?     REFRESH lit_ematn_dummy[].                         
    024350 ?     lit_ematn_dummy[] = lit_ematn[].

  • Background Job not Printing TOs immediately

    Hello experts,
    I am having an issue with printing Transfer Orders created by background job, the output requests are sent to the output controller with status '-' . It works when I manually create the TOs or if I run the RLAUTA10 program with my userID in SE38 .
    I have set the background job user default print parameters in SU3 to print immediately.
    Also in the Job step, I have set up the print parameters  to 'print immediately'
    I have assigned printer for sorce storage type & set the indicator to use the source sto type in OMLV, The printer seems to be determined correctly, I've checked the Spool request name & printer in the spool controller, only issue seems to be the print not being triggered immediately.
    Not sure, if there is some other setting that I have to make to be able to print the TOs created by the background job immediately.
    Any help would be appreciated.
    Thanks
    Kris T

    whether the printer which you assigned is configured in SAP (network printer)? or LOCL?
    printing may not happen if LOCL(background job)
    Thanks

  • Background job  step - Printer - Output device  table

    Hi,
    When creating background job, printer- output device also specified for every step. Which table to check for job name and output device combination ?
    Thanks.

    Hi Raj check table TBTCP

  • Background Jobs getting Cancelled

    Hi SRM Gurus
    we are working on SRM  4.0  and follow a classic scenarios.
    We have schedulled following background jobs
    1 BBP_GET_STATUS_2
    2 CLEAN_REQREQ_UP
    3 SMWP_BATCH
    Which were running successfully however from yesterday this all jobs are showing status cancelled.
    Can any one throw some light as to why this jobs are getting cancelled or how to check the reaons for the cancelling of jobs.
    regards,
    Nimish Sheth

    Hi Nimish,
    for how long where they running ?
    They might be cancelled because of time out (ex: R/3 system not available temporary).
    Do you have traces in SM21 in the same time fence ?
    Rgds
    Christophe

  • How to stop background job to print papers

    Hi all,
    I have background job of forms running every day and its printing papers. My requirement is to stop the printing of papers in the background job.
    How to do this .
    i am using CALL FUNCTION 'GET_PRINT_PARAMETERS and    NEW-PAGE PRINT ON PARAMETERS v_params NO DIALOG.
        NEW-PAGE PRINT OFF.
    Thanks
    Krupali

    Hi,
    <li>Set the below before you call NEW-PAGE PRINT ON
    lw_pripar-prrel = space.
    lw_pripar-primm = space.
    <li>Call NEW-PAGE PRINT ON like below
        NEW-PAGE PRINT ON
          NEW-SECTION
          PARAMETERS lw_pripar
          ARCHIVE PARAMETERS lw_arcpar
          NO DIALOG.
    Thanks
    Venkat.O

  • Background Job get Cancelled when executing the report. Reason?

    Hi All,
    I have scheduled a Back ground Job and executed Immediately.
    when checking transacion SM37 the job get canceled.
    How to find out the problem for the Job Cancellation.
    Regards,
    Viji

    hi
    After scheduling back ground job ( give a time laps of 2 min )
    then go to sm37 ( at this moment , the job is not yet started) .
    select ur job in sm 37 and when job starts processing , type JDBG as the command and press enter.
    Now it will go to the debugging screen, where u will find system program . Now set a break point at the stements used in ur program from the debugging screen itself.( menu - breakpoint- breakpoint at - statement ) and press F8 .
    Now you can start debug ur code.
    Revrt back if any issues.
    Regards,
    Naveen

  • Report program when run in background job getting cancelled immediately

    Hi
    When i run a program in foreground i am able to see the output. But when run in background not able to run the job successfully. The job is getting cancelled immediately.
    I am using the below function module for output display. Should i need to pass any parameters in the below function module so that i can run the program in background  successfully.
      CALL METHOD DETAIL_GRID->SET_TABLE_FOR_FIRST_DISPLAY     
          EXPORTING                                            
            IS_LAYOUT         = IS_LAYOUT                    
            I_SAVE            = 'A'                        
            IS_VARIANT        = GS_VARIANT                   
          CHANGING                                           
            IT_FIELDCATALOG   = IT_FIELDCATALOG               
            IT_OUTTAB         = BLOCKED_STOCK_TAB_ALV[].     
    Please suggest.
    Thanks and regards
    Rajani Yeluri

    Hi Rajani.
      ALV require the DRYPOR(screen) for display but incase you run in back ground which have to write to spool but in spool we can only write in format of LIST REPORT not inter-active report like ALV. That why
    system cancelled your process immediately.
    Hope it helps.
    Sayan.

  • LBWE job get cancel automatically.

    Hi,
    I am schedule a LBWE job in R/3. But after a some time automatically its get cancell. Tomorrow again before the Process Chains schedule I have to manually schedule the LBWE job. Can someone guide me where is the issue and what I need to do So LBWE schedule job should not cancell...?
    Regards
    Man
    Edited by: Siegfried Szameitat on Nov 3, 2008 12:06 PM
    deleted points offer as it is against the rules.

    Hi Debjani,
    You are right the job is cancel due to ABAP short dump.  I have schedule the  Application-17 (Plant Maintenance) on hourely period basis. When I go into SM37 and refresh after a hrs. one row is added with "canceled" with red coulor. But when i see this cancell row in details I get confused. I schedule the job for Application-17, But the cancel / error message comes for application-02 (Puchasing).
    When I go into details of row This happen beccause of  "ABAP/4 processor: MESSAGE_TYPE_X". The details message as follows.
    "MESSAGE_TYPE_X" " "
    "SAPLMCEX" or "LMCEXU03"
    "MCEX_UPDATE_02"
    Regards
    Manoj

  • Background job getting cancelled : Choose at least one scope of list

    Hello to all,
    I am trying to Run on Z report in background which conatins SUBMIT statement to standard progarm for MB5B .This report already programmed to call a report in background.It takes stocks for given period,I am taking the values using "import memory-id" statement.It gives an error log in SM37 as:
    Choose at least one scope of list
    Message no. M7829
    Can we call a submit stmt in a report that is to run in background?? or pls provide any alternative for this problem??
    Thnax & Regards
    Sonal

    Hi Sonal,
    1. This is happening because there are some checkboxes on the selection screen
       which are ticked by default when we run in fore ground
       and are blank when run in  background.
      Hence the system gives the error meaning to select atleast one of them.
    2. We can simulate this error in foreground also.
       There is one button on selection screen in the middle frame.
       "> Category"
       Just push it.
       Some checkboxes will appear now.
       Untick all of them and run the report. You will get the same error
    Choose at least one scope of list
    3. So while doing SUBMIT in the z report, you can pass the values of those checkboxes (which ever you require) as 'X'.
    eg.
    report abc.
    submit RM07MLBD
    with matnr = '3'
    with pa_wdzer = 'X'.
    4. The checkboxes field names are:
    PARAMETERS : pa_wdzer    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    PARAMETERS : pa_wdzew    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    PARAMETERS : pa_wdwiz    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    PARAMETERS : pa_wdwuw    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    PARAMETERS : pa_wdwew    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    PARAMETERS : pa_ndzer    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    PARAMETERS : pa_ndsto    LIKE AM07M-MB5B_XONUL
                              modif id liu.
    regards,
    amit m.

  • Standard Background Job getting cancelled

    Hello Guru ,
    In my BI dev server one standard event periodic job is geting cancelled due to following reason
    Job Name : AP_CCMS_MONI_BATCH_STARTUP_DP
    Program:  RSAL_BATCH_TOOL_STARTUPDISP
    cancelled error
    No alerts in configuration range
    Internal error:
    Job cancelled after system exception ERROR_MESSAGE
    can anybody help me in this regards
    Regards
    Deepak

    Run the job once again and lets see what happens... sometimes system cancels the job....check in ST22 if there is short dump.
    Thanks....
    Shambhu

Maybe you are looking for

  • Premiere Pro CC crashes immediateley playing AVCHD media in browser (running OSX 10.8 please help!

    Premiere Pro CC crashes immediateley playing AVCHD media in browser (running OSX 10.8 > please help! I've been running CS6 perfectly on OSX 10.8.4. but decided to update to a trial CC. That's when all the fuss began. Trying to play AVCHD material in

  • How to turn on debug logging

    I'm using OIM 9031 on Oracle Application Server. I need to turn on debug mode logging while processing reconciliation events. The problem is that Recon event is in Status 'Received', but when I try to proceed it by clicking 'Create User' button in th

  • Relationship between FI Cost Center (CSKS) / MM/PM logistic Center (T001W)

    Hi Everybody!! Is there any way to obtain Logistic Center stored in T001W assigned to an FI Cost Center knowing the very last field?? Thanks very much in advance.

  • Example

    Anyone of you pls give examples for these topics.. 1.     Adaptive RFC Model, 2.     work on two different DC's, 3.     flow of NWDI, 4.     UI elements like Table, 5.     Progress indicator, 6.     File upload,file download. 7.     Parameter mapping

  • More than one Ipod on a single computer.

    I just wanted to ask before I bought a Classic 80 gig if it is possible to have 2 seperate Ipods connected to a single computer with totally different music? The reason I ask is I have a 16 year old daughter and lets just say I really don't want to h