Background Job and spool numbers

hi All
I have a requirement to schedule a job in background programmatically. Depending upon the end result of the job, two different spools should be generated. The job name and spool names should be given programmatically. these spools should be emailed to a email ID. What will be the best option of executing the above scenario.
Shakir.

Hi,
you can use Workflows to execute the above scenario.
Regards
Mudit

Similar Messages

  • Background Job Processing/Spool List Recipient

    When setting up a report to run as a background job and setting it up to e-mail the results via the Spool List Recipient button, it always sends the results in htm format. Is there a way it can be e-mailed in Excel?

    hi swapna.
    in scot it is not configured as excel how to do it.to get an attachment in excel format
    thanks in advance

  • Afer background job finished, spool was not generated

    hi all
    Afer background job finished, spool was not generated but all background jobs is not
    soem background jobs was created spool.
    even if same user and same backgorund job, sometime generated spool or not.
    how can I solve??
    thanks

    Hi,
    Spool will be generated only spool specification wil be defined for that job.
    Select the job go to steps spool specification you can see the device assigned to it.
    Regards
    Ashok

  • Run the Report as a Background job and Get the Output in Excel in Local PC

    Hello Gurus,
    I have one following requirement.
    One should be able to run the report as a background job and it should be possible to get the report in Excel format, also when running the report in background. The excel report should have the same information and look as the current SAPreport.
    Please provide some solution.
    Any helpful answer get surely awarded.
    Thanks a lot,
    Varlanir

    GUI_* WS_* Function In Background, CSV Upload
    GUI_* and WS_* function modules do not work in background
    When scheduling a job in the background the appropriate statement to read in your file is OPEN DATASET, and the file must be on the file system that the SAP server can see.
    At anytime, a user can switch of the Personal Computers even though the job is still running in the background.  Therefore GUI_* and WS_* function modules are not designed to work in that way, as they need to access your personal computer  file.
    To choose the correct download method to used, you can check the value of SY-BATCH in your code,
    if it is 'X' use OPEN DATASET and if it is ' ' use WS_UPLOAD.
    *-- Open dataset for reading
    DATA:
      dsn(20) VALUE '/usr/test.dat',
      rec(80).
    OPEN DATASET dsn FOR INPUT IN TEXT MODE.
    IF sy-subrc = 0.
      DO.
        READ DATASET dsn INTO rec.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
          WRITE / rec.
        ENDIF.
      ENDDO.
    ENDIF.
    CLOSE DATASET dsn.
    *-- Open dataset for writing
    DATA rec(80).
    OPEN DATASET dsn FOR OUTPUT IN TEXT MODE.
      TRANSFER rec TO '/usr/test.dat'.
    CLOSE DATASET dsn.
    What is the difference when we use upload, ws_upload, gui_upload function modules?
    UPLOAD, WS_UPLOAD, GUI_UPLOAD, are used in BDC concepts.  ie., Batch Data Communication.
    Batch Data Conversion is a concept where user can transfer the Data from non SAP to SAP R/3.  So , in these various Function Modules are used.
    UPLOAD---  upload a file to the presentation server (PC)
    WS_UPLOAD----    Load Files from the Presentation Server to Internal ABAP Tables.
    WS means Work Station.
    This is used upto SAP 4.6 version.
    GUI_UPLOAD-------    Replaces WS_UPLOAD. Upoad file from presentation server to the app server.  From 4.7 SAP version it is replaced.
    How to Upload csv file to SAP?
    Common File Download Upload Questions:
    How  you upload the data from text file to sap internal table?  From my knowledge its by upload or gui_upload. 
    How you download the data from sap internal table to text file?
    How  you upload the data from xls (excel) file to sap internal table how you download the data from sap internal table to xls(excel) file.
    You can upload data from presentation server to an internal table using gui_upload. Use gui_download to download from internal table to flat file.
    Use fm ALSM_EXCEL_TO_INTERNAL_TABLE to upload data frm excel.
    Use function module GUI_UPLOAD
    The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\test.csv'
       FILETYPE                      = 'ASC'
      TABLES
        DATA_TAB                      = itab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17.

  • Differences in Background jobs and Dialog jobs

    Hi everyone,
    I am new to SAP and would like a little clarification regarding what is meant by Background jobs and Dialog jobs/processes. We had a situation at our client location where the system got completely bogged down to the point that it almost froze and many of the process chains were failing in BI. As per the basis team, the jobs were triggered as "dialog jobs" instead of "background" jobs which caused a heavy load on the system.
    What is the difference? What happens when the jobs are run in the background or as dialog? Can both be checked in SM37?
    Points will be awarded
    Thanks.

    **Dialog Work process:** The Dialog work process fulfill all requests for the execution of dialog steps triggered by an active user. The dialog work process are not used for request which take long time and which use more cpu. Every dispatcher requires at least two dialog work processes. The dialog work process default time is 300 secs. If the dialog work process does not respond in this time, it will be terminated. Also dialog work process are multiplexed to handle large no of user request.
    **Background Work process:** The background work processes execute programs that run without user interaction. At least two background work processes are required per SAP system. More than one background work processes can be configured per dispatcher. Usually the background work process are used for carrying jobs that take long time to finish, like client copy, client transport etc.., . There are two types of background work process. They are A type and B type. A type background work process are used for mission critical jobs. Background jobs of priority a have high priority than B type back ground jobs.
    you can check your job using tcode SM50.
    Thanks
    Dhiraj

  • Divide the billing due list into multiple background jobs and start them si

    Hello Gurus,
          How to divide the billing due list into multiple background jobs and start them simultaneously?
    Many thanks,
    Frank

    Hello Frank,
    Check this:
    http://help.sap.com/erp2005ehp_03/helpdata/EN/dd/561076545a11d1a7020000e829fd11/frameset.htm_
    plz assign suitable points, if this helps.
    Rgds,
    Raghu.

  • Retain background jobs and its variants before system refresh activity

    Hello All,
    I am going to perform system refresh activity on quaity system on monday. Customer wants to retain the background jobs and its variants in the quality system. Please guide me and let me know the steps to retain the background jobs and its variants before starting the system refresh activity.
    Regards
    Subbu

    Dear Subbu,
    You have to export the TBT* Tables to retain the jobs. You can do this with R3trans:
    1. Make Export file
    2. Make Import file
    3. Make Export in Q System before Systemcopy
    4. Start Database and not SAP
    5. Make Import in Q after Systemcopy
    6. Start sap
    1. Make Export file /tmp/export_cmd
    export
    file='/tmp/export_Q.dmp'
    client=<your client>
    delete from TBTCA               
    delete from TBTCB               
    delete from TBTCCNTXT           
    delete from TBTCCTXTT           
    delete from TBTCCTXTTP          
    delete from TBTCI               
    delete from TBTCJCNTXT          
    delete from TBTCJSTEP           
    delete from TBTCO               
    delete from TBTCO_V01           
    delete from TBTCP               
    delete from TBTCPV              
    delete from TBTCR               
    delete from TBTCS               
    delete from TBTC_SPOOLID        
    delete from BTCEVTJOB
    select * from TBTCA             
    select * from TBTCB             
    select * from TBTCCNTXT         
    select * from TBTCCTXTT         
    select * from TBTCCTXTTP        
    select * from TBTCI             
    select * from TBTCJCNTXT        
    select * from TBTCJSTEP         
    select * from TBTCO             
    select * from TBTCO_V01         
    select * from TBTCP             
    select * from TBTCPV            
    select * from TBTCR             
    select * from TBTCS             
    select * from TBTC_SPOOLID 
    select * from BTCEVTJOB
    2. Make Import file /tmp/import_cmd
    import
    file='/tmp/export_Q.dmp'
    3. Make Export in Q System before Systemcopy
    R3trans -w /tmp/Q_export.log  /tmp/export_cmd
    4. Start Database and not SAP
    sqlplus "/as sysdba"
    SQL> startup
    or
    startsap
    stopsap r3
    5. Make Import in Q after Systemcopy
    R3trans -w /tmp/Q_import.log  /tmp/import_cmd
    If you want to undo this, start the export script in P system and the Import script in Q system.
    Don't be afraid of the delete statement but without delete it doesn't work!
    6. Start sap
    startsap
    Best regards
    Willi Eimler

  • Different Subroutines in Background jobs and Dialog jobs

    Hi guys,
    I want to execute some subroutines when the program is running  using a background  job  , and some other subroutines completely different when the user use dialog job ( program -> execute in background ) . I know that sy-batch  = 'X'  in both cases  , but, there is something else to identify them ? , any ideas .
    thank you .

    It will be - he meant that they start the background job from SE38/SA38 not run it online.
    SY-SLSET is a starter point for checking the variant used - dynamic variants are used when you don't pick one from the list.  However, this would not help if the user picked a variant and then scheduled the job dynamically.  Another option is to use function GET_JOB_RUNTIME_INFO in your program.  Assuming your scheduled jobs are named differently, you can check for the condition by checking the name of the running job.  Dynamically created jobs will have the program name as the job name.

  • What is the difference between background job and foreground job

    Hi Experts,
    Could you pls tell me
    What is the difference between background job and foreground job
    and where exactly used background jobs...
    Thanks

    Hello,
    Background jobs - without user interaction, scheduled via SM37.
    Foreground jobs - with user interaction (transactions).
    For more information, please read these: [http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbda449911d1949c0000e8353423/frameset.htm], [http://help.sap.com/saphelp_nw04/helpdata/en/73/69ef5755bb11d189680000e829fbbd/frameset.htm] and [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20cb0b44-8f0b-2a10-2381-ca8162bcb5b2].
    Regards,

  • Delete Job for Job and Spool

    Hi,
    Is anyone aware of one single delete job for both Jobs and Spools? We can use RSSPO041 and RSBTCDEL separately, but I am looking for a single job. Please let me know.
    Thanks,

    Hello
    As Subhash mentioned there is no single report for doing this.
    Probably you can create a single job with these two reports being part of it as steps.
    That will give you better control or single job to be checked for completion.
    Regards
    Vivek

  • Retrieve cancelled background job and display it user on the selection scre

    Hi all,
    i am executing a background job and if successful it sends an email to the user .
    if the job gets cancelled i want to display the job status to the user or email the user .
    can anyone share your experiences on this .
    thanks in advance.
    regards,
    Ry

    U can use the FM 'BP_JOBLOG_READ' for the aborted jog to get their  status log..then u can send this log to the user via mail.
    pl. check this sample code..
    REPORT ZEXAMPLE.
    DATA: JOBLIST LIKE TBTCJOB OCCURS 0 WITH HEADER LINE,
          JOBDETS LIKE BTCSELECT,
          JOBLOG  LIKE TBTC5 OCCURS 0 WITH HEADER LINE,
          V_ANS.
    PARAMETERS P_UNAME LIKE SY-UNAME DEFAULT SY-UNAME OBLIGATORY.
    IF NOT P_UNAME IS INITIAL.
      JOBDETS-JOBNAME     = '*'.
      JOBDETS-USERNAME    = P_UNAME.
      JOBDETS-FROM_DATE   = SY-DATUM.
      JOBDETS-TO_DATE     = SY-DATUM.
      JOBDETS-NO_DATE     = 'X'.
      JOBDETS-WITH_PRED   = 'X'.
      JOBDETS-PRELIM      = 'X'.
      JOBDETS-SCHEDUL     = 'X'.
      JOBDETS-READY       = 'X'.
      JOBDETS-RUNNING     = 'X'.
      JOBDETS-FINISHED    = 'X'.
      JOBDETS-ABORTED     = 'X'.
    ENDIF.
    CALL FUNCTION 'BP_JOB_SELECT'
         EXPORTING
              JOBSELECT_DIALOG    = 'Y'
              JOBSEL_PARAM_IN     = JOBDETS
         TABLES
              JOBSELECT_JOBLIST   = JOBLIST
         EXCEPTIONS
              INVALID_DIALOG_TYPE = 1
              JOBNAME_MISSING     = 2
              NO_JOBS_FOUND       = 3
              SELECTION_CANCELED  = 4
              USERNAME_MISSING    = 5
              OTHERS              = 6.
    IF SY-SUBRC EQ 0.
      IF NOT JOBLIST[] IS INITIAL.
        READ TABLE JOBLIST INDEX 1.
        CALL FUNCTION 'BP_JOBLOG_READ'
             EXPORTING
                  JOBCOUNT              = JOBLIST-JOBCOUNT
                  JOBNAME               = JOBLIST-JOBNAME
             TABLES
                  JOBLOGTBL             = JOBLOG
             EXCEPTIONS
                  CANT_READ_JOBLOG      = 1
                  JOBCOUNT_MISSING      = 2
                  JOBLOG_DOES_NOT_EXIST = 3
                  JOBLOG_IS_EMPTY       = 4
                  JOBLOG_NAME_MISSING   = 5
                  JOBNAME_MISSING       = 6
                  JOB_DOES_NOT_EXIST    = 7
                  OTHERS                = 8.
        IF JOBLOG[] IS INITIAL.
          WRITE:/ 'NO JOB LOG FOUND'.
        ELSE.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
               EXPORTING
                    TITLEBAR      = 'DELETE JOB LOGS'
                    TEXT_QUESTION = 'JOB LOGS FOUND. DELETE?'
                    POPUP_TYPE    = 'W'
               IMPORTING
                    ANSWER        = V_ANS.
        ENDIF.
        IF V_ANS EQ '1'.
          CALL FUNCTION 'BP_JOB_DELETE'
               EXPORTING
                    JOBCOUNT                 = JOBLIST-JOBCOUNT
                    JOBNAME                  = JOBLIST-JOBNAME
               EXCEPTIONS
                    CANT_DELETE_EVENT_ENTRY  = 1
                    CANT_DELETE_JOB          = 2
                    CANT_DELETE_JOBLOG       = 3
                    CANT_DELETE_STEPS        = 4
                    CANT_DELETE_TIME_ENTRY   = 5
                    CANT_DERELEASE_SUCCESSOR = 6
                    CANT_ENQ_PREDECESSOR     = 7
                    CANT_ENQ_SUCCESSOR       = 8
                    CANT_ENQ_TBTCO_ENTRY     = 9
                    CANT_UPDATE_PREDECESSOR  = 10
                    CANT_UPDATE_SUCCESSOR    = 11
                    COMMIT_FAILED            = 12
                    JOBCOUNT_MISSING         = 13
                    JOBNAME_MISSING          = 14
                    JOB_DOES_NOT_EXIST       = 15
                    JOB_IS_ALREADY_RUNNING   = 16
                    NO_DELETE_AUTHORITY      = 17
                    OTHERS                   = 18.
          IF SY-SUBRC EQ 0.
            WRITE:/ JOBLIST-JOBCOUNT, JOBLIST-JOBNAME, 'LOG DELETED'.
            EXIT.
          ELSE.
            WRITE:/ JOBLIST-JOBCOUNT, JOBLIST-JOBNAME, 'LOG NOT DELETED'.
          ENDIF.
        ELSE.
          CALL FUNCTION 'BP_JOBLOG_SHOW'
               EXPORTING
                    JOBCOUNT                  = JOBLIST-JOBCOUNT
                    JOBNAME                   = JOBLIST-JOBNAME
               EXCEPTIONS
                    ERROR_READING_JOBDATA     = 1
                    ERROR_READING_JOBLOG_DATA = 2
                    JOBCOUNT_MISSING          = 3
                    JOBLOG_DOES_NOT_EXIST     = 4
                    JOBLOG_IS_EMPTY           = 5
                    JOBLOG_SHOW_CANCELED      = 6
                    JOBNAME_MISSING           = 7
                    JOB_DOES_NOT_EXIST        = 8
                    NO_JOBLOG_THERE_YET       = 9
                    NO_SHOW_PRIVILEGE_GIVEN   = 10
                    OTHERS                    = 11.
        ENDIF.
      ELSE.
        WRITE:/ 'NO JOBS FOR', P_UNAME.
        EXIT.
      ENDIF.
    ENDIF.
    Regards,
    Joy.

  • ALV report run In background gives 2 spool numbers

    Hi ,
    The ALV report which I am running in Background gives me 2 spool numbers after the Job is created in sm37.
    I am just executing my ALV report by running it in backgroung procressing, but I get 2 spool one has all the correct data of the ALV and 1 blank spool is created.
    I have Passed the followin parameter to my ALV FM.
      lwa_print-no_change_print_params = 'X'.
      lwa_print-no_print_listinfos = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program       = sy-repid
         i_callback_pf_status_set = 'SET_PF_STATUS'
         i_callback_user_command  = 'USER_COMMAND'
         i_default                = space
         is_layout                = t_layout
         is_print                 = lwa_print
         it_fieldcat              = t_fieldcat
       TABLES
         t_outtab                 = t_final
       EXCEPTIONS
         program_error            = 1
         OTHERS                   = 2.
    Unable to find the reason why I get 2 spool created for it?
    Thanks
    Ritesh

    Hi venkatesh,
    Thanks for the reply.
    I tried that also but issue was due to a SKIP statement called in the program and due to which a new spool which was blank was called.
    The issue is resolved.
    Thanks
    Solanki Ritesh

  • Background Job Processing Spool Retention period

    Hi ,
    In my program i am calling another ABAP program and sumitting the same as a background job(using Job_Submit,Close etc.)
    In this case i can view the Spool generated by the called program(using sm37).
    But this spool exists for a very less period in the system.Is it possible to specify a retention period,as 90 days in my case.?
    Pls Help !!!
    Answers will be rewarded.
    Regards,
    Rohan

    hi Roahn,
    You must set print parameters before the printing process starts.
    When printing lists after creating them, the system uses the print format specified in the print parameters to split the completed list and fit it onto the print pages, truncating it if necessary.
    When printing lists while creating them, the system uses the print format to actually format the list in the program.
    Print parameters are set either interactively by the user or from within the program.
    For each print process, the spool system needs a complete and consistent set of print parameters. In ABAP, the structure PRI_PARAMS (ABAP Dictionary) represent a set of print parameters.
    When passing the print parameters interactively, the system displays a dialog box after starting the report, on which the user has to enter the most important print parameters.
    It's shown below which input field of the Print List Output dialog window conform to which PRI_PARAMS component.
    Input field----
    Retention period
    Component-------PEXPI
    Meaning----
    Number of days for which the system holds the spool request before deleting it. (Default value: 8).

  • BackGround Job's Spool Request is having "Waiting" "Frontend unavailable"

    Hello Friends,
    I am facing one problem related to Spool Request, which is generated through Scheduled Background Jobs (scheduled by funcional people).
    The Background Job is having status "completed" when analyzing it. But, its associated Spool Request is showing "waiting" Status, with "Frontend unavailable" as Status Text.
    Here is the brief status of that Spool Request.
    28448     1      300 USER1 00:00 LP01 X_65_80      Frontend unavailable
    in Detail:
    Description          Value
    Status:              Frontend unavailable
    Last event:
    Message:             Request on hold
    Date:                01.07.2009
    Time:                00:00:27
    Job status:          On hold
    Error class:         Delayed
    Area:                Data transfer
    Printout:            Not printed
    The Setting of LP01 O/Device is as followed:
    Output Device        LP01
    Device Type        SWIN SWIN  : Windows printing via SAPlpd
    Device Class      Standard Printer
    Host Spool Access Method       F F: Printing on Front End Computer
    Host printer                     __DEFAULT
    Moreover, the SAP User USER1 is allocated LP01 as Output Device with "Output Immediately" & "Delete After Output" checked status.
    Some Background Jobs are showing the same status for this LP01.
    I have a doubt on allocated O/P Device LP01.
    Any Clue for this issue ?
    Regards,
    Bhavik G. Shroff

    Hello Markus,
    Here , in our Landscape , there is not Print Server. All are taking prints through, Networked Printer and their local connected Printers.
    Can i configure "send to SAP Spooler for now" instead of "Print Immediately "in the Print Specification of those Background Jobs ?
    Moreover, Some Background jobs are sending E-Mails with the processed Reports as an Attachments. They are showing sometime unexpected behavior, in sending emails,  although there is no relation is with this Printing related issue.
    When i am looking into "Overview of Send Orders" of SCOT, some Background Jobs are showing success for sending emails, and some are not showing success, even though All the recipients are same for the scheduled Background Jobs which are running on same time.
    Regards,
    Bhavik G. Shroff

  • Mails are not generated in background Jobs and not shown in SOST.

    Dear All,
    I have facing issue regarding to system mails. I want to send mails the various reports automatically from SAP System to different recipients. So I scheduled that reports at background and in their spool list recipient I have added distribution list.
    But that mails are not generated, it is not shown in transaction SOST also. When I send mails manually it goes successfully to only our company domain recipients. But not other domains. How should I resolve this problem?
    Please help me out.
    Thanks in advance.
    Amit

    Hi Srihari,
    I have checked the background jobs they showed it finished. Following logs are shown in job logs. Is problem is due to 3rd log??
    18.03.2012 14:23:34 Job started    00           516          S
    18.03.2012 14:23:34 Step 001 started (program RFITEMAP, variant PDC FARMAR, user ID DEVELOPER1)      00           550          S
    18.03.2012 14:23:37 No items selected (see long text)                                              MSITEM         033          I
    18.03.2012 14:23:42 Spool request (number 0000026302) created without immediate output               SY           355          S
    18.03.2012 14:23:46 Job finished                                                                     00           517          S
    When I saw further details of 3rd log it following message.
    No items selected (see long text)
        Message no. MSITEM033
    Diagnosis
        No line items meeting your selection criteria could
        be for the following reasons:
        1.) No corresponding items have been posted.
        2.) You are not authorized to display this data.
        3.) The items have already been archived.
    Please help me out.
    Thanks
    Amit

