cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow triggered

Former Member
0 Kudos

Hi All,

I want to know how custom workflow triggeres without WAPI function module.

What exacltly i want to know is besides WAPI function module/Event is there any way of triggering workflow.

Thanks

Sanjay.

Accepted Solutions (0)

Answers (7)

Answers (7)

former_member196651
Contributor
0 Kudos

Hi,

I had clearly told that use SWDD transaction for creating workflow. In that you can see that. You first explore something from your side and ask these type of basic questions.

Regards,

Abijith

Former Member
0 Kudos


I have explored.How ever couldnt find header/menu.

KIndly  help.

Former Member
0 Kudos

HI All

What about calling workflow using SAP_WAPI_CREATE_EVENT for all scenarios from an enhancement/Badi/customer exit instead of hassling with BO/events/SWEC?

Even for workflow for Material change/create/delete we can use an enhancement instead using BO BUS1001006 and event CREATE?

former_member196651
Contributor
0 Kudos

Hi,

Thanks Manoj for the info on HR module workflows.

Answers to your questions:

1) What is an Event?

Event is way to show to the outside world that some changes had been occurred to a business related entity. For example, CREATED event of any business object says that an instance of that business object type had been created in system

2) How events can be used in workflows?

a. First you create a new workflow.

b. In SWDD you can see workflow container. There first you create a container element. For example if you want to trigger a workflow after the creation of purchase order, then create a container element of type BUS2012.

c. Then you have to go to the header of the workflow(available in the menu of transaction SWDD).

d. There you can see the Start events tab. In that you have to give the business object as BUS2012 and give event name.

e. Then perform binding and event linkage from there.

Regards,

Abijith

Former Member
0 Kudos

Where is header/menu of workflow?

bpawanchand
Active Contributor
0 Kudos

Hi,

Check the below transactions

1. SWUS

2. SWUE.

4. SWED

5. SWEC

there are different possibilities to start the workflow

1. Manual 2. Raising events of BOR by using OO workflow mechanism 3. Change documents 4. Message Mapping 5. BTE 6. BAdi's and enhancements.

Regards

Pavan

former_member185167
Active Contributor
0 Kudos

Hello,

"What exacltly i want to know is besides WAPI function module/Event is there any way of triggering workflow."

Yes, by calling it from another workflow. Or starting it manually.

Why do you want to know this? Why would you want to NOT use an event?

regards

Rick Bakker

Former Member
0 Kudos

Can you kindly elaborate how event can be used for triggering workflow?Whats required in workflow to trigger workflow?

former_member185167
Active Contributor
0 Kudos

Hello,

"Whats required in workflow to trigger workflow?"

Simple! Go to PFTC, open up the workflow, go to the "Triggering Event" tab (or something with a similar name) and fill in the event. You also have to activate it.

You should take a Workflow course.

regards

Rick Bakker

Former Member
0 Kudos

HOw this workflow event gets triggered form outside of workflow?

Where thse couses are available anyways?

former_member185167
Active Contributor
0 Kudos

Hello,

"HOw this workflow event gets triggered form outside of workflow?"

From any ABAP program, by calling function module SAP_WAPI_CREATE_EVENT.

"Where thse couses are available anyways?"

You'll have to look at the SAP website, they're certainly in Asia, the US and Australia. BIT601 is a good one.

regards

Rick Bakker

Former Member
0 Kudos

Hi,

Mostly events are triggered by SAP standard code using function module SAP_WAPI_CREATE_EVENT (as mentioned by above) or SWE_CREATE_EVENT. So we just have to use those events in workflow and trigger them. Simple !!

If your desired workflow event is not triggered for example after performing some action on some SAP documents (e.g. upon changing the FI document, PO etc) then you can find relevant ext/BADI and write your own code using function moduloe SAP_WAPI_CREATE_EVENT to trigger your own workflow events.

As suggested by above, you can take help of event trace to see if SAP is triggering desired events automatically or not (from some standard codes).

Regards,

Ibrahim

