This website is not affiliated with, sponsored by, or approved by SAP AG.

Event creation problems

Business WorkFlow

Moderators: Snowy, thx4allthefish

Event creation problems

Postby sapfans_user » Mon Jun 28, 2010 12:26 pm

In customer master save BADI, CUSTOMER_ADD_DATA~CHECK_ALL_DATA
I am creating an event using CALL METHOD cl_swf_evt_event=>RAISE_IN_UPDATE_TASK

As the system will have its own COMMIT work when customer is saved,
I have not coded any Commit work after the RAISE_IN_UPDATE_TASK.

I've filled all the required Event parameters,
but however everytime I try hitting save in XD02, the event trace SWEL says:

Import container contains errors (are any obligatory elements missing?)

Can someone give me pointers as to what might be wrong?
If I single test the static method (called by the event) everything works fine.

Code: Select all
        TRY.
*         - create event container
            CALL METHOD cl_swf_cnt_factory=>create_event_container
              EXPORTING
                im_objcateg = 'CL'
                im_objtype  = 'ZCL_CUST_WF'
                im_event    = 'ADD_PARTNER'
              RECEIVING
                re_instance = lr_evt_container.
*       - set parameters
            CALL METHOD lr_evt_container->element_set
              EXPORTING name  = 'CUSTOMER'
                        value = WA_KNVP-KUNNR.
            CALL METHOD lr_evt_container->element_set
              EXPORTING name  = 'SALES_ORG'
                        value = WA_KNVP-VKORG.
            CALL METHOD lr_evt_container->element_set
              EXPORTING name  = 'DISTRIBUTION_CHANNEL'
                        value = WA_KNVP-VTWEG.
            CALL METHOD lr_evt_container->element_set
              EXPORTING name  = 'DIVISION'
                        value = WA_KNVP-SPART.
            CALL METHOD lr_evt_container->element_set
              EXPORTING name  = 'PARTNER_FUNCTION'
                        value = WA_KNVP-PARVW.
            CALL METHOD lr_evt_container->element_set
              EXPORTING name  = 'PARTNER_NUMBER'
                        value = WA_KNVP-KUNN2.


            CALL METHOD cl_swf_evt_event=>RAISE_IN_UPDATE_TASK
              EXPORTING
                im_objcateg = 'CL'
                im_objtype  = 'ZCL_CUST_WF'
                im_event    = 'ADD_PARTNER'
                im_objkey   = wa_knvp-kunnr  "the sold to
                im_event_container = lr_evt_container.
          CATCH CX_SWF_IFS_EXCEPTION.
        ENDTRY.
sapfans_user
 
Posts: 200
Joined: Thu Oct 05, 2006 12:50 pm

Re: Event creation problems

Postby sapfans_user » Tue Jun 29, 2010 4:06 am

I made all the 6 parameters in the event definition non-mandatory,
and the same code below worked just fine...
the event got triggered, and the workflow ran just fine

Can anyone pls. explain why the event parameters cannot be made mandatory?
Moderator, I think I've posted to the WRONG forum. Sorry for that.
sapfans_user
 
Posts: 200
Joined: Thu Oct 05, 2006 12:50 pm

Re: Event creation problems

Postby Gothmog » Tue Jun 29, 2010 4:25 am

I'll move it to the Workflow forum, then, no worry.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1943
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Event creation problems

Postby sapfans_user » Tue Jun 29, 2010 5:42 am

Thanks.

Regarding my query, is it possible that someone (or system) did some sort of buffer clearing?
(just thinking out aloud, say somehting like SWU_OBUF )
sapfans_user
 
Posts: 200
Joined: Thu Oct 05, 2006 12:50 pm


Return to Business WorkFlow

Who is online

Users browsing this forum: No registered users and 3 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.