AW: check function module in 40B

SG shardendu at yahoo.com
Wed Mar 13 22:46:46 EST 2002


Unfortunately, reading DB will not work for obvious reasons already noted
earlier and neither does the wait approach!!
 
You could write a function (somewhat similar to check FM) in SWEC to modi=
fy
the event container to pass the document type as additional parameter.
 
I am assuming you are triggering your event from change documents. In SWE=
C
transaction's function, you will have access to both the change document =
and
the event container.
 
Thanks,
Shardendu Goswami
 
KSoft Systems, Inc.
www.ksoftglobal.com
 
----- Original Message -----
From: "Becker Stephan (extern)" <Stephan.Becker.ext at mchw.siemens.de>
To: <SAP-WUG at MITVMA.MIT.EDU>
Sent: Wednesday, March 13, 2002 4:23 AM
Subject: AW: check function module in 40B
 
 
It is correct that you cannot read the document type because the object i=
s
not on the database yet. The check function module runs in the context of
the caller (i.e. usually the update task that is booking your document), =
and
a wait statement will do nothing but hold up the update on the database.
It's like you're queueing to meet someone who's standing behind you in th=
e
queue..
If you can, pass the document type into the event container from the call=
ing
program and read it making sure you convert the container to and from
persistent (use the appropriate macro commands). Or you can try using the
object attribute, that should (not 100% sure here) read it from memory
rather than the db.
 
Hth,
Stephan
 
 
 
-----Urspr=FCngliche Nachricht-----
Von: de Valensart Schoenmaeckers, Patrick
[mailto:deValensartSchoenmaeckers.Patrick at pmintl.ch]
Gesendet: Mittwoch, 13. M=E4rz 2002 09:55
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Re: check function module in 40B
 
 
I think that this occurs because the database "commit" for the creation o=
f
the PR in EBAN is not yet done at the moment the check FM is called (I ha=
ve
already seen that problem with a create event for an invoice). If I remem=
ber
well, the problem was raised on this list by one of my colleagues, and th=
e
solution was to put some kind of "wait" statement in the check FM before =
the
selection on BKPF (sorry that I cannot be more explicit, I am not an ABAP
expert and did not apply the solution myself). In your case the same
statement should be inserted before the selection on EBAN.
 
I hope this will help.
 
Kind regards,
 
---------------------------------------------------------
Patrick de Valensart
Information Services
Philip Morris S.p.A.
Via Salandra, 18, 00187 Roma, Italy
---------------------------------------------------------
 
 
-----Original Message-----
From: Almeida Viraj [mailto:Viraj.Almeida at sisl.co.in]
Sent: Wednesday, March 13, 2002 9:21 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: check function module in 40B
 
 
Hi friends,
I use a check FM for a workflow.
After event "PR created" is triggered, I check document type of PR.
For certain Doc Type of PR  Workflow should be started.
 
the event container gives Pr number.I use the number to find PR doc type
from EBAN.
But doc type is not returned...it gives me empty string.
 
wot could be wrong?
 
Alttough it works fine during Explicit Generate Event tool..
 
thanks in Advance,
 
Viraj
 


More information about the SAP-WUG mailing list