cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow for CV01n tcod

Former Member
0 Kudos

Hi Experts,

I have requirement when document status changes  in the tcode cv01n or cv02n workflow should trigger.

what is the business object event for the tcode cv01n or cv02n.

whether we need to develop single worflow for the 2 transaction or 2 separate workflow for 2 transaction

Regards,

Zubera

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member585060
Active Contributor
0 Kudos

Hi,

You can Implement Badi "DOCUMENT_MAIN01' and use Method AFTER_SAVE to trigger your workflows. This will work for both CV01N and CV02N.

Just read the current DRAW-DOKST value and the older value to trigger.

Thanks &Regards

Bala Krishna

Former Member
0 Kudos

Thanks for Ravi and Bala..

I am new to workflow.. Can we have one workflow for both cv01n and Cv02n.

and in BADI DOCUMENT_MAN01 and method after_save whether we need to call the

function module   SAP_WAPI_CREATE_EVENT for triggerring workflow?


former_member585060
Active Contributor
0 Kudos

Yes

ravi_ekambaram
Active Contributor
0 Kudos

Hi,

One workflow is sufficient.

System does trigger of workflow based on the event 'status change' not based on the tcodes.

Regards,

Ravi

Former Member
0 Kudos

Thanks Bala.. what key object key we need to pass..

This BADI will trigger for both CV01n and CV02n?

One more question: i need to pass the email to dept head depend on the department?

how we can we handle this situation in workflow.

former_member585060
Active Contributor
0 Kudos

Hi,

Use DRAW-DOKAR, DRAW-DOKNR, DRAW-DOKVR and DRAW-DOKTL as key.

Yes this badi will trigger for both tcodes.

@ Ravi I don't see any "Status Change" event DRAW business object.

Former Member
0 Kudos

Thanks for your reply Bala and ravi..

I have one more dobut.. 2 Event is there in the DRAW Changed and created event.

So I need to trigger the event is the cv01n and cv02n when the status changed

from A to B. So i need to use the statsu DRAW change right?

How can i pass the value from BADI to the workflow for the key field

DOKNR, DOKAR,DOKVR and DOKTL.

former_member585060
Active Contributor
0 Kudos

Hi,

If you use Event Changed, then it will trigger any value is changed and saved in CV02N, if you want to use that Event then you need to first add a select statement to fetch the old values from DRAW table and the Badi importing parameter DRAW to check the status change(DOKST), Just check as this method will trigger AFTER SAVE, you can use another method BEFORE_SAVE for triggering the workflow.

For the Business Object:- DRAW, you have keyfields as all those 4 fields, so you pass to them or set.

Thanks & Regards

Bala Krishna

Former Member
0 Kudos

What i am planning is to use event change, than depend upon the status and depend on th department, i can send the mail to user.

For example:

if user changes the status A to B and dept is FI , I will send the approval to FI head

if user changes the status A to B and dept is PM , I will send the approval to PM head.

if user status change to B TO C, irrespective of Dept it has to send the approval to same person.

is this idea is ok?

i have one more question, for the particualr tcode, when workflow trigger, how we can get the key fields values from tocd to workflow. through task and binding we can get the value? pls suggest

Former Member
0 Kudos

Hi Udupi

Whatever Bala & Ravi has given solution is correct. You need to dveleop a workflow based on the following:

Document Type, Document part, Document Version, Document status. Workflow can be triggered through SWDD transaction. Also it can triggered the E-mail facility to user after DMS/DIR changed to specific status. Before this you have to decide the workflow steps & logic.

Workflow can be traced through SWI6 transaction with Key Object as DRAW.

Thanks

Pravin

Former Member
0 Kudos

Thanks praveen.

My question how to get the key fields values from the tcode to workflow?

through task and business object event binding?

former_member585060
Active Contributor
0 Kudos

The required values for the key field required for DRAW Business Object will be available in the Importing parameter DRAW.

ravi_ekambaram
Active Contributor
0 Kudos

Hi Zubera,

DRAW is the business object for DIR's in DMS.

You can create workflow for DRAW with triggering event as status change.

Regards,

Ravi