Event BKPF.CREATED not raised - OSS note 336305 (Follow-up)
Sap Wug
SAP_WUG%ACDI-CIDA at acdi-cida.gc.ca
Thu Oct 7 14:06:40 EDT 2004
Thanks for your suggestion. I will start logging these exit points to get
more info. Good idea !
Mireille Lachance
Kjetil Kilhavn
<kjetilk at statoil.co To: SAP-WUG at MITVMA.MIT.EDU
m> cc:
Sent by: SAP Subject: Re: Event BKPF.CREATED not raised - OSS note 336305 (Follow-up)
Workflow
<Owner-SAP-WUG at MITV
MA.MIT.EDU>
2004-10-06 10:40 AM
Please respond to
SAP Workflow Users'
Group
It is hard to tell from code what could be wrong. Since you get 85 posted
documents there shouldn't be any commit issues here.
You have two (plus one redundant) exit points in your function, with no
logging or signalling.
* t_bkpf[ ] is empty.
* t_bkpf[1]-blart <> 'F5'.
You can be pretty sure that you are exiting through one of them. Put in
some debug code (e.g. send an e-mail, write to a Z-table) to determine
where you exit and get some debugging information. I would dump some t_bkpf
information when t_bkpf[1]-blart <> 'F5'. My guess would be that that is
where you have your problem.
Do you use FI substitutions? If so, and any of those modify the document
type (ugly things are also possible in SAP), when is your function called
relative to the substitutions?
--
Kjetil Kilhavn
|--------+----------------------------------->
| | Sap Wug |
| | <SAP_WUG%ACDI-CIDA at acdi-c|
| | ida.gc.ca> |
| | Sent by: SAP Workflow |
| | <Owner-SAP-WUG at MITVMA.MIT|
| | .EDU> |
| | |
| | |
| | 05.10.2004 17:08 |
| | Please respond to "SAP |
| | Workflow Users' Group" |
| | |
|--------+----------------------------------->
>-----------------------------------------------------------------------------------------------------------|
|
|
| To: SAP-WUG at MITVMA.MIT.EDU
|
| cc: (bcc: Kjetil Kilhavn)
|
| Subject: Event BKPF.CREATED not raised - OSS note 336305
(Follow-up) |
>-----------------------------------------------------------------------------------------------------------|
Sorry... I tried to send this before, but I didn't know attachments are not
allowed (I'm a new user). Here it is again :
Hi, we are triggering the event BKPF.created whenever a document is
posted with type "F5" in table BKPF. We followed the OSS note 336305
and copied function module SAMPLE_INTERFACE_00001030 :
FUNCTION zafi_wf_interface_00001030.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(I_BKDF) LIKE BKDF STRUCTURE BKDF
*" VALUE(I_UF05A) LIKE UF05A STRUCTURE UF05A
*" VALUE(I_XVBUP) LIKE OFIWA-XVBUP DEFAULT 'X'
*" TABLES
*" T_AUSZ1 STRUCTURE AUSZ1 OPTIONAL
*" T_AUSZ2 STRUCTURE AUSZ2 OPTIONAL
*" T_AUSZ3 STRUCTURE AUSZ_CLR OPTIONAL
*" T_BKP1 STRUCTURE BKP1
*" T_BKPF STRUCTURE BKPF
*" T_BSEC STRUCTURE BSEC
*" T_BSED STRUCTURE BSED
*" T_BSEG STRUCTURE BSEG
*" T_BSET STRUCTURE BSET
*" T_BSEU STRUCTURE BSEU
*"----------------------------------------------------------------------
DATA: BEGIN OF objkey.
DATA: bukrs LIKE bkpf-bukrs.
DATA: belnr LIKE bkpf-belnr.
DATA: gjahr LIKE bkpf-gjahr.
DATA: END OF objkey.
DATA: swe_objkey LIKE sweinstcou-objkey.
DATA: card TYPE p.
DESCRIBE TABLE t_bkpf LINES card.
IF card <= 0.
EXIT.
ENDIF.
READ TABLE t_bkpf INDEX 1.
IF t_bkpf-blart = 'F5' .
include <cntain>.
swc_container container_instanz.
data: begin of wf_id,
bukrs like bkpf-bukrs,
belnr like bkpf-belnr,
gjahr like bkpf-gjahr,
end of wf_id.
data: wf_objkey like sweinstcou-objkey.
swc_clear_container container_instanz.
read table t_bkpf index 1.
check sy-subrc = 0.
wf_id-bukrs = t_bkpf-bukrs.
wf_id-gjahr = t_bkpf-gjahr.
wf_id-belnr = t_bkpf-belnr.
wf_objkey = wf_id.
call function 'SWE_EVENT_CREATE_FOR_UPD_TASK'
exporting
event = 'CREATED'
objtype = 'BKPF'
objkey = wf_objkey
tables
event_container = container_instanz.
ENDIF.
ENDFUNCTION.
However, sometimes the event BKPF.created is not raised. Last week,
when uploading a file which resulted in posting 85 documents of
type 'F5', the event BKPF created was raised only 84 times. The event
log which was turned on before the file was uploaded had 84 entries of
BKPF created. I didn't see anything different in the F5 document posted
that would result in the event not raised. This problem happened once
before.
I sent this note to OSS, and I thought maybe someone in WUG might be able
to help. We are using version 46C.
Does anyone know why the event isn't raised every time ? Did this happen to
anyone else ?
Thanks for your help,
Mireille Lachance
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.
More information about the SAP-WUG
mailing list