cancel
Showing results for 
Search instead for 
Did you mean: 

PM / CS: Can't find right user-exit, customer-exit, bte for IW51, IW31

Former Member
0 Kudos

Hi !

My project is to:

"When notification (iw51) has created I need to send email with the notification number. The system generates a Order (iw31) from the notification. When this order has been closed (TECO) I need to send another email with the right order number".

Now the problem is that I have been searching through all the user-exits and some customer-exits that I find connected to these transaction, using tcode CMOD and SMOD. Also tried the zuserexit program. I have also tried to look through tcode FIBF for any BTE (Business transaction events).

But without any luck.

Any ideas of some say user-exit that is executed when I push the SAVE button in iw51 / iw31. It needs to be executed last so I can get the notification/order number.

Thank you.

Best Regards,

Fannar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey,

Looks like you could use workflow to meet your requirement.

Business objects for order and notification are BUS2007 and BUS2038.

Switch on the event trace using SWELS and create a order and notification. Analyze the event trace using SWEL to check the events created. You could use these events as triggering events for workflow.

-Kiran

Please mark useful answers

Former Member
0 Kudos

Hey Kiran!

Ok. I found that BUS2080 is triggered last when creating notification (iw51). But I actually never have used events before. Are you talking about creating a background job to trigger this event? Or I can also see that the Receiver FM/action is empty for this Event. Can I change that somehow so it will trigger my own FM ?

Thanks in advance.

Former Member
0 Kudos

You dont need to schedule anything to trigger events. SAPs standard program has the logic to create events.

What you need to do is to create a task which listens to this event.

Below is a overview of what needs to be done to setup the workflow.

Create a business object as a subtype of BUS2080

Add a method to the new object. This method should have the logic to send emails

Maintain a delegation entry using transaction SWO1-Settings-Delegate

Create a task using transaction PFTC_INS

Add the business object and event as the triggering event

Assign the method to the task.

If you are new to workflow refer SAP help or search the forum for workflow related material.

-Kiran

*Please mark useful answers

Former Member
0 Kudos

Hey Kiran,

OK. Actually as you sad in some previous post, BUSOBJ. BUS2007 and BUS2038 should be the triggering Event.

What I have done is:

1) Gone to SWO1 and in Object type: BUS2007 then pushed Subtype button.

2) Filled out the information there and chose * as Application... (not sure what should be here).

3) Added a method and delegated BUS2007 to ZSENDEMAIL, the name I gave in step 1)

4) Made a standard task and added ZSENDEMAIL as object type and event = CREATED in Triggering Events. Also put the right method in the basic data tab.

Now Im not sure why nothing happens. Because my function module is created and tested. So it should work.

Any ideas about the standard task. What Event should I choose in the Triggering Events tab. I chose the same as BUS2007 in SWEL. BUS2007 has CREATED and BUS2038 has INPROCESS. I actually haven't tested the BUS2038 but I did try the BUS2080 with INPROCESS event. And still nothing happened.

Thank you !!

Former Member
0 Kudos

Hey,

If you are trying to send an email after an Service Notification is created via IW51 then you should use the business object BUS2080. In your previous post you had mentioned that the event trace displayed events for BUS2080.

Create a subtype of BUS2080 and add the ZSENDMAIL method to the subtype. Maintain the delegation entry. Create the task and enter BUS2080-ZSENDMAIL in object type and method. Add BUS2080 - CREATED as the triggering event.

This should start the task.

Similarly for sending emails for IW31 and IW21 use business objects BUS2007 and BUS2038. Repeat the steps mentioned above for BUS2080. Both the objects have event CREATED. This can be used as the triggering event.

-Kiran

Please mark useful answers

Former Member
0 Kudos

Hey,

OK I think I'm almost there. My OBJT is ZSENDEMAIL with supertype BUS2080. The status of that is generated-saved-released. The method ZSENDEMAIL.SendEmail has status implemented. But shouldn't it be released? How do I do that ? Then in PFTC and task ZSENDEMAIL, I have OBJT BUS2080 and Method SENDEMAIL and in triggering events I have the BUS2080 and CREATED.

The method ZSENDEMAIL.SendEmail has function module ZCS_SENDEMAIL and that one is also generated and working fine.

Thanks !

Former Member
0 Kudos

To release the method, Go to SWO1, Enter the object and choose display. Place the cursor on the method and Choose Edit->Change Release Status->Object type component->To Released.

Also do not forget to maintain the workflow configuration via transaction SWU3.

-Kiran

Please reward useful answers

Former Member
0 Kudos

Ok its Released now. Actually I had to use Change in SWO1 instead of Display.

But SWU3 I can't figure out. I think the workflow config is not properly set up. I'm going to try to find out how to use this.

But thanks a lot Kiran for all your help.

Former Member
0 Kudos

Dude,

You forgot to award the points.

-Kiran

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Fannar,

Check this FM...<b>EXIT_SAPLCOIH_020</b>

and user exit is <b>IWO10020</b> for IW31

Alternativley goto SMOD --> F4 > SAP applications PM> PM-WOC

or Just enter IWO100* in SMOD

Regards,

Sridhar

Former Member
0 Kudos

Hey sridhar,

I have actually tried them all, and it seems none of them actually run after iw51 / iw31 has created the notification or order number. They all run either at the beginning of the transaction or somewhere in the process, but not when I'm finishing by pushing the SAVE button and when it generates the notific./order number ?

You think I'm misunderstanding something how this works ? It generates the number last doesn't it ?