cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering Workflow on Print/Print Preview event of the Quotation document

Former Member
0 Kudos

Hi Experts,

I am new to workflow development.

My requirement is to trigger a workflow when the user issues a Print/Print Preview command from the t-code VA22/23 (Quotation Document: VA22/23> Menu ->Sales Doc>Issue Output To --> Print).

(Many Ouput types with different driver programs/forms are configured in NACE. All are/should be considered for wokflow)

My question is how can i trigger my workflow when the above steps are executed.

I tried seraching any method/event like 'Print Document' in the standard bussiness object BUS2031.(need to know if this object can be enhanced , but don't know how in this case)

Also no help from event trace SWEL/SWELS.

Please let me know how do i trigger my Workflow in such cases.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I managed to Trigger the workflow with custom new event by enhancing standarad object BUS2031 for Quotation.

Called FM SWE_EVENT_CREATE to trigger the Workflow in custom driver program when Print is issued.

former_member185167
Active Contributor
0 Kudos

Hello,

Thanks for the follow-up.

Please note that you should use SAP_WAPI_CREATE_EVENT and not that fm.

Always use SAP_WAPI* when you can.

regards

Rick Bakker

hanabi technology

former_member185167
Active Contributor
0 Kudos

Hello,

You want to start a workflow if someone does a print preview?!

Could you tell us what this workflow is supposed to do?

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Hi Rick,

This workflow will stop the user from printing the Quotation for the first time when the Print command is issued.

A mail will go the concerned person, once the workflow gets triggered , unless and untill this task gets approved , User will not be able to Print the Quotation.

If the print has already been taken workflow wont get trigggered.

If Output has already been issued for an existing output type, and the same step is executed to trigger a copy, workflow should not be triggered.

Hope this is clear.

Thanks

former_member185167
Active Contributor
0 Kudos

Hello,

Thanks for the clarification.

I would investigate first if VA22/23 has something built-in to stop people printing unapproved quotations - or maybe adds a warning to it. Maybe another SDN forum could help.

If you still need a workflow then I can only suggest turning on debug when you try to do a print and see if there is anywhere you can insert code to create a custom event - maybe a user exit is available.

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Thanks for the reply Rick.