Function module to start failed batch job

Hi all,
Any function module in ABAP to start the failed batch job run which i will use in a report.
I am using SAP 4.7.
Thanks
Raj

Hi Minish,
Normally, we can call an RFC in background task as below:
CALL FUNCTION func IN BACKGROUND TASK
                     [DESTINATION dest]
                     parameter_list
                     [AS SEPARATE UNIT].
But I am not sure whether your external application can call this RFC in background. But you can create an another RFC and inside call this RFC in background.
Then call the new RFC so that it will internally call the required RFC in background and Immediately after it will be closed.
Regards,
Selva K.

Similar Messages

  • Program or function module to get active Batch jobs

    Hi Experts,
                     I need a program or a FM that would give me the list of active batch jobs and also the time they were running
    for.
    Plz help me out

    You Just follow the below code, It is exactly same as your requirement.
    TYPES:   BEGIN OF ty_itbl,
               jobname   TYPE   tbtcp-jobname,
               jobcount  TYPE   tbtcp-jobcount,
               stepcount TYPE   i,"tbtcp-stepcount,
               sdldate   TYPE   tbtcp-sdldate,
               sdltime   TYPE   tbtcp-sdltime,
               sdluname  TYPE   tbtcp-sdluname,
               status    TYPE   tbtco-status,
               END OF ty_itbl.
      DATA :   wt_itbl TYPE TABLE OF ty_itbl,
               wa_itbl TYPE ty_itbl.
    SELECT     a~jobname
                   a~jobcount
                   a~stepcount
                   a~sdldate
                   a~sdltime
                   a~sdluname
                   b~status
                   INTO CORRESPONDING FIELDS OF TABLE wt_itbl
                   FROM tbtcp AS a
                   INNER JOIN tbtco AS b
                   ON    b~jobname    EQ    a~jobname
                   AND   b~jobcount   EQ    a~jobcount
                   WHERE a~progname IN wp_prog
                   AND   a~sdldate  IN wp_date
                   AND  b~status eq <STATUS>. "<-Give the Active Status here

  • How to use WS_DOWNLOAD funciton module in back ground (Batch Job)

    Hi all,
        Can any one tell,
    How to use WS_DOWNLOAD funciton module in back ground (Batch Job)
    Thanks,
    Ravi Kumar.

    As disussed above you can use DATASET techniques to write the file to the application server. Then you could do a bdc call to Transaction CG3Y to transfer the file to the presentation server.
    Just F1 help on keyword DATASET in SE80 for more information.
    BDC Call Info found here: <a href="http://www.sap-img.com/bdc.htm">http://www.sap-img.com/bdc.htm</a>
    Regards,
    Philip Johannesen

  • Function module ZBAPI_DELV_HU_DETAILS is failing with status TARGET_METHOD_

    Hi,
    Function module ZBAPI_DELV_HU_DETAILS is failing with status TARGET_METHOD_EXCEPTION external server. What could be the reason for this?
    This Function Module will be called within program ZMWXO011. This program will be configured in the output determination for HU's. It will be triggered whenever a relevant HU is created. The BAPI will extract Delivery & HU level data that is required by Exacta & Scan code and send to a predefined TRFC Queue.
    Thanks & Regards,
    Srinivas Reddy.

    Hi Efren,
    Go to transaction ST22 and check for any dump.
    The work item is in process, so there will be a dump in the system.
    The Function module parameters could be a problem.
    ST22 transaction will give you details about the dump.
    Thanks,
    Viji.

  • How to avoid use of function module in case of background jobs?

    Hi ,
           I am working a file tranfer interface .Functionality is to extract file either apllication or presentation server , and process the file  through bapi , send the  result in their respective server. This program should run through batch jobs in background mode.
    I am using following function module :
      SUBST_GET_FILE_LIS : Get the file list from application server
    TMP_GUI_DIRECTORY_LIST_FILES : Get the file list from presentation server
    GUI_UPLOad : to extract file data   from presentation server
    GUI_downLOAD : to download data  to presentation server
    in case of background job these function modules will not work.... so how to resolve this issue...
    what are the methods we can apply?
    Thanks & Regards
    Sandeep

    Hi,
    This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server.  There is no way , by which you can process presentation server files in background mode.
    Regards
    Vinod

  • Difference between check function module and start condition

    Hello Rob,
    In  previous answer u said thr is no difference between check function module and startcondition but there is a difference between checkfunction module and start condition.
    Before the workflow is triggering can u able to check the conditions in startcondition.The startcondition can check the condition only after the workflow has been triggered.
    But in check function module u can check the condtion before the workflow got triggered.

    Kjetil,
    Dont' fall for it, these two (unless deephak and catherina are the same person...)  are just spamming the forum.
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206751">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206751</a>
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206440">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3206440</a>
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207214">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207214</a>
    <a href="https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207179">https://forums.sdn.sap.com/click.jspa?searchID=1763105&messageID=3207179</a>
    As you've correctly established, even the SAP documentation contradicts their nonsense. A start condition is implemented as a check function, so there is no difference; and NO workflow is started at any time if they fail.
    Cheers,
    Mike

  • Function Module to run as Background Job

    Hi All
    Could anyone tell how can i run a RFC function module as Background job,
    Right now, one external application calling this RFC FM, when this is getting executed, i can see a dialog process is occupied in SM50. Now o avoid this, i want when external application calls this RFC FM, it should get executed as a background job in SM50.
    Regards
    Munish Garg

    Hi Minish,
    Normally, we can call an RFC in background task as below:
    CALL FUNCTION func IN BACKGROUND TASK
                         [DESTINATION dest]
                         parameter_list
                         [AS SEPARATE UNIT].
    But I am not sure whether your external application can call this RFC in background. But you can create an another RFC and inside call this RFC in background.
    Then call the new RFC so that it will internally call the required RFC in background and Immediately after it will be closed.
    Regards,
    Selva K.

  • Error while calling function module to start form

    Hello Experts .
    First i make my data selection. Then i will get the name of the generated function module. Then i call FP Job open. up to here all is ok. But when i call the generated function module. There comes the popup error message. The text on this popup is SAP <SystemID>:System message,   Workprocess restarts. Session deleted" (or similar, I only get the german text "PBI: SAP-Systemnachricht: Workprozess druchgestartet (Modus abgebrochen)).
    I dont know why.
    Can anybody help?
    Regards
    Chris

    -> Executing Test Report FP_TEST_00 works correct. i see a pdf.
    ->Excecuting Test Report FP_CHECK_DESTINATION_SERVICE works correct
    FP_JOB_CLOSE is not called in my report.
    -> Executing Testreport:FP_TEST_IA_01  I get the error message:'
    ADS: com.adobe.ProcessingException: Could not retrieve a password for credential: ReaderRights(200.101).'

  • Function Module for Start time and End time

    Hi Experts,
    I need a function module for getting particular Work schedule rule start time and endtime and further details by passing personnel number and day.
    Thanks in advance.
    Sunil

    FYI - https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=5338428
    Thanks,
    SK

  • How to start a batch job through a web service call

    I have a batch job created Data Services that I would like to be able to start through a web service call.
    I have exposed the batch job as a Web Service through the mangement console.
    The Integrators guide is not the clearest piece of documentation that I have ever read so I'm now having a little trouble.
    In C# I'm issuing the following statements:
                DataServices.Batch_JobsClient batchClient = new DataServices.Batch_JobsClient();
                batchClient.Open();
                DataServices.Testjob_Match_GlobalVariables myVar = new DataServices.Testjob_Match_GlobalVariables();
                myVar.ptd_FilePath = "D:
    Jobs
    Test";
                batchClient.Testjob_Match(myVar);
    That all executes without error -- but the job is not started. Obviously I'm missing a step here but I can not figure out what is needed to acutally start the job execution from the Integrators Guide.
    Any help would be appricated.

    first test invoking the batch job webservice using SoapUI
    does your client application logs the SOAP message that is sent to DS WebServer ?
    Check the %LINK_DIR%\lg\webservices.log if there is any errors logged in it ?

  • Require function module for start and end bucket of planning book

    Hello All,
    I need to fetch the start and end bucket date of a planning book. Is there any function module which can directly give first and last bucket date of a planning book ?
    Thanks & Regards,
    Vivek

    Hello dear Sanjeev / Datta,
    Thanks for your prompt response.
    The problem resolved. The solution is as follows.
    Step1) CALL FUNCTION '/SAPAPO/MSDP_PB_READ_DVIEW'
                Input : Plng book and dataview
                output: cs_pbdvwhdr       = ls_header (in changing parameter)
    Step2) CALL FUNCTION '/SAPAPO/SDP_TB_CREATE_COLS'
                Input: bucket Profile of past and future, which we will get from step1.
                          And from date as space in a variable of type datum (As the parameter is mandatory)
                Output: et_cols_ext (Importing table) which will give start and end date.
    Hope, This solution will help others also.
    Thanks & Regards,
    Vivek

  • Failed batch jobs

    I have been trying to compress a mpeg2-stream from a esata drive and it comes up with a "Failed: 3x crash service down" message. What is happening? I have done this type of jobs in the past.

    Jim,
    If you look up posts by my user name you will find that I have been trying to get an answer to this problem since September 2006 for an intel machine. Also try looking up "3x crash service down" for more than just myself. I don't believe this is a problem due to mismatched RAM because I had stock Apple RAM in the intel computer and it still crashed. I have stock RAM in the G5 at work and no problems there. I'm really surprised that this is happening on a PPC processor with you. I did a totally clean install the other day from FCP 5.1.1 in order to bypass the 5.1.2 update (which is where I first encountered the problem) and go straight to the 5.1.3 update hoping the problem was corrected. I ran two short tests of approx 7 minute clips exported to mpeg2 multiplexed and it worked. I thought, **** Yeah it's fixed. Then I dropped a longer clip (17 minutes) on the timeline to export and I got the 3x crash service down error from compressor. I then trashed everything with FCP Rescue and restarted the computer and tried the short clip (7 min.) again and it crashed out. So, it is still broken. BTW, when you look in your compressor crash logs what is the error you get? Have you reported this as a bug to Apple through the ADC Bug Reporting Feature? If I'm the only one that has reported this then I wouldn't think there would be much of a rush/interest to get it fixed. However, if x-number of people are having the same problem and report it then I would think it would garner a higher priority from engineering. In the meantime I have been using MPEG Streamclip for a workaround. You ought to try it. It's creates an extra step or two but it may help you keep your sanity. I'm not sure about it's ability to do batch processing though - haven't tried to do that. Another theory that I have is that at work I use a static IP address through a LAN and I have a static DNS Server number (which is listed as optional in the Network settings of System Prefernces). At home my IP address changes every couple of days and I don't have an IP address in the DNS Server field. That is the only difference in the setup of the systems other than one being a PPC and the other an Intel. I'm just glad that this isn't happening to the G5 at work or else I would be totally screwed. Keep up the good work on your end and keep providing feedback about what you find. Maybe we'll narrow it down or someone with greater knowedge will be able to help us.
    Update: Received a reply from apple that said they were investigating the problem and would let me know something when they know something. Hope that sheds some light on things.

  • How to force Functional Module to use Batch-Process ?

    Hello all,
    I am calling a FM via synchronous RFC. No matter what I try the functional module is started
    in a dialog process in the remote system. This is inconvinient because sometimes the process takes too long and a timeout occurs. I also tried transactional RFC and asynchronos RFC but no  difference here.
    The FM will always be executed in a dialog process.
    How can I tell the functional module to use a batch process ?
    Thank you for your answers,
    Axel

    hi,
    use
      CALL FUNCTION 'HR_START_BATCHJOB_IN_OTHER_SYS'
        EXPORTING
          repid                = 'sy-repid'              "           "Program name
          variant              = 'VAR'
        JOBNAME =
        CALL_BACK_DEST =
        CALL_BACK_ID =
      IMPORTING
        JOBCOUNT =
        INDX_ID =
        TABLES
          valutab              = it_sel.
    you can set your program in batch mode using the above function module
    Yogesh N

  • Which function module to delete job log?

    Hi, I submit report via jobname and jobcount. After I close job and run it, we can see jobname is still in job log by SMX. But client doesn't want to see it, so who can kindly tell me which function module can delete jobname from job log?
    Thanks a lot.
    Jack

    try        CALL FUNCTION 'BP_JOB_DELETE'
    If you have used JOB_OPEN before the SUBMIT to create the job, you can automatically delete the job upon successful completion by setting the parameter DELANFREP = 'X' in the JOB_OPEN function call.. this way the user will only see the logas for cancelled/aborted jobs..
    ~Suresh
    Message was edited by: Suresh Datti

  • Function Module to show all jobs in that Org Unit.

    Does any one know is there any Function Module which gives all the jobs that comes under that Org Unit. for example if org unit 10 has 2 Sub Org Units(11 and 12) and 3 jobs(20, 21 and 22) under it. and the Sub Org Unit 11 and 12 has 1 job each( 30 and 40). When you run for org unit 10 it should give all 5 jobs (20, 21, 22, 30 and 40).

    Hi Fayyaz
    Well you use a FM RH_READ_INFTY_1001 to discover the relationships between an ORG Unit and Jobs.
    Alternative, you can write a simple query to extract data from HRP1001 to find the jobs under an Org Unit. Because Jobs are related to an Org Unit and this relationship is stored in Infotype 1001/HRP1001.
    Reward Points, If helpful.
    Regards
    Waz

Maybe you are looking for