Back ground job: Spool as a attachment in mail

Hi,
A mail should be sent to the user in the distribution list on compleiton of the background job of a program. Along with that, the spool need to be sent as an attachment.
Please let me know the steps involved in triggering a mail after completion of batch job and the attachment of spool.
Thanks in advance.
Regards
Suresh Kumar

*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
<b>Reward points</b>
Regards

Similar Messages

  • How To Handle With Back Ground JOB From WEBUI When Click On "Appove"

    Hi
    How To Scheduled A Job Through ABAP Report In back end  Of CRM when i click on "Approve" Button in WEBUI  From result list.
    As per My requirement I have a Search View and Result View
    In Search View I have  Below Fields
    ITC Vendor ID    
    Claim Status
    User status (date status changed)
    Model
    Serial Number
    Date completed of Service Completion
    Based on Search Criteria I will get Result In Result View.(Suppose 10 Records I got In Result View)
    In the Result View I need to Add one Button As "Approve"
    When i Click On Approve button One Pop up Message Need to Open And In that popup window I need to Display Below Text
    "Approve  Claim Job Has Started In Background  
    Note: Only Claims Which are in Submitted  Status  Will be  Approved. you May Close This Window"
    In SAP CRM System  Back Ground Job Need To Start When Click On "Approve" Button In WEBUI .
    In the Back Ground ABAP Report which will validate based on Result List Records"
    In the Result List we may have all types of Claims which are status in "Submitted" "Pending" "Rejected" "Approve".
    I need to collect all records from Result list and validate Those Records who's Status in "Submitted
    1)Sort all the claims based on ITC Vendor ID.
    2)Grouped all the submitted claims against each ITC Vendor ID from the search result
    3)Change the status of the selected submitted claims to Approved.
    4)Displays information messages as mentioned whenever a claim is approved, the same message will be captured in the job log.
    ‘Claims <ClaimID 1>,…<ClaimID N> now approved for ITC Vendor ID’.
    5)Sending Email to each IRC.
    6)Capture all the approved claims in the below format (Format Attached "Screen Shot Attachment")
    7)Store the file in the Application Server AL11 in .csv format
    Please Find Attachement For Reference.
    1)ITC Claim Screen Shot
    2)Screen Shot For Attachment
    Thanks
    Raj

    Hi,
    You can add the following code in on approve method to show popup to the user,
    IF req_edit IS NOT BOUND. " gloabl attribute in impl class of the view
        REFRESH lt_buttons.
        lss_button-id  = 'btnyes'.
        lss_button-text = 'YES'.
        lss_button-on_click = 'YES'.
        APPEND lss_button TO lt_buttons.
        CLEAR lss_button.
        lss_button-id  = 'btnno'.
        lss_button-text = 'NO'.
        lss_button-on_click = 'NO'.
        APPEND lss_button TO lt_buttons.
        CLEAR lss_button.
        CALL METHOD comp_controller->window_manager->create_popup_2_confirm
          EXPORTING
            iv_title          = 'ATTENTION'
            iv_text           = 'Are you sure you want to edit this document?'
            iv_btncombination = '99'
            iv_custombuttons  = lt_buttons
          RECEIVING
            rv_result         = req_edit.
        req_edit->set_on_close_event( iv_event_name = 'EDIT' iv_view = me ). "#EC NOTEXT
        req_edit->open( ).
        RETURN.
      ELSE.
        lr_node ?= req_edit->get_context_node( 'OUTPUTNODE' ).
        lv_outbound = lr_node->get_event_name( ).
    *  CLEAR ptc_pricing_status.
    *    lv_outbound = req_edit->get_fired_outbound_plug( ).
        IF lv_outbound = 'YES'.
    you can use the submit report code here and you can al the validations here
        ELSE. " No
    if user clicks no nothing to do..
        ENDIF.
        CLEAR req_edit.
      ENDIF.
    Best Regards,
    Dharmakasi.

  • Scheduling Back Ground job

    Hi All,
    I need to schedule a daily background job for MB52 transaction and need to save the output of MB52 in a specified directory .
    Can any one tell me whether it is possible to save back ground job output in specified directory?
    Thanks & Regards
    k.Nirmala

    Hi Nirmala,
    Set up variant at MB52 transaction and use SM37 and Sm36 transaction to schedule job.
    Define job at Sm36 and use program - RM07MLBS and use your variant.
    schedule job and set up time and date for periodcally.
    and it will run and you can see the status at SM37 Transaction .
    the background job will create spool and which will contain your output.
    if you want to download your output ,then you need to write custom program to get spool information from TSP01 table and use open dataset command to down load specifi directory.
    Reward Points if it is helpful
    Thanks
    Seshu

  • Back Ground Job Printing Problem

    Dear Experts,
    We schedled one back ground job with spool generation. Ecery thing is working fine but in printing selecton parameters are printing along with out put data.
    That means, if i gave 1000 materials in my variant, in spool first 1000 materials are printing an then actually out put is printing. i need to avoid these printing of selection set.
    Please help me...
    Thanks in advance

    Hello,
    Pleas find if there is any "PRINT_SELECTION" function module in report, which should be responsible for printing selection screen parameter values.
    Thanks.

  • Output should be in Text format from Back ground job

    Hi friends,
    I have scheduleda back ground job. In the receipent i ahve put my user mail ID. when the job was finished the output came as HTML file. where as my user wants a Text file or excel file.
    We are in ECC 5.0 and i am just scheduling standard ABAP program( costing run
    Is it possible , if yes then, please let me know where to change the setting.
    Cheers
    PK

    Hi,
    I tried the same , it did not work for me. But when i contacted my Basis Guy through SCOT he changed. Now the text file has started coming.
    But now next problem is my spool request is of 215 pages but system is sending the text file for only first 10 pages..
    I have changed the setting for display from 10 pages 215 pages . and belwo even changed the seeting to permanenet between logons..Still system did not send the file to email Id.
    can you help mein this regards
    cheers
    PK

  • FIREFIIGHTER Back Ground Job !

    I am on FF 3.0 CC 4.0
    On I run the FF Log, I am told that the File is not genereated as the Back Ground Job is not scheduled.
    Which is th e back ground Job needed to get these reports ?
    Thanks

    What i guess from your query is:
    1) Probably there is no activity by firefighter users or you need to schedule background job on hourly basis, the general practice is every 2 hours.
    2) You can use any id with super administrator previledges to schedule background jobs.
    Hey, I just wanted to ask you, does your firefighter controllers getting logs attached to e-mails and is the format of log report seems fine to you?
    just confirm, cause there are two notes required to be applied in sequence.
    1) 1046405
    2) 1053315
    Also it would be great, if you upgrade your GRC FF, CC solutions. I was in college when these products were rolling in the market and I never had the honor to experiment.
    Best Regards,
    Amol Bharti

  • How to find the back ground job details

    Hi All,
       I have a back ground  job running from many days, now we would like to know when this job was created on what date this job actvlly created and schuduled.
               Please informe me how to check this.
    Thanks & Regards,
    Muralikrishna

    On SM37 screen there is plenty of options are there:
    This is what i got from SAP help
    Explanation for each selection field:                                                                               
    o   Jobname: Name of the job as an identifier.                                                                               
    o   Username: Name of the user who designed and planned the job.                                                                               
    o   Start date: The start condition of the job, which could be a time 
    frame or an event that the job is waiting for. Specifying both will   
    yield jobs whose starting condition is  either of the two             
    conditions.                                                                               
    ABAP program step: Name of an ABAP program that acts as a step in a   
    job.                                                                               
    Status selection: The current status of the job. By default, the      
    SCHEDULED option is not marked. To see the scheduled jobs, you must   
    explicitly check this.
    also give the proper values in Job Satus also.

  • Error while activating ODS is not caught in the back ground job..

    Hi All,
    We have a back ground job to load data to ODS and to activate it..If there is any error while loading or activating the data, back ground job is going into loop instead of cancelling the job..As the job is going into loop we are unable to trace the error unless we cancel the job manually and checking it..We have switched off displaying any messages while doing the back ground job...also we can not set any time limit for the job as it always depends on the volume of the data.
    My requirement is , back ground job must get cancelled if there is any error while loading the ODS..Can anybody suggest any idea on this..
    Thanks for reading.
    Umamaheswar kumar

    Hi Uma,
    A few hints for running and schedule and monitoring process chains:
    - always schedule the process chain in tcode RSPC
    - check the log in RSPC for error messages, or
    - check BW monitor for the ODS concerned (tcode RSMO, tab Details)
    if anything is not working fine, the status of the corresponding load will show you the errors, warnings ...
    either in RSPC - log or RSMO.
    hope it helps.
    Regards,
    Lilly

  • Back ground job problem

    hi every  one,
      pls help me out in this.
      i have written a program to create a wbs element.as it takes  20 to 30 min to create one element in production.in my program, there is part of code which creates wbs elements.
    so i want to run tht part of code in background.
    only part of code.
    even i did the coding for it. i wrote  a new program and i pasted that part of code in new program.
    and this new program i m submitting in old one by creating a back ground job.
    i m exporting few required internal tables for new report.i hav imported all internal tables in new report also..
    but still this importing exporting is not happening..pls
    tell me wat can be the problem..
    thanks..

    Your code is not optimized according to performance,can you sed me your code ...
    see my business card  for my  id.
    Thanks

  • Max no of lines appear in the back ground job out put

    Dear All,
    Please help me to solve following query,
    I am execution ME2N report in background. There are more then 100000 line item in the out put. However only 5000 line appear in the output of background job.
    Is there any setting in sap, where i can change the max no of out put is more then 100000 in back ground job?
    Your earlier answer should be highly appreciated?
    Regds,
    sp sahu

    Click on the settings button and choose the 'The last' radio button for dispaly area and put in 10 pages.
    Sometimes just clicking on the Last page button on the Tool bar will do the trick

  • How to download the application file to local file by back ground job?

    hi:
      can any one tell me how to download the application file to local file by back ground job? thanks in advance..
    Monson

    Hi,
    In order to download a file from application layer to a local file in background,
    first write a report(ZREPORT1) in which do the following steps:
    OPEN DATASET g_file_1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    loop the g_file and append all the data into another internal table.
    end of this report you shd have all the data in the application layer file into your internal table.
    Now create another report(ZREPORT2) and submit this report in background.
    that is,
    JOB_OPEN
    JOB_SUBMIT and
    JOB_CLOSE
    and in job_submit submit ZREPORT1 which downloads the file in application layer.
    Please reward points if helpful.
    Regards,
    Arul.

  • Back Ground Job scedule (emergency)

    Hi all ,
    I have scheduled Back Ground Job in Production System at morning 11am, now the job is in running status,but i wonder that before the status come to completed the
    LAST RUN Column is filled with Date and time same at 11:am.
    Please find the below job log details i am pasting last few lines of job log
    Jun 5, 2008 2:15:22 PM com.virsa.cc.xsys.riskanalysis.AnalysisEngine performActPermAnalysis
    INFO:  Job ID:6 : Before GC => memory usage: free=481M, total=1009M
    Jun 5, 2008 2:15:22 PM com.virsa.cc.xsys.riskanalysis.AnalysisEngine performActPermAnalysis
    INFO:  Job ID:6 : Analysis starts: HTREMGMT2
    I would like to know wheather job is running or terminated.
    Wat is the sequence of JOB status in CC5.2.
    Kindly do the needfull.

    Hi Amol,
    Thank You very much for ur quick reponse,
    please find the view job log details
    (last few lines)
    Jun 5, 2008 3:07:12 PM com.virsa.cc.xsys.riskanalysis.AnalysisEngine performActPermAnalysis
    INFO:  Job ID:6 : 464 out of 818 (56%) done
    Jun 5, 2008 3:07:12 PM com.virsa.cc.xsys.bg.BgJob setStatus
    INFO: Job ID: 6 Status: Running
    Jun 5, 2008 3:07:12 PM com.virsa.cc.xsys.riskanalysis.AnalysisEngine performActPermAnalysis
    INFO:  Job ID:6 : Before GC => memory usage: free=347M, total=1009M
    Jun 5, 2008 3:07:12 PM com.virsa.cc.xsys.riskanalysis.AnalysisEngine performActPermAnalysis
    INFO:  Job ID:6 : Analysis starts: MACTUSER17
    Jun 5, 2008 3:07:21 PM com.virsa.cc.xsys.meng.ObjAuthMatcher <init>
    FINEST: ObjAuthMatcher constructed: 0ms, #singles=970, #ranges=0, #super=0
    Jun 5, 2008 3:07:22 PM com.virsa.cc.dataextractor.bo.DataExtractorSAP getObjPermissions
    FINEST: getObjPermissions: elapsed time=891ms
    can u tell me the job status sequence

  • Back ground job work in MM

    CAN ANY BODY TELL ME WHAT IS A BACK GROUND JOB WORK IN MM pls explain it with good example tell me 1 or  2back ground job work relevent transactions
    good answer will be awarded
    kiran

    Hi,
    Background job means system will automatically perform some transaction / actions at perdetermined time based on the variants selected for that program.
    Ex 1: You want to see the list of PO or PR or Production order created for a day, you can create a ABAP program and give the creation date in selction screen.
    Provide the Plant or doc type, file path to download the report etc..
    and save the variant.
    You can set this program to run during mid night( 11.00 p.m) with the sysytem date (crrent date).
    So system will run this program and extract the report in Application server level as per the file location given in the program selection screen.
    Ex 2:
    MRP program
    Ex 3.
    Auto PO creation program
    Thanks,
    Kumar Arcot

  • How to reschedule a Back ground job in Normal ABAP from Web Dyn Pro abap application??

    Hi Experts,
    How to reschedule a Back ground job in Normal ABAP from Web Dyn Pro abap application??

    Can you give us some more information? Background jobs primarily don't have anything to do with Webdynpro.

  • Scheduled back ground job not finishing

    hie gurus, i need your help with back ground scheduling , i have created a background schedule to run my program after every 30min .  in the job overview it shows my job released and active but its not finishing processing . the program being run picks up data from an external data base and then inserting via BDC call transaction. i have tried with a different program that inserts data into a database table and its executing and finishing well in the back ground. What could be the problem ? and how can i debug a back ground job ??

    Daniel,
    To start, BDCs are very out-dated.  I would look for a BAPI if you are calling std SAP functionality.
    Also - direct updates into std SAP tables is a HUGE "no-no"... I hope that you are updating custom tables only.
    Pass that - to debug a b/g job---> 
    1) Set a breakpoint in your program
    2) select the job in SM37
    3) enter JDBG into the SAP fastpath of the SM37 screen and press ENTER
    This will navigate you into a b/g debug - you can then press the debugger buttons to move to your breakpoint.
    Hope that helps.

