Triggering Workflow on table-level events

...Previous

Step 8:

Provide a Form routine as ‘CREATE_CUST_INFO’ and click on Editor Button.

Step 9:

Select the ‘New Include’ and continue.

Step 10:

Write the following code in the include program. Activate it. Activate your function group as well.

FORM CREATE_CUST_INFO.
  ZCUST_INFO-CR_DATE = SY-DATUM.
  ZCUST_INFO-CR_TIME = SY-UZEIT.
  IF ZCUST_INFO-COUNTRY = 'IN'.
    DATA: W_OBJTYPE TYPE SWETYPECOU-OBJTYPE,
          W_OBJKEY  TYPE SWEINSTCOU-OBJKEY,
          W_EVENT   TYPE SWETYPECOU-EVENT.
    W_OBJTYPE = 'YH355_BO'.
    W_OBJKEY  = ZCUST_INFO-CUSTNO.
    W_EVENT   = 'SENDEMAIL'.
    CALL FUNCTION 'SWE_EVENT_CREATE'
      EXPORTING
        objtype                       = W_OBJTYPE
        objkey                        = W_OBJKEY
        event                         = W_EVENT
              .
    COMMIT WORK.
  ENDIF.
ENDFORM.

Step 11:

Go to SE11. Click on Utilities -> Table Contents -> Create Entries.

Step 12:

Enter the following detail except Date and Time.

Step 13:

Click on Save.

In result, Date and Time will get populated and event will get trigger.

 

 

 

 Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image