BackGround Task to execute report is 'IN PROCESS'

Hello Experts,
I have developd a workflow where i have added a task which will execute a report in background as code below -
SUBMIT rhakti00
     USING SELECTION-SCREEN 1000
    WITH SELECTION-TABLE rspar
      AND RETURN.
The output of the report is not relevant for my req so i dnt need to display the output of report after thts y i want to run this report in background.
Now,while executing the task ,the report has started executing in background perfectly but tht task remain in 'IN PROCESS' status. When i checked the tRFC for that task so its showing me mesaage that - "Screen output without connection to user."
Plz suggest how to complete my background task.
Regards
Nitin

thnks for the reply Kiran,
regarding ur point to send report output to many users....i want to make it clear tht i dont need to send or display the output of the report. I just need to execute the report in background and task shud get complete.
Also,Can u plz explain it further abt writing code in FM and thn get the output in export or table parameter.......i mean which field or which table of which type shud i use in export or table paramenters of FM. if u can tell me somethg in coding also..tht will ne helpful...
Regards
Nitin

Similar Messages

  • Background Task status is halted in 'In Process'

    Hello,
    The background task in a workflow template is halted in the 'In Process' state and the workflow is not completed. When I tried to execute the method from SWO1 separately, it is working fine.
    Please do let me know if I am missing out something.
    Regards,
    Samson

    Hi Samson,
    You can also check in tx SWU2 if there aren't any local rfc's stuck in there.
    To investigate the problem tx SWPC might help (it is precisely designed to restart workflows with a background task stuck into "in progress" status).
    You can also have a look at [this thread|Workflow hanging - ST22 and SWU2 empty; for more suggestions.
    Cheers,
    Patrick

  • Difference between calling a function module in background task and update

    Hi experts,
    Can someone explain me the basic difference between calling a FM in  background and update tasks?
    Also what is the advantage of using backgroud RFCs over the above 2.
    Thanks in advance,
    reddy

    This is essentially a difference of synchronization with the main program calling this FM.
    For Update task, we specify explicitely that we want to update some rows in a database table. But Update task is essentially for waiting that all tasks to do before are done and updating database at the end. The main point is that MF called in Update task wait for a COMMIT WORK to be executed.
    On the other hand FM in background task are executed immediatly and are not specific to updating database table : it can be a function that would return some values or something else like that.
    If you want to see more about difference between background jobs / update jobs, you can also have a look at transaction SM51. Here you will see all the servers composing your SAP instance and what kind of task they can execute :
    - background jobs corresponds to BATCH
    - update tasks corresponds to UPDATE
    Those 2 kinds of tasks stands not necessarily on the same server...
    Best regards,
    Samuel

  • How to execute report in Background from Dialog process?

    How, or what is the best way, to lauch an executable program (report) into the background from a dialog program (dynpro)?
    <b>Example:</b>  The SUBMIT...AND RETURN still executes the called program before it returns control to the calling program.  I just want the report to be kicked off and the dialog to continue as normal.  I do not want the report execution time to affect the dialog process.
    Thanks in advance for your time.

    Hi Nablan, I'm also trying to do parallel processing and created a function module that kicks of another report program.
    However, the process doesn't seem to work. The Main program runs from start to finish but the called program in the function module doesn't seem to run. When I used the option STARTING NEW TASK task name the code ran but in the foreground. I don't want to use this option as it runs in the foreground and SAP limits one to six sessions. Is there something I'm missing in the attributes of the function module I created. Currently the attributes are: Processing type Remote enable module and it's set to start immediately. I had used Normal function module initially but this did not work with the STARTING NEW TASK task name option.
    Below are the codes segements I used.
    In my main program I have the following code segement
    CALL FUNCTION 'Z_CA_PROG_CALL'
      IN BACKGROUND TASK
      EXPORTING
        zprogram            = 'ZCA_TEST1'
      EXCEPTIONS
        program_call_failed = 1
        invalid             = 2
        OTHERS              = 3.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK.
    In the function module I have the following code.
    FUNCTION z_ca_prog_call.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(ZPROGRAM) LIKE  ZCA_INTERFPROG-ZPROGRAM
    *"  EXCEPTIONS
    *"      PROGRAM_CALL_FAILED
    *"      INVALID
      SUBMIT (zprogram).
      IF sy-subrc <> 0.
        CASE sy-subrc.
          WHEN 1.
            RAISE program_call_failed.
          WHEN OTHERS.
            RAISE invalid.
        ENDCASE.
      ENDIF.
    ENDFUNCTION.

  • Two transactions, same program, processed in background task problem

    Y0 Team ABAP,
    i got something here that bugs me.
    I have done a report. Nothing special, simple selection screen, selection of data, and output via SALV.
    One of my selection screen fields (a parameter) is VKBUR and it is "obligatory".
    2 weeks ago i got the requirement to create a copy of this program, and adopt VKBUR as select option.
    Since i didnt want changeanomalies i decided not to duplicate the program, but just add a second transaction to my program.
    In a routine at event at-selection-screen output, i´m hiding either the parameter or the select option, depending on which tcode was used.
    In some routine which gets triggered at the event at-selection-screen i´m moving either what we got in our parameter to our local range we use for the select, or just assign the select option to our local range, or process an error message if according field is not filled. Yeah that obligatory condition is done by myself since i cant just set the obligatory addition to the statement.
    This all works quite fine so far.
    BUT:
    Today i hear that the end-users process that report in background task by pressing F9.
    Problem is now that when it is processed in background task, sy-tcode is initial, so i dont know which of the transactions the user picked, and so i dont know which of the two fields has to be filled.
    Sure i could do another report, containing just my second selection screen, and when this is checked, do a submit on my real report, tho i still believe there must be some more elegant way.
    Any ideas?

    Unfortunateley those subtotals cant be handeled by the layout, thats why i manually add them.
    But you got me back on track! right now i´m for your solution.
    right now i´m having just ONE selection screen with the select option on it.
    User can decide if he fills just one value or more.
    In the end i loop over my output table and look if there are records of different VKBUR´s.
    If there are i know he wants subtotals and process them. If its just data of one VKBUR i can spare myself the hassle as there is anyway just one records per VKBUR so subtotaling this wouldnt make sense.
    thanks. Thats what i will present my consultant now lets see if i can get him satisfied with it...

  • Background task stays with status "in process" without creating any error

    Hi all,
    we created a two step approval workflow for parked documents based on the SAP WF templates WF WS10000051 (WF frame) and WS10000053 (two step approval sub WF). The problem now is, that after the two approvals have been given and the release flag is set the system should post the document. This is done in a background task. This task is started automatically but the status stays at "in process" and the document remains "parked" and not posted.
    What we did so far to solve the problem:
    1.) Check if shortdump has been created via ST22 --> not the case
    2.) Refreshed buffer via SWU_OBUF
    3.) Reacticvated/executed task with workitem id from log in SWIA
    --> nothing solved the problem so far. Please help!
    Thanks in advance. Johannes

    Hello Johannes !
                  You have asked "What do you mean with populate the value?"
                            Populating means conceiving the variable or container with valid value.In your scenario , with reference to your URL http://img851.imageshack.us/i/wflog2.jpg/ , POSTED_FLAG should be populated with value X.It should not be "Not Set".
                            With reference to your URL http://img717.imageshack.us/i/wfprotocol.jpg/, Set Release Flag step does not sets release flag.
                            It's evident from the URL http://img263.imageshack.us/i/flagreleasesetsw01.jpg/
                The solution for your problem is straight forward : Pass all the export or result parameters of RELEASE step to SET RELEASE FLAG step. Similarly , pass all the export or result parameters of SET RELEASE FLAG step to POST PARKED DOCUMENT STEP.
    Answer for question 1 : After  successful workflow transportation, it's version changes.Never mind the versions unless either of the versions are inactive or the version you require is inactive.
    Answer for question 2 : The user WF-BATCH should have SAP_ALL and SAP_NEW profiles.
    Regards,
    S.Suresh

  • How to receive variant-criteria after background-task had been executed

    Hi ABAP-community,
    i do run a program in background task. Once i enter sm37 the other day i can find the spool-file but i miss a opportunity to get the selection criteria as well. The job has been executed with variant xy. I now need to know/recreate what the selection-criteria was before the job has been executed. In the job-log functionality i can find report name and even a variant-name but haven't found a possibility to view the selection parameters.
    I already found table vari, varid, etc. but no appropriate report/function/etc. on how to restore the selection-criteria.
    Does anyone have a clue? Please let me know!
    Thanks in advance....
    ...and bye for now!
    Gunther

    Hi,
    perfect! That's exactly what i was looking for!
    Thank You and byebye!
    Gunther

  • How to debug a background task that takes a lot of time to execute

    My workflow consists of a background task which takes a significant amount of time to execute completely. I have executed the BO method from SWO1 and it works fine.. takes just few secs to execute.
    But when this method is executed through workflow as a background task, it takes more than 20 mins to execute.
    What can be the possible causes and how do I debug this.

    Dear Tiyasha,
    You can debug your task even if it is a back ground task.
    The process is as follows :
    The place where want to place your break point put an infinite while loop just before your actual code.Now execute your workflow , now go to sm54 there u will find your entry and from here you can go to the debugger .In the debugger make the value of the while loop to be true so that u can proceed.
    Here u will able to debug it properly.
    Regards,
    Geet

  • Why UPD processes execute report RSM13000 for very long time?

    Hi,
    When I use sm50 or sm51 to check my CRM system which version is 5.0, I found some UPD processes execute report RSM13000 for very long time. And some DIA processes are executing report SAPMSSY1 for verly long time too. They are occupy lot of processes of system. How does this happen? What's the reason and how to solve it? Thanks for your help!
    Many thanks and Best regards,
    Long

    Please check the configurtion of your system.As per your reply it seems that the work processes are not sufficient in the system.
    Hi wait time and response time  ,is  problem in the system.Either you have a lot of load on the system or you CPU's are over loaded.
    Please check the system status from st06 and look for the cpu utilisation /memory utilisation.
    SM66 to see the long running online and background jobs.
    St03n - look for the workload and wait times for all transactions.
    st02-may help in checking the memory paramaetrs.
    Hope it will help you in resolving the issue.
    Thanks
    Amit

  • Restrict 'Executing report in background' from selection screen

    I want user to not to select option for executing report in background from Selection Screen of the program.
    i.e. 'Execute Program in Background' option in 1st menu bar tab should either be disabled OR if user clicks on it then he should get error message on selection screen itself.
    Thanks,
    Falguni

    Hi Falguni,
    Write the code based on function code SJOB in the event AT SELECTION-SCREEN. Write the following code :
    AT SELECTION-SCREEN
    CASE SY-UCOMM.
    WHEN 'SJOB'.
    MESSAGE E000 WITH 'You cannot schedule background job'.
    ENDCASE.
    Thanks & Regards,
    Faheem.

  • Function called IN BACKGROUND TASK goes to work process DIA, not BGD

    I'm calling a function IN BACKGROUND TASK
    In SM50, I see it running in a DIA work process.
    I want it to run in a BGD work process.
    Can this be done?  If so, how?  If not, why not?

    Hi...
    It looks like, it will always run in DIA process and not Background process...I am not sure that we can change the work process
    Check the below link..
    http://help.sap.com/saphelp_40b/helpdata/pt/69/c24f864ba111d189750000e8322d00/content.htm
    What is written in the link is...
    "Background updates (CALL FUNCTION IN BACKGROUND TASK) represent a variant of remote function call that is synchronous with the end of a transaction (COMMIT WORK). In background updating, an update is run in another dialog work process that may be in the same or in another application server and R/3 System. Because such updates run in their own LUWs, they may start only after all critical updates have been completed. Otherwise, it would not be possible to roll back background changes in the event of an error in another update component. "
    IF you get the answer of whether we can change the work process then please let us know...

  • Problem in executing the SO_NEW_DOCUMENT_SEND_API1 in background task

    Hi All,
    I have specific requirement in which I need to put the workflow into an error whenever posting of the journal document fails (which is a background task in my workflow) and before that I should send the notification to the initiator's lotus notes ID a mail with error description. So that user can repost the document after removing the error in standard SAP. For that I am using function module SO_NEW_DOCUMENT_SEND_API1. But when I execute the workflow then it is not sending any notification to the e-mail ID. But when I debug in foreground then it is sending an e-mail notification to initiator's e-mail address.
    I think this FM will not execute in background, if any one is having idea how to make this run then please let me know.
    If any one knows any alternate solution that will also help me to meet my requirement.
    Please let me know if anything else requires.
    Thanks in advance.
    Prashant P. Raichurkar

    hello,
    If you use this FM in a background task then the user is different. probably this is user wf-batch.
    Can you verify if the user has a correct email address assigned in his user master data?
    What you also can try is to logon with user WF-BATCH (change type of user for that) and run the FM.
    /Peter

  • Error when executing report in background

    Hi experts,
    I developed a new report. In that report I am getting data from KRMI transaction. For getting data from KRMI I have all the program and transaction and function modules under KRMI transaction to Z program, transcation and function modules and by using Call Transaction on ZKRMI and using Import and export parameters I am fetching data from KRMI transaction.
    By doing this I dont have any problem while executing report online and when I am executing this report in back ground I am not getting in the above mentioned case.
    Can anyone advise me in solving the issue

    As already said....the import and export wont work in background...however what you can do is import and export in shared buffer
    Please refer this below thread for how to proceed on this...
    Re: Problem with export/import in back ground
    Check the below link for information on shared buffers
    http://help.sap.com/saphelp_webas630/helpdata/en/c4/3a6dbb505211d189550000e829fbbd/frameset.htm

  • Execute report in background

    hi
    we have one requirement for execute report in background
    we want to run the report ME5A for a large date range and at plant level.
    Due to this, transaction data selected is large and so reportis taking very long time when executed in foreground.
    so requirement is
    execute report in background (i know possible in SAP)
    download the report output on desktop automatically
    can you pl suggest how to do this without customisation
    regards
    sara

    Hi Sara,
    Go to ME5A then enter the required field then go to Programme and then select the option execute in background

  • DYNPRO_SEND_IN_BACKGROUND dump when workflow executes a background task

    Hi,
    My project is currently in version 4.6. I have a custom version of the PO release workflow and in here I created an activity calling a Custom Task, which then calls a Custom Business Object Method and then calls a program (using Submit RSWUWFML2). Unfortunately everytime the workflow goes to the said activity it hits a dump -- DYNPRO_SEND_IN_BACKGROUND.
    I've tried unchecking the flag "Advance with Dialog" inside the task but it didn't work. I know RSWUWFML2 most of the time should be scheduled in background but it just so happens that we have a certain scenario in which it should have a different body and subject. This is the reason why I opted to call it inside the workflow.
    Do you have any idea what caused this? Thanks!

    Hello Dan,
    DYNPRO_SEND_IN_BACKGROUND is an exception which occurs when system tries to call screen in background. Calling screen in background is not possible.
    Report RSWUWFML2 creates LIST at the end of this report which is nothing but a special type of screen. If you run this report as background task, definitely above exception will occur. 
    Schedule this report as job instead of using it in task.
    Regards,
    Sagar

Maybe you are looking for

  • CRM_ORDER_MAINTAIN probability problem

    i  use CRM_ORDER_MAINTAIN to create order. In this order I have several partners, items etc. in opport_i use following code: ls_opport_h-ref_handle = 1. ls_opport_h-curr_phase = lv_curr_phase. ls_opport_h-expect_end = lv_expect_end. ls_opport_h-proba

  • HT3702 How do I cancel an App Store purchase

    I was billed 150 dollars when my grandchild hit purchase how do I cancel the purchase

  • Output type for HU physical inventory process

    Hi All, During a HU physical inventory process we print the physical inventory document (the list) by transaction HUINV02. The customer would like to make a few changes in the layout. we didnt find the standard form and also not the output type. is a

  • Crash Bang 15th day of 30 day trial, file now says "read only"?

    so I've lost a lot of work and I don't understand. Files not found to open, and files panel says it's "read only". Doesn't convert to writable or will it change when I click the "turn off read-only" option. Am I screwed now or what?

  • MSI XT1950XTX WC Design flaw ?

    Hi ive been the owner of this card for some time now and recently started having problems with the fan that makes a horrible noise . Now today i opened up my pc for regular maintenance , dusting / refilling , etc ... and after that i did some tests o