Method Executes Fine in Foreground but not in Background

Ravi Dixit dolbydix at gmail.com
Mon Mar 15 20:50:56 EDT 2010


Check SM58 for WF-BATCH.

>
> Message: 4
> Date: Tue, 16 Mar 2010 09:02:14 +1000
> From: Rick Bakker <rbakker at gmail.com>
> Subject: Re: Method Executes Fine in Foreground but not in Background
> To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
> Message-ID:
>        <7a3a922f1003151602t503fa666j98ebb1c72e1e8a13 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello Ali,
>
> Try using ST01 (system trace) to see if it shows any problems.
>
> I assume it's being run as WF-BATCH? You could try debugging it by
> setting an external breakpoint in your method and setting up your user
> to debug WF-BATCH's sessions.
>
> regards
> Rick Bakker
> Hanabi Technology
>
>
>
> On Tue, Mar 16, 2010 at 5:01 AM, Dave Weston <Dave.Weston at clockwork.ca>
> wrote:
> > Check transaction ST22 for any ABAP dumps to see if that is the problem.
> >
> > ________________________________
> >
> > From: sap-wug-bounces at mit.edu on behalf of Ali Husain
> > Sent: Mon 3/15/2010 2:32 PM
> > To: SAP WUG
> > Subject: Method Executes Fine in Foreground but not in Background
> >
> >
> >
> > Hey Guys,
> >
> > Sorry if i'm asking too many questions but I have a deadline in 2 days
> which i'm trying to beat so I guess i'll turn to you for help :)
> >
> > I'm facing a weird problem in which i'm calling a method in a background
> task and this method is calling a program via SUBMIT. The program calls a
> smartform and collect the data needed to be sent as an e-mail with the
> smartform as PDF attachment.
> > The reason why it's weird is because:
> > - When i run the method directly via the business object it executes fine
> and sends the email with no problem
> > - If i execute the method in foreground it also works fine with no
> problem
> > - If I attach the method to a previous task to be executed after the work
> item is executed it also works fine. However, with this option i had a
> problem which is for that task i have the confirm completion of the task
> dialog enabled. So whenever i cancel of the dialog to keep the work item in
> my inbox, the method gets executed again which i don't want. I want it to be
> executed only if the user confirms the completion of the dialog.
> >
> > So i decided to use a background task but when it gets executed, it is
> stuck in process and never completes the workflow. The method is not even
> executed and the mail is not sent in this case. It worked with all the
> previous mentioned cases except when i put it as a background which tells me
> something wrong with the bg job maybe. Other BG jobs are working fine and i
> checked the SWU3 with no problem. I also tried it in a different client in
> the same system and same problem happens.
> >
> > The method uses SUBMIT AND RETURN and i'm not binding anything except for
> the whole business object (tried both dialog is not enabled for the method
> and also enabled and task in BG). In the program that i'm calling i'm using
> the following FMs:
> > 'SSF_FUNCTION_MODULE_NAME'
> > v_form_name (smartform)
> > 'CONVERT_OTF'
> > 'SO_NEW_DOCUMENT_ATT_SEND_API1'
> >
> > Nothing wrong with the program as it executes fine on its own and also
> when i execute the method directly via the business object. So What is
> causing the background job to be stuck?
> >
> > Thanks a lot for the help.
> > Ali
> >
> >
> > ________________________________
> >
> > Hotmail: Trusted email with Microsoft's powerful SPAM protection. Sign up
> now. <http://clk.atdmt.com/GBL/go/210850552/direct/01/>
> >
> > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> >
> >
>
>
>
> ------------------------------
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>
>
> End of SAP-WUG Digest, Vol 64, Issue 33
> ***************************************
>



-- 
Best Regards
Ravi Dixit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100316/62506b3d/attachment.htm


More information about the SAP-WUG mailing list