Workflow and BAPI_GOODSMVT_CREATE

Soady, Phil phil.soady at sap.com
Wed Oct 16 20:05:34 EDT 2002


Don't go bag groceries just yet.
 
 
Given the following statement:
"I have written a report to run the function module in the background,
and it can create the goods movement document."
 
It is most likely an auth problem or Commit problem.
The other possibility is code that (say in a user exit) that
behaves differently depending on user id or tcode.
Thus exiting or using a different route.
 
 
Run trace ST01, for auth check with filter on WF-BATCH.
Make sure that it isnt a auth problem.
 
Then test the task from workflow,
in debug mode.
 
Set break at command "LEAVE"
Perhaps a user exit or some nasty piece is exiting in an ugly way.
 
The Sm13 log should be checked as mentioned below as well
as t-rfc log Sm58.
 
To assist debugging, try option:
Update debugging.  See menu in ABAP debugger SETTINGS-> update debugging.
This allows you follow the call in update task, that would normally
go off asynchronously.
 
With enough patience it is possible work out when it disappears.
 
Watch SM13 in another mode to see if entry is added as you go.
 
AT the end if it still didn't work,
repeat above step in debugger and after it the call in update task is completed,
issue from the debugger DATABASE commit. Just to make sure it isnt a commit work issue.
 
Still didn't work.
 
SE30' Set up a full trace variant.
Run trace on your abap.
Then rerun for test workflow.
 
Compare the program paths, function calls etc.
There must be and explanation !
 
good luck
or happy packing
 
 
Phil Soady
Senior Consultant
Business Technologies
SAP Australia
* : 0412 213 079
* : phil.soady at sap.com
 
 
 
 
 
-----Original Message-----
From: Pokraka, Michael [mailto:michael.pokraka at kcc.com]
Sent: Thursday, 17 October 2002 2:28 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Workflow and BAPI_GOODSMVT_CREATE
 
 
Hmmm, I haven't quite thought about bagging groceries, but becoming a barman has entered my thoughts once or twice :-) Anyway, I don't know much about that particular BAPI, but from what you describe it would be worthwhile to check the database updates (SM13) and RFC calls (SM58). More likely option 1, as a late stage update failure can cause the scenario where a document no. is assigned and returned, but sometime during the update something else goes wrong and the whole transaction is rolled back.
 
HTH
Michael
 
-----Original Message-----
From: Susan Keohan [mailto:skeohan at mit.edu]
Sent: 16 October 2002 17:04
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Workflow and BAPI_GOODSMVT_CREATE
 
 
Greetings Workflow-ers,
 
I am on a 4.6c environment.  I have written a FM to call BAPI_GOODSMVT_CREATE, using Goods Movement Code 01.  This FM works fine.  I have incorporated this FM into an object method (object ZBUS100106, an  extension of BUS1001006).  I can test this method and it works fine.  I have created a standard task to call this method and incorporated it into a single step workflow.  It seems to work fine, that is, a goods movement document is returned to the task container, but the document does not actually exist.  The goods movement has not actually been completed.
 
In my FM, I am doing a BAPI_TRANSACTION_COMMIT.
 
I have tested and tested, and the bindings are, believe it or not, correct.
 
I have written a report to run the function module in the background, and it can create the goods movement document.
 
I can also call this BAPI to do a different Goods Movement Code (04) and the workflow and the task all work perfectly.
 
I am stuck with thinking
a) That GM Code 01 is not supposed to work from within a workflow task
b) That the database commit is not happening, even though I am calling the BAPI_TRANSACTION_COMMIT
c) That there is something wrong with the WF-BATCH id, even though it can complete other tasks normally, including other calls to this BAPI or
d) I should hang it up and go bag groceries for a living
 
Has anyone had any experience, positive or negative, with using this BAPI from a workflow task, for a Goods Movement code 01 ?
 
Thanks in advance,
Sue
 
------------------------------------------------------------------------------
This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law.  If you have received this message in error, please inform us promptly by reply e-mail, then delete the e-mail and destroy any printed copy.   Thank you.
 
 =============================================================================
 


More information about the SAP-WUG mailing list