Event BKPF.CREATED not raised - OSS note 336305 (Follow-up)

Sap Wug SAP_WUG%ACDI-CIDA at acdi-cida.gc.ca
Tue Oct 5 11:08:50 EDT 2004


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
 


More information about the SAP-WUG mailing list