cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of Event Parameters With Event Creation

Former Member
0 Kudos

Hi all,

I'm triggering an event via change documents. This works very well. Now I need the old and the new value from the field, which triggers the event.

So I found a very good doucumentation on the sap help:

http://help.sap.com/saphelp_webas610/helpdata/en/72/11386ce58a11d1951f0000e82dec10/frameset.htm

I implemented all step's and I sent the event container via email to my user.

But unfortunately it dose'nt work. I never get the values in my event container.

Please help!

Regards, Stephan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stephan,

Could you pls elaborate a scenario which you are using.

e.g. Object , event and parameters added?

Regards,

Akshay

Former Member
0 Kudos

Hi,

I'm using a Z-Object derived from BUS2000111 (CRM 4.0). I create the my Z-Event if my Z-Filed in the CRMD_CUSTOMER was changed. This Z-Event tiggers my Z-Workflow.

To get the old and new value in my event container, I created a new attribute (database field) in my Z-Object and I created a parameter of my Z-Event for my Z-Field.

So with the new attribute and the event parameter the system should fill the event container automatically.

Regards, Stephan

Former Member
0 Kudos

Hi Stephan,

could you paste here the code in which you are raising the event with all the variable definitions?

Before seeing the code itself, I think there could be something wrong in the way the event container is populated.

Best regards,

Mikko

Former Member
0 Kudos

Hi,

there is no code. The system should fill the event container automaticaly. Here are a statement from sap help:

-


...

After a change document has been written and the system has recognized from the assignment table that an event of a particular object type is to be created for it, the system checks whether the changed fields are defined as database field attributes of this object type. If this is the case, the changed value and the new value are written under the name of the attribute as a two-line element into the event container. (New value with index 0001 , old value with index 0002 .)

...

-


Regards,

Stephan

Former Member
0 Kudos

Sorry I misunderstood you there.. I don't unfortunately have a direct answer for you but maybe the following links are of help: http://mailman.mit.edu/pipermail/sap-wug/2002-September/006240.html

http://mailman.mit.edu/pipermail/sap-wug/2003-June/009493.html

There are also plenty of other such messages in the workflow user group, just use google to look them up with search "site:mailman.mit.edu/ sap-wug/ <search term>"

Former Member
0 Kudos

Hi Mikko,

thanks for your answer. With you help I could debug the container processing. And I found my problem.

Now I get the values in my event container.

It's a little bit strange, the change documents based on the structure CRMA_CUSTOMER_H not on the data base table CRMD_CUSTOMER_H. So I defined my object attributes for this structure and not for the data base itself.

But unfortunatly I get the next problem. When I use the event to start my workflow, the values never transferred to my workflow. I checkt the event - workflow binding again and again, but I can't find the problem.

If I send the event container to my user via the FB SWE_EVENT_MAIL the container is filled.

Any thoughts?

Regards, Stephan

Former Member
0 Kudos

Hi Stephan,

are the other values except your custom elements passed to the workflow container ok and the workflow gets triggered? Are there any clues of possible errors or warnings in the event trace?

-Mikko

Former Member
0 Kudos

Hi Mikko,

yes all other values are passed to the workflow container and the workflow starts.

There are no errors in the event or wi trace.

Regards, Stephan

Former Member
0 Kudos

Ok, then I'd isolate the problem more by trying to manually create the event and populate the event container in transaction SWUE. Could you try this and verify the linkage is ok? If this works, then I'd concentrate on the event container population.

-Mikko

ramki_maley
Active Contributor
0 Kudos

Stephan,

Make sure your WF container elements for the event parameters are multi-line and the Import & Export checkboxes in the properties tab are selected.

Cheers,

Ramki Maley

Former Member
0 Kudos

Hi,

my workflow container attributes a multi line and have the import and export flag.

I created the event manual in the SWUE and the values were transferred in the workflow container!?!?!

How can I "concentrate" on the event container population?

Regards, Stephan

Former Member
0 Kudos

Ok, then the event container -> wf container linkage is ok and the problem is that you don't have the proper values added to the event container.

One thing you could try to debug the event container population is to make a dummy function based on template SWE_CD_TEMPLATE_CONTAINER_FB_2 and add it in SWEC to the linkages function module for event container creation. This function will then be called just before the actual event is raised so you can see the event container content before its publishing.

If this doesn't work, then I'd suggest you look for the section in the standard code where the event gets published and debug it to see if the values are ok. System trace is a good tool for this and I believe you also get to see the triggering program in the event trace as well.

Hope this helps,

Mikko

Former Member
0 Kudos

Hi Mikko,

the problem was in the transaction SWETYPV - Type linkages. The system registered the function module

SWW_WI_CREATE_VIA_EVENT_IBF for my event. This FM was not able to put the my values into the workflow container.

The solution is to register manual the FM SWW_WI_CREATE_VIA_EVENT for the event and everything is ok.

Thanks for you help!

Regards, Stephan

Answers (0)