Skip to Content

Step by Step – Triggering of Events for Workflow from Message Control

Event can be trigger from Message Control also. The step by step procedure is described below.

Suppose you want to trigger an custom event when a Standard Order is created with delivery block ‘Political Reason’.

First Create a Custom Business Object ZZBUS2032 with super type BUS2032 and create an event DeliverySet.

/wp-content/uploads/2012/04/2_96900.jpg

Then delegate your custom Business Object to BUS2032.

/wp-content/uploads/2012/04/6_96901.jpg

Then go to transaction NACE.

/wp-content/uploads/2012/04/1_96899.jpg

Select V1 and click on Output Type. Then click on New entries to create new Output Type.

/wp-content/uploads/2012/04/10_96902.jpg

Select the check boxes Access to Conditions and Partner-indep-output

Then click on Default values tab .

/wp-content/uploads/2012/04/12_96903.jpg

Select Despatch time as Send immediately

Select Transmission Medium as Events(SAP Business Workflow).

Then click on Processing routines . You are on the screen Processing

/wp-content/uploads/2012/04/13_96904.jpg

Put  Program as RSWEMC01 and Form Routine as CREATE_EVENT.

Then go to Condtion Table.

/wp-content/uploads/2012/04/13a_96906.jpg

Here you have to create condition table.

/wp-content/uploads/2012/04/13i_96908.jpg

Write V1 in application and  510 in Table.   Then click on Create.

/wp-content/uploads/2012/04/13k_96911.jpg

Select Delivery block after clicking it. Then click on Generate.

Then back to main screen of NACE.

Click on Access Sequences.

Click on New entries.

/wp-content/uploads/2012/04/15_96913.jpg

Write Z510 in AS, and description .

Click on Accesses.

/wp-content/uploads/2012/04/15a_96919.jpg

Write 99 in No. And select table as 510. Save it.

Now back to main screen on NACE.

Now we have to assign the Access Sequence to Output Type.

Go to output type. Select output type WORK. Click on that.


/wp-content/uploads/2012/04/16_96920.jpg

Write Z510 in Access Sequence. Save it.

And return to main screen.

Click on Condition Records.

/wp-content/uploads/2012/04/17_96921.jpg

Click on Work. Then you got selection screen of Delivery block. Click Execute w.

/wp-content/uploads/2012/04/19_96922.jpg

Select  Delivery block 02 , Political reason.

Write  ZZBUS2032 as object type and select DELIVERYSET as Event.

Go to main screen .

Now we have to assign output type to Procedure .

Click on Procedure.

/wp-content/uploads/2012/04/20_96924.jpg

Select V10000 for Standard Order.

Click on Control.

Click on New Entries.

/wp-content/uploads/2012/04/22_96925.jpg

Write some step no like 93. Assign WORK in Condition type.

Save it.

Then switch on the Trace using SWELS.

/wp-content/uploads/2012/04/24_96926.jpg

Then go to transaction VA01 to create sales order.

/wp-content/uploads/2012/04/26_96927.jpg

Enter.

/wp-content/uploads/2012/04/27_96928.jpg

Put Delivery block as Political reason and other necessary item. And save it.

Then check in SWEL.

/wp-content/uploads/2012/04/28_96929.jpg

You will find your custom event DELIVERYSET will trigger.





To report this post you need to login first.

14 Comments

You must be Logged on to comment or reply to a post.

  1. Rick Bakker

    Very useful.

    But: “Write  ZZBUS2032 as object type and select DELIVERYSET as Event.

    Shouldn’t that be BUS2032?

    (0) 
    1. Anjan Paul Post author

      Hi,

          The event should be triggered whenever needed, not every time. So we should use Custom event so that for some certain condition it is triggered.

      (0) 
              1. Rick Bakker

                No, they both work but only one is correct. You should never reference the subtype anywhere, it could change. The supertype will not.

                (0) 
                1. Kevin Wilson

                  Agreed. Always use the standard BO when delegation has done. If you don’t do this then the associated workflow will not be linked to the associated application object. In this case the GOS (Generic Object Services) for the sales order (BUS2032) will not show linked Workflows unless you raise the event using BUS2032…

                  (0) 
  2. sankar narayanan

    Hello Anjan,

    Nice post.

    But I have a question. Instead of doing this from NACE, why can’t we maintain the Sales Order  BO – BUS2032 + your custom event combination in SWE2 so that it triggers your custom event, and your workflow as well.  Let me know if this is also ok.

    (0) 
    1. Anjan Paul Post author

      Hi,

      Right. We can raise event in various way. SAP has given many option to raise event. I try to give example how can we raise event through NACE.

      (0) 

Leave a Reply