cancel
Showing results for 
Search instead for 
Did you mean: 

How to use FM : SAP_WAPI_START_WORKFLOW

0 Kudos

Hello Folks,

can you please explain how to use FM : SAP_WAPI_START_WORKFLOW to call the BOR object BUS2038 , method : EDIT.

Accepted Solutions (0)

Answers (2)

Answers (2)

anjan_paul
Active Contributor
0 Kudos

Hi,

 

   SAP_WAPI_START_WORKFLOW  is used to start  a workflow, not to  call any BO method.

   If you want really want directly perform the functionality of BUS2038 , method : EDIT. Then follow this step. Create a Task in PFTS transaction. Then assign the BUS2038 , method : EDIT to it. Then call the the task from fm  SAP_WAPI_START_WORKFLOW

0 Kudos

Correct Anjan paul,

I am trying to use standard task : TS00008314 ,


I am passing the task no in FM importing parameter , it is not running successfully.


pls suggest!


I042439
Employee
Employee
0 Kudos

Hi Alpesh

for each response above, you are always answering "I am Trying to....achieve xyz"

Are you even trying what suggestions are given?

Did you try to check SWEL as mentioned by Rick? or did you try to check on Anjan's response?

What we all are trying to explain you is:

1) See if there is any standard event triggered on it's own in SWEL when you chnage the PF and save it. (Make sure to switch on the trace first using SWELS and with NO restrictions). If there is an event, use that as a Triggering event to start your workflow.

2) If there is no event, trigger a custom event (create a subtype and delegate to the main BO BUS2038 and create your own custom event in SWO1. Trigger it from your enhancement using FM SAP_WAPI_CREATE_EVENT and define that event as the triggering event of your workflow.

3) Once the workflow has started, you can determine the agents and send them an email using the send email step. Send them a decision item as well (but what kind of decision you want and what should happen if they approve or reject?)

Please reply back if you have doubts or with the results of the above trials. We already know what you are trying to achieve.

If you are unsuccessful, please provide necessary screen shots &code dumps to help you better.

Regards,

Modak

I042439
Employee
Employee
0 Kudos

Hi

First of all SAP_WAPI_START_WORKFLOW does not calls a method of a BOR

Second, SAP_WAPI_START_WORKFLOW will start a workflow; better is to start a workflow based on event and use FM SAP_WAPI_CREATE_EVENT instead of directly starting a workflow.

Third - What are we trying to achieve here? Call the EDIT Method? Why? or are we trying to start some workflow process? Please detail the actual requirement.

Regards,

Modak

0 Kudos

Hi Modak,

my requirement is to sent SAP inbox mail while partner function is change in IW22 - PM Notification ,

I written code in exit : QQMA0014 , now I am trying to use business object BUS2038 .

pls suggest.

former_member185167
Active Contributor
0 Kudos

Hello,

"my requirement is to sent SAP inbox mail while partner function is change in IW22 - PM Notification "

Do you mean email or workitem? They are very different.

First step is to do whatever you're testing for ("partner function is change") and then check event log SWEL to see if it generated an event. If so, then use that event to start your workflow. Use SWELS to turn on the event log if it's turned off.

regards

Rick

0 Kudos

Hi Rich,

Both , Email as well as SAP inbox mail,

I had done the enhancement for the same, now at the same point I need to trigger this FM and send message to SAP inbox.

Alpesh.