Maybe you are looking for

  • ADMIN CAN'T UNLOCK SYSTEM PREFS!!! THIS IS A BUG, PEOPLE!

    Ever since I upgraded to Maverick, I haven't been able to change my locked system preferences. They just won't unlock, no matter what I do. Everywhere I've gone to get some clarity on this problem, all anybody asks is if I'm the Admin, like I'm some

  • How to upload multiple files in Webdynpro using File upload Screen Element

    Hi Experts,       Can anybody tell me how to upload multiple files/pdfs in webdynpro using file upload screen element, and also please tell me what is the maximum storage limit of RAWSTRING data type,Advance Thanks. Regards, Sandesh

  • RV_PRICE_PRINT_ITEM - relating TKOMVD to TKOMV

    We call function module RV_PRICE_PRINT_ITEM to get the item pricing conditions for the document to be printed. It returns two tables: TKOMV has all the conditions for the item, and TKOMVD has only the conditions to be printed, which is usually only o

  • Need help with N97 message...

    whenever i send or recieve SMS, my phone appear "Memory Full" though i delete all message and change the memmory in use is Mass memory.  Plz help me...

  • Phone not ringing only vibrating

    Hi, my phone is not ringing for incoming calls, messages, emails, alerts or for the alarm.  Only vibrating.  I have checked the mute button, updated all sound settings, turned phone off and on again and reset the phone. Still no go.  Any suggestions?