cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger a custom business object related to quality usage decision?

former_member203117
Active Participant
0 Kudos

Dear team,

I have created a custom Business object (ZGR_UD) and an event (UD) to trigger the usage decision workflow. Can anyone tell me how to trigger the event? I mean SWEC or a BADI to trigger the event.

Regards,

Tushar.

Accepted Solutions (1)

Accepted Solutions (1)

former_member203117
Active Participant
0 Kudos

Check BADI "INSPECTIONLOT_UPDATE" it has so many methods mentioned below may any of them fit for your requirement.

CHANGE_AT_SAVE     Change Inspection Lot When Saving

CHANGE_BEFORE_UPDATE     Change Inspection Lot Before Accessing Update

CHANGE_IN_UPDATE     Change Inspection Lot in Update

CHANGE_UD_AT_SAVE     Change Usage Decision When Saving

CHANGE_UD_BEFORE_UPDATE     Change Usage Decision Before Accessing Update

CHANGE_UD_IN_UPDATE     Change Usage Decision in Update

CREATE_AT_SAVE     Create Inspection Lot When Saving

CREATE_BEFORE_UPDATE     Create Inspection Lot Before Accessing Update

CREATE_IN_UPDATE     Create Inspection Lot in Update

SET_UD_AT_SAVE     Make Usage Decision When Saving

SET_UD_BEFORE_UPDATE     Make Usage Decision Before Accessing Update

SET_UD_IN_UPDATE     Make Usage Decision in Update

While saving method "SET_UD_AT_SAVE" is triggering.Just check this.

Answers (3)

Answers (3)

bpawanchand
Active Contributor
0 Kudos

Hi,

Make use of the function module SAP_WAPI_CREATE_EVENT pass the object type and object key and event name to the function module and make sure you write commit work after the call.  Call this function module from the BADI

and in the basic data of the workflow you need to maintain this event as the triggering event of the workflow

For this

1. Execute the PFTC transaction

2. Open the workflow template in change mode and click on triggering event tab and add this event and BOR in the below table and also define the binding from event container to workflow container later you can test by making use of SWUE txn.

Regards

Pavan

Or

Message was edited by: Pavan Bhamidipati

former_member203117
Active Participant
0 Kudos

HI Pavan,

I'm trying to get the BADI/USEREXIT to trigger the BO / EVENT. For example if you want to trigger a workflow after a  PURCHASE REQUISITION is SAVED it can be done form BADI MM_REQ_POSTED.

Similarly I want to know if there is a BADI to trigger my custom workflow for QUALITY USAGE notification.

Regards,

Tushar.

anjan_paul
Active Contributor
0 Kudos

Hi,

  It is completely your decision from where you want to trigger event. There are lot of BADI and USEREXIT. You have to decide which one you use to trigger your custom event.

former_member203117
Active Participant
0 Kudos

Dear Anjan,

Please name a few BADI's/USEREXITS so that I can go and look into those and choose the appropriate one.

Regards,

Tushar.

bpawanchand
Active Contributor
0 Kudos

Hi,

Iam not sure about What Quality Usage is but may the below thread might help you which talks about Quality Notifications

Regards

Pavan

anjan_paul
Active Contributor
0 Kudos

Hi,

Check the link to find some BADI used for Quality Notification.

http://scn.sap.com/thread/1297011

Former Member
0 Kudos

Hi,

By calling the function module SWE_EVENT_CREATE in enhancement(BADI or user exits) you can create the event to trigger the workflow.

Regards

Rakesh

former_member203117
Active Participant
0 Kudos

Hi Rakesh,

I agree, In fact that was my question do we have a BADI/USEREXIT to trigger the usage decision.

Regards,

Tushar.

bpawanchand
Active Contributor
0 Kudos

Hi,

BADi or user exit would be application specific and you should give us more information about for which kind of application n you created this custom BO and in which case you are expecting this event needs to be raised.....

You need to give more information about your requirement

Regards

Pavan

anjan_paul
Active Contributor
0 Kudos

Hi,

   From the application if there is any BADI or user exits, there you call your custom business object's event through function module SAP_WAPI_CREATE_EVENT.

former_member203117
Active Participant
0 Kudos

Hi Anjan,

I agree, In fact that was my question do we have a BADI/USEREXIT to trigger the usage decision.

Regards,

Tushar.