Former Member
0 Kudos

Are you saying, the standard code has SAP_WAPI_CREATE_EVENT/SWE_CREATE_EVENT

which triggeres with the SAVE button are any other button?

Thanks,

Sanjay

Former Member
0 Kudos

Yes this is one of the possibility.

OR sometimes events are also triggered by configuring change documents in SWEC.

former_member185167
Active Contributor
0 Kudos

Don't use SWE_CREATE_EVENT. Always use SAP_WAPI* when you can.

former_member184495
Active Contributor
0 Kudos

Hi San,

its like if you SAVE a material in MM01, SAP considers it as CREATE event.

if you SAVE a material in MM02 after making changes to it, SAP considers it as CHANGE event.

In some cases you need to create a CHANGE event thru SWEC tcodes.

So to understand your requirement, you want to trigger a WF thru MM01 on saving material (i.e CREATE a material). So as our friends suggested, the BOR used is BUS1001006 and you might find a CREATED event for this BOR which you could use in your WF.

Hope it helps.

Aditya

former_member196651
Contributor
0 Kudos

Hi Sanjay,

In HR module it is possible to trigger workflow through customization. I am not sure that whether

the workflow is given against any event or not.

Regards,

Abijith

Former Member
0 Kudos

My scenario is triggering of workflow on clicking save button of MM01.I will be thankful for helping me with this scenario.

former_member228804
Participant
0 Kudos

Hello Sir,

     Go to t-code SWELS. Turn on the event trace. Come out of this t-code once you turn on the event trace. Now enter t-code MM01. Create the material that you want to create, SAVE the material, and come out of it.

     Now go to SWELS again and Turn OFF the event trace and come out. Now enter t-code SWEL. Execute this report. You will get the business object and event that was triggered on saving a material in MM01. Then enter t-code SWO1 and analyse the business object that was triggered.

     Now once you find the Business object and its event, you go to T-code SWDD. Create a new workflow and in the header of this newly created workflow, you enter the name of the business object and its event. Bind the values against it and activate the workflow.

     Now each time a new material is created, your workflow will be triggered. Write methods for this and execute your logic.

Regards,

Dnyanesh.

suresh_subramanian2
Active Contributor
0 Kudos

Hello Sanjay !

         The requirement is to trigger the workflow when MM01 transaction is saved.

         So, configure the change document MATERIAL in the transaction SWEC with the business object BUS1001006 and event CREATED having chosen the radio button "On create" .

         

Regards,

S.Suresh.

Former Member
0 Kudos

Hi Abijith,

In HR module, the standard code calls FM SAP_WAPI_START_WORKFLOW to trigger workflows customized in IMG.

Events or the above function module are the ways to trigger workflows.

Regards,

Manoj

Former Member
0 Kudos

Create a new workflow and in the header of this newly created workflow, you enter the name of the business object and its event.

: Can you kindly explain where header of this newly created workflow is??

Former Member
0 Kudos

Hi Sanjay,

You cannot trigger the workflow without WAPI function because for triggering any workflow you need to pass the object type,object key & event.

What is the the exact requirement?

Regards,

Sudeesh Soni

former_member228804
Participant
0 Kudos

Hello Sanjay,

     Why do you wish to do that? How are you going to trigger a workflow without an event?

     Every workflow needs an event to be triggered. That is the first thing you need to bind with your workflow header, when you create one. The event can either a custom event or a standard event.

     There are standard business objects, which have standard events embedded in them. You can bind these events with your workflow. Also custom events can be created by using WAPI FMs.

Regards,

Dnyanesh.

former_member185167
Active Contributor
0 Kudos

Hello,

"Every workflow needs an event to be triggered."

That's not true, it can also be done with SAP_WAPI_START_WORKFLOW, for example.

But, using an event is indeed the best way to start a workflow.

regards

Rick Bakker

Former Member
0 Kudos

But, using an event is indeed the best way to start a workflow:

1) What is event?

2)How event can be used to start workflow?Would you kindly explain?