Spool need to create for Batch cancelled job

Hi Experts,
How can we display spool for the batch job which has been cancelled.
I ve executed alv output in background job. But, some condition is not satisfied, so it has been terminated( job is cancelled).  I need spool for the cancelled job.
any suggestions.
Thanks
GR

HI Kiran,
I have created program with ALV grid output, that they are running in background.
Here is the code,
     IF NOT sy-batch IS INITIAL.
*program termination
        MESSAGE a203(z3) WITH s_vari-low text-025.
      ENDIF.
    ENDIF
Before to this code i am calling ALV GRID...
If i run in background Its creating a spool.  But, after termination deleting the spool. 
How can i make changes that the spool should not delete in batch job.
Thanks & Regards
GR

Similar Messages

  • Help needed in creating a batch job for delivery

    Hi gurus
    Can somebody tell me the process of creating a batch job ..for creation of delivery.. is this the same process to create the batch jobs for invoices also?
    thankyou
    bj

    hello jaya ,gsl
    thankyou very much for ur help .. I have tried creating a variant .. in vl10batch.. and ive assigned it a scheduled time .. i craeted a open order..  and when the scheduled time has arrived and is over,i went to the order and still i dont see any delivery doc created .. and in sm37 its shows that the job is finished ..i even tried sm36 .. of creating a job for the variant.that ive craeted in vl10batch .and then assigning the job in sm37.. i can see the job that ive created in sm37 it is changing its status from released to finished .. as per the scheduled time but the delivery is not created .. i tried vf06 for a billing   variant.. and went to sm36 craeted a job for the variant..using the program name.. and next to sm37 i can  see the created  job in the spool also..but somehow it is  not creating the billing doc also..
    can u help me to find where it actually went wrong with me ?
    thanksalot in advance..

  • 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

  • Object link is not created for batch  through BAPI_DOCUMENT_CREATE2

    Hi ,
    I am trying to create  document for batch object through program using bapi BAPI_DOCUMENT_CREATE2.
    In transaction CV01N while creating document  there is a provision to to link your material with Batch. I am able to create it through CV01N. But, While creating through program I am not able to create the object link. I am able to create link for material,vendor,PO.. but not for BATCH objects. The table where link objects values to be passed is OBJECTLINKS.
    I have tried all possible combination but unable to create a batch object link to a material through BAPI_DOCUMENT_CREATE2.
    Thanks,
    Sandeep

    Hi,
    Please explain detailly about FM BAPI_DOCUMENT_CREATE2
      Thanks
      Madhavi

  • How many TO need to create for Quality inspection material

    Dear all,
    When we do GR's ,TR is created & material is goes for quality inspection .
    So after UD, PCN is created so for this PCN we need to Create & Confirm TO.
    So my question is what we do for open TR which was created after GR posting.
    DO we have to create TO for this TR.
    I mean how TO get's created in this process?
    Please help me out.
    Regards,
    Rock

    what do you do physically?
    a) do you keep the stock in goods receipt area until it is released from the Q status
    b) or do you putaway that stock into its destination bins before it is released from Q-status
    in both cases you use the TR that was automatically created during goods receipt to create the TO.
    in case a) you just execute LU04 to process the posting change notice to change the stock status from Q to unrestricted  prior to creation of the TO.
    in case b) you create the TO directly and process the PCN in LU04 later when the usage decision was made.
    part B can create some difficulties (especially if you setup automatic processing) as you may get several quants because the material need more than one destination bin, while you just have 1 quant in the GR area 902.  So SAP may not be able to determine the quant that needs to be released from Q status by itself, and user has to select those quants manually.

  • Job Spool ID non-existent for recently ran jobs

    There is a job that is ran daily which generates a spool output each time. But for some reason, today's spool does not exist in tables TBTCP-LISTIDENT or TBTC_SPOOLID-SPOOLID. However, I can view the spool output in sm37 just fine. For previous runs before today, the spool information shows up in those tables as expected.
    I've also tried running BP_JOB_READ, whose output JOB_READ_STEPLIST-LISTIDENT is initial. Again, for previous days it shows the correct spool id..
    I need to access the spool output programmatically after it is created (but in a new program). I would prefer to do this instead of creating an enhancement..
    Does anyone know what is going on here?

    answer:
    i was using schedule date
    see tbtco for run date
    Edited by: erich meier on Aug 4, 2009 8:00 PM

  • Profit center document is not created for invoice cancellation document.

    Hi all,
    when i create the invoice, Profit center document is getting created,
    where when we try to create a cancellation document for the same invoice, Profit center document is not getting created,
    can anybody let me know where can i check this problem??
    and can u let me know Profit center document creation is dependent on BILLING DOCUMENT TYPE?
    Thanks in advance,
    Krishna Dussa

    Hi Krishna
    First of all Check wheather Profit center is there or not in the Material master record when you are cancelling the billing document..If it is there then with the help of your ABAP team ,ask them to debug by putting once you run VF11
    Regards
    Srinath

  • Spool Request Not Created for Dunning Printing

    Hi,
    We are running Dunning Program and Printing dunning Letters, system automatically printing Dunning letter and finishing the printing job, not generating any Spool Request.
    For testing purpose, we re-generated dunning letters through from DUNNING History, there system Generating Spool request.
    Any guess, do we missing something to generate Spool request in Dunning printing through normal process, we are using Zform.
    Regars...Raja

    Dear,
    If it is Z program then please debug the same with the help of ABAper and check if the data is picked or not also you can check with your Basis Consultant.
    Br,Vivek

  • How to create new Batch No for An Item

    Dear All,
              I am doing Issue for production task through DI API. In that I need to Create a Batch no for an Item. That item was created as Batch with Release only in Item Master. Please help me how to create the batch no when I am Issue for Production ?.
    Thanks,
    lingam.

    Dear Lingam,
    If the process need manual selection as the one you are requesting, it will not be available to DI API. You may try UI API to see.
    Thanks,
    Gordon

  • Script for batch processing

    Hello
    I need help
    I created a batch sequence which set watermark and security to pdf files from one directory. Now i want to create another sequence: 1. set security to none and 2. delete watermark.
    I have a problem with set security to none because every time i need change preferences for batch process to security method=password security by hand.
    Maybe there is a way to change this settings with java script in batch "execute java script"?
    Or how i can change with batch sequence a security method from passsword security to "none" if i know password
    Thanks in advance

    Create a "blank" batch process (ie, without any action), but under the Output Options tick the box to optimize the files and set the optimization settings you want to use.

  • Why do we need material specification for transfering results to class char.

    Hi,
    Can you guys tell me why do we need to create material specification if we want to transfer quality inspection results to a batch class?
    Basically I have done the following:
    -Create Class Characteristic
    -Assign the Class Characteristic to a batch class
    -Link Class Char.  to MIC
    -Assign MIC to an Inspection Plan
    -Post GR, batch and inspection lot are created automatically
    -Record Results for inspection Lot
    -Make UD for Inspection Lot
    The result is not transferred to batch class, then I create material specification with the MIC assigned, the results can be transferred. But why?
    Best regards
    Danny

    Hello Danny,
    This is a standard program, which checks for this indicator at the time of inspection lot completion.
    F1- help gives satisfactory explanation
    Batch Valuation Possible Without Specification
    Use
    If you set this indicator, a link between the master inspection
    characteristics and the class characteristics for the batch class must exist
    when an inspection lot is created, for batch valuation to occur when the usage
    decision or inspection point valuation is made. A link within the material
    specification is not required.
    If you do not set this indicator, batch valuation only occurs when the
    usage decision or inspection point valuation is made, if a link using the
    material specification exists between the master inspection characteristics and
    the class characteristics for the batch class. In this way, you can control on a
    material-dependent basis whether the batch characteristics are valuated based on
    the inspection results.
    Amol.
    Message was edited by: Amol Manave : Main purpose is you can control whether Batch characteristics should be valuated based on results or not for particular material. If you set this indicator then batch characteristics will be valuated for all materials and in opposite case Batch characteristics will be valuated for only materials for which Material Specification exists.

  • Workflow for Preventive Maintenance Job Approval

    I need a workflow for Preventive Maintenance Job Approval.
    Whenever a PM user issues for a Preventive Maintenance Job it should go for approval up to two level of authority.
    Can some one suggest some standard tasks or workflow template which will be useful for the purpose?
    Regards,
    Manas

    Hi Manas Santra,
    I dont think that there is a standard workflow is available for preventive maintanance.
    Thanks and Regards
    Balaji E.

  • I Need to Create a report for batch jobs Based on Subject Area.

    Hi SAP Guru's,
    I need to create a report , that it must show the status of batch jobs Completion Times based on Subject area(SD,MM,FI).
    Please help me in this issue ASAP.
    Thanks in Advance.
    Krishna.

    You may need to activate some additional business content if not already installed but there are a lot BI statistics you can report on. Have a look at this:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/f9bd5b0d40537de10000000a1553f6/frameset.htm

  • Creating a Batch Job for Executing Later

    Hi Experts!
    I was wondering if there was a way to create a batch job, but to have it executed at a later time, since we do not have an exact date and time we need these jobs executed.  My goal is to create 12 batch jobs (1 for each month), but have them excuted, when I need them too, when I choose it.  Is this even possible?.  I tried looking through SM36/SM37, but could not find anything on it.  Please advise and thanks in advance!
    WC

    Hi Will,
    The standard job scheduler will not do this (SM36/7).  You do not mention what release you are using, but SAP Central Job Scheduling with Redwood does provide the ability to create jobs with boolean conditions like you describe (plus much, much more).  See the Service Marketplace http://service.sap.com/job-scheduling or the SDN page https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/abb91c2a-0b01-0010-6ca6-9f0f62268454. [original link is broken]
    Best Regards,
    Matt

  • Is it possible to create a batch job for program RPRCCC00

    Dear All,
    I want to create a schedul batch job for program RPRCCC00. Have you come across with this scenario.
    Thanks in advance
    Regards
    Shanu

    Hi,
    Yes, you can create a batch job of the program RPRCCC00.
    Using SM36 transaction, you can create a batch job.
    Hope this helps.
    Thanks,
    Prashanth

Maybe you are looking for

  • Javascript for multiple date fields

    Hi all- I have to write javascript for 15 different date fields in a form. The requirement here is that we convert all date fields on Page 100 from date pickers (editable date fields) to display-only date fields with two controls for the users to set

  • Error while invoking the URL of xcm for ISA application

    Hi, I am getting the an error when I invoke the below urls. I am working on ISA application. http://localhost:port/xxx/b2b/init.do http://localhost:port/xxx/admin/xcm//init.do The code was build successfully without any errors. Error: Application err

  • Network Issues with Macbook Pro Retina will Apple Router solve issues?

    Hi, I just purchased a Macbook Pro Retina 15" and have been having major WIFI/Internet issues.  Slow connections, constant spinwheel of death, half loading pages if the website has a lot of images (Facebook, etc).  Sometimes I have to wait a fair bit

  • Convert .flp file into exe

    How i convert an *.flp file i.e a flash project into an exe file

  • Need to know which query to use  in BI 7.0 BI Statistics

    Hi I want to develop a query that gives like user id, query name and how many times executed in a given period. We are using BI 7 stats content. I like to know what chars and key figures to be used on my query. My selection criteria is given a query