cancel
Showing results for 
Search instead for 
Did you mean: 

Where to write code in SAP Work flow

0 Kudos
93

Hello Gurus,

I am new to SAP work flow. Currently i am working on one scenario. I want to send a mail on creation of a material in MM01.

I create work flow for this, but now i want, " Every creator of material has a supervisor, i need, if a user create a material then mail should go to his supervisor.

I have a ztable to maintain user and his supervisor. EX: EMPUID SUP_MAIL. i need to fetch supervisor mail id based on creator user id.

Hope you get my scenario.

<h2> I am not able to understand where i have to write code to fetch sup_mail value and pass it to container. </h2>

Kindly suggest.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185167
Active Contributor
0 Kudos

Hello,

As stated above, you program in the class (SE24) or business object (SWO1).

It can either be a method or, preferably (if itmakes sense), an attribute.

regards

Rick Bakker

hanabi technology

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The programming has to be done at your BO level.

swo1 transaction - enter your business object and click on display.

Select your method and click on the program button.

A program editor will open to enter our logic.

Please check this link,

http://help.sap.com/saphelp_nw70/helpdata/en/c5/e4b130453d11d189430000e829fbbd/frameset.htm

Regards

Keerthi

0 Kudos

Hello keerthi vasan ,

Thanks for your quick reply.

I am working as you suggested.

0 Kudos

Hello keerthi vasan,

As you said i copy the standard object as zobject and write my code over there. but still is not working.

kindly help.

How to put break point in SWo1.

Former Member
0 Kudos

Hi,

You can keep the break point in your programming lines.

Then from swo1 click execute/test(F8) button,click on create instance.

Enter your object key and continue.

Then execute the particular method where you have kept your break point.

Regards

Keerthi

0 Kudos

Hello,

I put break point (hard code), but it is not triggering. i guess, zobject is not attached with mm01.

what should i do?

0 Kudos

HI,

In SWO1 break point is triggering, but not when we execute MM01. Please guide me how to attach ZBO to mm01.

Former Member
0 Kudos

Hi,

You can not dubug the workflow at runtime, you can debug the methods of the Business Objects.

So please debug the method indivually through tcode "SWO1"

Thanks and regards,

SNJY

Former Member
0 Kudos

Hi,

As you have created the custom business object "Zobject" then please maintain the deletion between the standard BUS1001006 ( Material ) through tcode SWE_SET_DELEGATION and "Zobject, then all the custom method of "Zobject will available in the stadard object BUS1001006. Then you can use the standard object "BUS1001006" in which your custom method will be available.

Thanks and regards,

SNJY