Maybe you are looking for

  • Guide to sucuessfully installing XP on mbp

    Hey all, I just was wondering if anyone can proive me the correct steps to install Windows XP on my macbookpro. I know you have to use a program called boot camp, and i know you have to partion your harddrive, I just need a step by step process. Than

  • My app tabs disappeared when opening my browser. How do I get them back, without doing a system restore to yesterday?

    When I opened firefox as my browser, I accidentally clicked on it twice, it opened two sessions. I closed one session, but, as it turns out I closed the session that had all of my app tabs, leaving the page that had none of my app tabs. Now, I cannot

  • Can we use concatenate in where clause of a select query

    I have a select query as follows....     SELECT ebeln ebelp belnr vgabe bwart DMBTR                              FROM ekbe                              INTO TABLE i_ekbe                              FOR ALL ENTRIES IN i_blck                          

  • ME_PROCESS_PO_CUST~PROCESS_ITEM Shipping data doesn't get populated

    Hi Gurus, I need your help to solve one issue while populating shipment data  via 'BAPI_PO_CREATE1' to create a PO I am populating poshipping[] and poshippingx[] with Route field and and also 'X' but the value I am passing it is overwritten by other

  • How can I get a UTC timestamp?

    The "Get Date Time in Seconds" VI does not have a UTC option. I have an application that needs the UTC as a timestamp. I could use the "Seconds to Date/Time" with the UTC input as True.  The output of this gives me the UTC in a cluster.  This is show